Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 25766 invoked from network); 10 Jul 2010 12:34:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Jul 2010 12:34:02 -0000 Received: (qmail 7938 invoked by uid 500); 10 Jul 2010 12:34:01 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 7739 invoked by uid 500); 10 Jul 2010 12:33:59 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 7731 invoked by uid 99); 10 Jul 2010 12:33:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jul 2010 12:33:58 +0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [93.62.254.107] (HELO mail.webscience.it) (93.62.254.107) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jul 2010 12:33:50 +0000 Received: by mail.webscience.it (Postfix, from userid 503) id 901FA1CD002A; Sat, 10 Jul 2010 14:33:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on mail.webscience.it X-Spam-Level: Received: from [1.38.11.105] (unknown [1.38.11.105]) (Authenticated sender: pisasale@webscience.it) by mail.webscience.it (Postfix) with ESMTP id 8F9F43BA0070 for ; Sat, 10 Jul 2010 14:33:25 +0200 (CEST) Subject: Re: MTOM error - axis2 1.5.1 - axiom 1.2.9 From: Giambattista - WS To: java-dev@axis.apache.org In-Reply-To: References: <1278264345.16746.41.camel@Reloaded3Ubuntu> <1278265569.16746.44.camel@Reloaded3Ubuntu> Content-Type: text/plain; charset="UTF-8" Organization: WebScience Date: Sat, 10 Jul 2010 14:33:25 +0200 Message-ID: <1278765205.2485.0.camel@Reloaded3Ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-0.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,URI_HEX autolearn=no version=3.3.0 Hello, thanks for your reply. I tested a simple service with a method that return an object with a DataHandler field with axis2 1.5.1 downloaded war version from here: http://ws.apache.org/axis2/download.cgi I found the axiom libraries 1.2.8 inside, everything works fine. I downloaded the axiom 1.2.9 snapshots from http://repository.apache.org/snapshots/org/apache/ws/commons/axiom/ and I substituted the library into webapps/axis2/WEB-INF/lib Tested again the same service and the MTOM optimization doesn't work. Can you help me? I can send the code if you think it can be useful. thanks regards Il giorno mer, 07/07/2010 alle 21.20 +0200, Andreas Veithen ha scritto: > Giambattista, > > This is not the support forum of WSO2. You will have to test this > first with an Axis2 version produced by the Axis2 project. > > Andreas > > On Sun, Jul 4, 2010 at 19:46, Giambattista - WS wrote: > > 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: > > > xmlns:ax21="http://dao.dlsvc.ds.sisal.webscience.it/xsd" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > uuidprova > > > > > href="cid:1.urn:uuid:EC8D468B7D1E9D117A1278260857884@apache.org" > > xmlns:xop="http://www.w3.org/2004/08/xop/include"/> > > > > ...... > > > > while this is what the service returns with wsas 3.2.0: > > > xmlns:ax21="http://dao.dlsvc.ds.sisal.webscience.it/xsd" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > uuidprova > > 0 > > > > asdfasdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdfads > > > > .......... > > > > 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:DA769DE35388AA2ED61278264125206@apache.org>"; > > start-info="application/soap+xml"} OMOutputFormat [ mimeBoundary > > =MIMEBoundaryurn_uuid_DA769DE35388AA2ED61278264125205 > > rootContentId=0.urn:uuid:DA769DE35388AA2ED61278264125206@apache.org > > 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:DA769DE35388AA2ED61278264125206@apache.org > > 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.(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 > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org > > For additional commands, e-mail: java-dev-help@axis.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org > For additional commands, e-mail: java-dev-help@axis.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org