MTOM error - wso2 wsas 3.2.0 - axis2 1.6.0 - axiom 1.2.9

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MTOM error - wso2 wsas 3.2.0 - axis2 1.6.0 - axiom 1.2.9

Giambattista - WS
Hello,

My name is Giambattista Pisasale, from WebScience, Milan, Italy.

I'm working with WSAS 3.2.0 /Axis2 1.6.0 / axiom 1.2.9
I've an issue, I think that is a regression because everything works
fine with WSAS 3.1.3 / axis2 1.5.0 / axiom 1.2.7.

I've a simple AAR service with the method
        Document getDocument(String uuid);
       
that returns a (simple) object like this:

public class Document {
        private String UUID;
        private DataHandler fileContent;
        ...(getters / setters )
}

The problem is that the service doesn't optimize the attachment and the
file content is printed inline:
this is what I expected and what the service return with wsas 3.1.3:
 <return xsi:type="ax21:Document"
xmlns:ax21="http://dao.dlsvc.ds.sisal.webscience.it/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UUID>uuidprova</UUID>
            <fileContent>
               <xop:Include
href="cid:1.urn:uuid:[hidden email]"
xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
            </fileContent>
......

while this is what the service returns with wsas 3.2.0:
 <return xsi:type="ax21:Document"
xmlns:ax21="http://dao.dlsvc.ds.sisal.webscience.it/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UUID>uuidprova</UUID>
            <companyId>0</companyId>
            <fileContent>
            asdfasdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdfads
            </fileContent>
..........

The only workaround I found is to use the bean generated by wsdl2java
utility, overwriting the original one.

follow the log with trace level for org.apache.axiom.* :

[2010-07-04 19:22:03,954] (org.apache.axiom.om.OMOutputFormat - 140)
DEBUG -  Start getContentType: OMOutputFormat [ mimeBoundary =null
rootContentId=null doOptimize=true doingSWA=false isSOAP11=false
charSetEncoding=UTF-8 xmlVersion=null contentType=null
ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null
optimizedThreshold=0]
[2010-07-04 19:22:03,958] (org.apache.axiom.om.OMOutputFormat - 166)
DEBUG -  getContentType= {multipart/related;
boundary="MIMEBoundaryurn_uuid_DA769DE35388AA2ED61278264125205";
type="application/xop+xml";
start="<0.urn:uuid:[hidden email]>";
start-info="application/soap+xml"}   OMOutputFormat [ mimeBoundary
=MIMEBoundaryurn_uuid_DA769DE35388AA2ED61278264125205
rootContentId=0.urn:uuid:[hidden email]
doOptimize=true doingSWA=false isSOAP11=false charSetEncoding=UTF-8
xmlVersion=null contentType=application/soap+xml
ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null
optimizedThreshold=0]
[2010-07-04 19:22:03,962] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 91) DEBUG -  OutputStream =class java.io.BufferedOutputStream
[2010-07-04 19:22:03,963] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 92) DEBUG -  OMFormat = OMOutputFormat [ mimeBoundary
=MIMEBoundaryurn_uuid_DA769DE35388AA2ED61278264125205
rootContentId=0.urn:uuid:[hidden email]
doOptimize=true doingSWA=false isSOAP11=false charSetEncoding=UTF-8
xmlVersion=null contentType=application/soap+xml
ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null
optimizedThreshold=0]
[2010-07-04 19:22:03,965] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 95) TRACE -  Call Stack =DEBUG_FRAME =
org.apache.axiom.om.util.CommonUtils.callStackToString(CommonUtils.java:80)
        DEBUG_FRAME =
org.apache.axiom.om.impl.MTOMXMLStreamWriter.<init>(MTOMXMLStreamWriter.java:95)
        DEBUG_FRAME =
org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:191)
        DEBUG_FRAME =
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
        DEBUG_FRAME =
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:361)
        DEBUG_FRAME =
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:238)
        DEBUG_FRAME =
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
        DEBUG_FRAME =
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
        DEBUG_FRAME =
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
        DEBUG_FRAME =
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
        DEBUG_FRAME =
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
        DEBUG_FRAME =
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)
        DEBUG_FRAME =
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        DEBUG_FRAME =
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        DEBUG_FRAME =
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
        DEBUG_FRAME =
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
        DEBUG_FRAME =
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
        DEBUG_FRAME =
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        DEBUG_FRAME =
org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:154)
        DEBUG_FRAME =
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        DEBUG_FRAME =
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        DEBUG_FRAME =
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        DEBUG_FRAME =
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        DEBUG_FRAME =
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        DEBUG_FRAME =
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        DEBUG_FRAME =
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        DEBUG_FRAME =
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        DEBUG_FRAME =
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        DEBUG_FRAME =
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        DEBUG_FRAME = org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        DEBUG_FRAME =
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        DEBUG_FRAME =
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        DEBUG_FRAME = org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:685)
        DEBUG_FRAME = java.lang.Thread.run(Thread.java:619)

[2010-07-04 19:22:03,972] (org.apache.axiom.om.util.StAXUtils - 582)
DEBUG -  About to create XMLOutputFactory implementation with
classloader=org.eclipse.core.runtime.internal.adaptor.ContextFinder@13515e
[2010-07-04 19:22:03,972] (org.apache.axiom.om.util.StAXUtils - 584)
DEBUG -  The classloader for javax.xml.stream.XMLOutputFactory is:
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@1bd9d76
[2010-07-04 19:22:03,990] (org.apache.axiom.om.util.StAXUtils - 602)
DEBUG -  Created XMLOutputFactory = class
org.apache.axiom.util.stax.wrapper.ImmutableXMLOutputFactory for
classloader=org.eclipse.core.runtime.internal.adaptor.ContextFinder@13515e
[2010-07-04 19:22:03,991] (org.apache.axiom.om.util.StAXUtils - 604)
DEBUG -  Size of XMLOutputFactory map =1
[2010-07-04 19:22:04,002]
(org.apache.axiom.om.impl.util.OMSerializerUtil - 346) DEBUG -  The
value of xsi:type is ax21:Document
[2010-07-04 19:22:04,025] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 182) DEBUG -  Calling MTOMXMLStreamWriter.flush
[2010-07-04 19:22:04,026] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 190) DEBUG -  The XML writing is completed.  Now the attachments are
written
[2010-07-04 19:22:04,077] (org.apache.axiom.om.impl.MTOMXMLStreamWriter
- 172) DEBUG -  close
           
Can you help me !?

thanks a lot.
Giambattista Pisasale
           


_______________________________________________
Wsas-java-user mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user