You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2009/07/23 20:56:14 UTC

[jira] Resolved: (AXIS2-4438) MIME Multipart Support

     [ https://issues.apache.org/jira/browse/AXIS2-4438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4438.
------------------------------------

    Resolution: Invalid

> MIME Multipart Support
> ----------------------
>
>                 Key: AXIS2-4438
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4438
>             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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
> <soapenv:Body><call:GetDocumentAsAttachmentResponse xmlns:call="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
> <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 .wsdl).
> 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, Constants.VALUE_TRUE);
>   
> 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, Constants.VALUE_TRUE);
>         
>              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.