axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayan S Dhillon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3612) Axis2 Jaxb binding and MTOM issue
Date Mon, 21 Jul 2008 09:35:31 GMT

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

Narayan S Dhillon commented on AXIS2-3612:
------------------------------------------

Could some one from Dev please update on this?Could JAXB and MTOM be used together in Axis2?

> Axis2 Jaxb binding and MTOM issue
> ---------------------------------
>
>                 Key: AXIS2-3612
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3612
>             Project: Axis 2.0 (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.urn:uuid:EAE9BC656EBBB536921205317613110@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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message