Hi Vadim,
AFAIK for HTTP binding for the SOAP with Attachment type messages
content types should be as follows.

   1.)  content-type for  HTTP header - multipart/related.

   2.) Content type of SOAP message -   text/xml ( for SOAP 1.1 ) ,
application/soap+xml (for SOAP 1.2). and binary data attached as a
MIME content.

BTW you can enable SwA using following options easily with Axis2.

In client side

options.setProperty(Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE);

In server side add this parameter to the server axis2.xml file.

 <parameter name="enableSwA" locked="false">true</parameter>



  Thanks ,



On Fri, Jul 24, 2009 at 2:38 AM, Vadim
Letitchevski<[email protected]> wrote:
> I have used "Sample client which sends a message with SwA type attachments"
> code snippet to adjust my Stab generated from WSDL.
> Particularly these strings:
>
>         FileDataSource fileDataSource = new FileDataSource("Name.tar.gz");
>         DataHandler dataHandler = new DataHandler(fileDataSource);
>         _messageContext.addAttachment(myclass.getPartData().getHref(),
> dataHandler);
> There are some things I wish were a bit more manageable.
> Can anyone tell me how to set the attachment Content Type. When I attach
> file "Name.tar.gz" the automatic selection sets it to
> "application/octet-stream" where I would like to see "application/tar.gz".
>
>
> Thanks
> Vadim.
> (310)765-3812
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Reply via email to