axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurizio Sciglio" <maurizio.scig...@txt.it>
Subject Fw: DIME & Axis
Date Tue, 11 Feb 2003 09:57:29 GMT
Please help me. I really need to solve this problem soon. I've just realized
that if I try to send an attachment from C# client (DIME) the response
message has the correct content-type and everything works fine.

Bye

> Hi all.
>
> I'm trying to download a file from a Web Service written in Java. In order
> to allow .NET clients to use this service I thought to use DIME for SOAP
> attachment. Sam Brow has submitted to this mailing list a message writing
> about this topic. Unfortunately in his example he simply sends back to the
> client the files attached within the request.
> This is the code I'm using :
> ------------------------------------------------------------
>   public void SendImage(String filename) {
>     FileDataSource fds=new FileDataSource(namefile);
>     DataHandler dh=new DataHandler(fds);
>     AttachmentPart ap=new AttachmentPart(dh);
>
>     MessageContext context=MessageContext.getCurrentContext();
>     Message responseMessage=context.getResponseMessage();
>     responseMessage.addAttachmentPart(ap);
>
>
>   }
> ---------------------------------------------------
>
> This simple Web Service method should send back to the client a file whose
> name is the parameter "filename". Doing this way the service doesn't work.
> Inspecting the SOAP messages I've understood why it doesn't work. The
> response is sent back to the .NET client in MIME format.
> How can I do the same thing in DIME? Where can I specify the content-type
of
> the response message?
>
> Please help me soon, It's very important for me.
>
> Thanks in advance.
>
> Maurizio Sciglio
>
>
>
>



Mime
View raw message