[ https://issues.apache.org/jira/browse/AXIS2-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679174#action_12679174 ]
Cathal Callaghan commented on AXIS2-3612: ----------------------------------------- Hi Naravan, has their been any updates on whether Axis2 will provide support for MTOM using JAXB? Thanks, Cathal > 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:eae9bc656ebbb536921205317613...@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.