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 "D A Jasintha Kapilajith Dasanayaka (Commented) (JIRA)" <ji...@apache.org> on 2011/09/30 06:25:45 UTC

[jira] [Commented] (AXIS2-3612) Axis2 Jaxb binding and MTOM issue

    [ https://issues.apache.org/jira/browse/AXIS2-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117865#comment-13117865 ] 

D A Jasintha Kapilajith Dasanayaka commented on AXIS2-3612:
-----------------------------------------------------------

 HI

Yes axis2 is supporting for Jaxb 

Thanks
/Jasintha
                
> Axis2 Jaxb binding and MTOM issue
> ---------------------------------
>
>                 Key: AXIS2-3612
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3612
>             Project: Axis2
>          Issue Type: Improvement
>          Components: databinding
>    Affects Versions: 1.3, 1.4
>            Reporter: Narayan Singh Dhillon
>              Labels: jaxb
>
> I tried a simple web service client with JAXB binding, and noticed that MTOM parts are being in-lined in the soap message as opposed to being XOP attachments.
> The same client works fine with ADB binding.
> Code example:
> FileDataSource fileDataSource = new FileDataSource("C:\\upload.dat");
> DataHandler fileDataHandler = new DataHandler(fileDataSource);
> InitiateRequest request = new InitiateRequest();
> request.setRequestId("xxxxx");
> request.setSubmission(fileDataHandler);
> request.setSignature(sigDataHandler);
> Response:
> --MIMEBoundaryurn_uuid_EAE9BC656EBBB536921205317613109
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
>    <?xml version='1.0' encoding='UTF-8'?>
>       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>          <soapenv:Body>
>             <InitiateRequest xmlns="urn:uploadfile">
>                <requestId>xxxxx</requestId>
>                <submission>VGVzdCBQYWluIFN1Ym1pc3Npb24=</submission>
>                <signature>VGVzdCBzaWduYXR1cmU=</signatur>
>             </InitiateRequest>
>          </soapenv:Body>
>       </soapenv:Envelope>--MIMEBoundaryurn_uuid_EAE9BC656EBBB536921205317613109--0
> There are different views on this:
> <Ajith Ranabahu>
> Perhaps this has to do with JAXB using the StAX interfaces to
> read/write XML ? If you see the MTOM support in ADB you'll see we went
> to great lengths to provide a way to carry over the binary blob to the
> data binding framework without text conversions. We did this by
> introducing a property value through the StAX readers getProperties
> method (See [1] for details)
> So unless the data binding framework would know about this behavior
> then it is unlikely that they support optimal binary. AFAIK we have a
> similar problem with XMLBeans
> Ajith
> [1] http://wso2.org/library/236
> <dims>
> Narayan,
> with jaxb you can supply your own data handlers for streaming. hopefully
> someone on the team can help write a sample.
> Please add an enhancement request for a sample in JIRA so we won't
> forget.
> thanks,
> dims

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org