You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by "Dom Ochotorena (JIRA)" <ji...@apache.org> on 2010/08/19 18:10:17 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=12900331#action_12900331 ] 

Dom Ochotorena commented on AXIS2-3612:
---------------------------------------

Hi All,
I'm also looking for a definitive answer on whether Axis2 supports MTOM using JAXB.
Thanks,
Dom

> 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.4, 1.3
>            Reporter: Narayan Singh Dhillon
>
> 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.
-
You can reply to this email to add a comment to the issue online.


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