axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Commented: (AXIS2-4438) MIME Multipart Support
Date Wed, 22 Jul 2009 15:03:14 GMT


Andreas Veithen commented on AXIS2-4438:

Can you try with getAllContentIDs instead of getContentIDList? getContentIDList only returns
the list of attachments that have already been loaded from the underlying stream, while getAllContentIDs
forces reading of all MIME parts. I know that in the Axiom 1.2.8 Javadoc this is not clearly
specified. See the Javadoc from 1.2.9-SNAPSHOT [1] for more details.


> MIME Multipart Support
> ----------------------
>                 Key: AXIS2-4438
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Task
>          Components: client-api
>    Affects Versions: 1.5
>         Environment: Windows XP Desktop computer
>            Reporter: Anthony Seniunas
>            Priority: Blocker
>   Original Estimate: 0.33h
>  Remaining Estimate: 0.33h
> I've developed a web client using wsdl2java and need to obtain a document attachment
from a web service. I'm requesting the attachment and receiving the following response:-
> ------=_Part_7_31533740.1248268728107
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: binary
> Content-Id: <9FC76C68C45EB4A8DF6F8B485C639FB7>
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv=""
xmlns:xsd="" xmlns:xsi="">

> <soapenv:Body><call:GetDocumentAsAttachmentResponse xmlns:call="">
> <call:GetDocumentAsAttachmentResult>
> <contentType>text/plain</contentType>
> <name>22066.txt</name>
> </call:GetDocumentAsAttachmentResult>
> </call:GetDocumentAsAttachmentResponse>
> </soapenv:Body>
> </soapenv:Envelope>
> ------=_Part_7_31533740.1248268728107
> Content-Type: text/plain
> Content-Transfer-Encoding: binary
> Content-Id: <81047F36E3F375B55F5664D6323367DE>
> Hello world
> ------=_Part_7_31533740.1248268728107--
> Axis2 appears to ignore the second attachment. I've tried a number of scenarios to fix
this by modifying the generated stub code (note the binary attachment isn't defined in the
> for eg, I've tried to switch on SWA for the response operationClient prior to executing
the call to get the response context.
>         _operationClient.getOptions().setProperty(Constants.Configuration.ENABLE_SWA,
> After getting the return message context I try to obtain the attachment map and contentIDList
however only the first attachment and  first content id are available.
>              Attachments attachments = _returnMessageContext.getAttachmentMap();
>              List keys = attachments.getContentIDList();
>  I've also tried enabling MTOM in a similar way and obtaining the element. Although I
can find the first element, no other element is available because the second attachment doesn't
have any element to find.
>         _operationClient.getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
>              OMElement ele = _returnEnv.getBody().getFirstElement();
> This has led me to believe axis2 may not support the above MIME format so please can
you advise as to whether the above MIME format is supported? If so can you advise on the method
of obtaining the second attachment?.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message