Hi all, I would like using MTOM but i hava got exception during request in MTOM example shipped with xfire-1.2.5.
My enviroment: java 1.4.2_06 (tested with java 5.0_09 too) oc4j 10.1.2 xfire 1.2.5 I have replaced oc4j's activation.jar mail.jar and servlet.jar with activation-1.1.jar, mail-1.4.jar and servlet-api-2.3.jar I have added other libraries from xfire lib directory to lib directory and later to applib. MTOM example I have build with maven2 build script without any problems. (output is attached) Book example works fine too. MTOM example wsdl document was created on request that menas service is running When i tired run the client i got this exeption: 2007-04-05 14:06:22,718 ERROR [org.codehaus.xfire.transport.http.XFireServletController] - Couldn't invoke servlet request. java.io.IOException: Invalid content type: missing boundary! multipart/related; type="application/xop+xml"; start="<[EMAIL PROTECTED]>"; start-info="text/xml"; at org.codehaus.xfire.attachments.StreamedAttachments.<init>(StreamedAttachments.java:82) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:269) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129) at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:595) Request from client contains boundary section. Is it corect that the boundary attribute is in new line? all request: POST /mtom/services/MTOMService HTTP/1.1 SOAPAction: "" Content-Type: multipart/related; type="application/xop+xml"; start="<[EMAIL PROTECTED]>"; start-info="text/xml"; boundary="----=_Part_0_7791465.1175778379859" User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; XFire Client +http://xfire.codehaus.org) Host: localhost:8881 Expect: 100-continue Transfer-Encoding: chunked 3e3 ------=_Part_0_7791465.1175778379859 Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" Content-Transfer-Encoding: 8bit Content-ID: <[EMAIL PROTECTED]> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><stringFromBytes xmlns="http://xfire.codehaus.org/MTOMService"><in0 xmlns="http://xfire.codehaus.org/MTOMService" xmlns:ns1="http://www.w3.org/2004/11/xmlmime" ns1:mimeType="application/octet-stream"><Include xmlns="http://www.w3.org/2004/08/xop/include" href="cid:11757783798432-1982994078@http://www.w3.org/2001/XMLSchema" /></in0></stringFromBytes></soap:Body></soap:Envelope> ------=_Part_0_7791465.1175778379859 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-ID: <[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema> [EMAIL PROTECTED] ------=_Part_0_7791465.1175778379859-- 0 I am not able figure out where is problem. Is there other way to send SOAP with attachments in xfire? I am sure there is not other mail.jar file in lib, but how could i check that javaMail 1.4 is used? Just to be sure. I can't upgrade to other servlet container because of other dependencies and incompatibility. Thanks for help. Regards, Zdenek Vrablik
D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom>mvn install war:war [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'war'. [INFO] ---------------------------------------------------------------------------- [INFO] Building Maven Webapp Archetype [INFO] task-segment: [install, war:war] [INFO] ---------------------------------------------------------------------------- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [WARNING] POM for 'jaxen:jaxen:pom:1.1-beta-9:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. [WARNING] Artifact junit:junit:jar:3.8.1:test retains local scope 'test' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope. [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [WARNING] POM for 'jaxen:jaxen:pom:1.1-beta-9:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. [INFO] [compiler:testCompile] [INFO] No sources to compile [WARNING] POM for 'jaxen:jaxen:pom:1.1-beta-9:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. [INFO] [surefire:test] [INFO] No tests to run. [WARNING] POM for 'jaxen:jaxen:pom:1.1-beta-9:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. [INFO] [war:war] [INFO] Exploding webapp... [INFO] Assembling webapp xfire-mtom in D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom [INFO] Copy webapp webResources to D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom [INFO] Generating war D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom.war [INFO] Building war: D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom.war [INFO] [install:install] [INFO] Installing D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom.war to C:\Documents and Settings\zvrablik\.m2\repository\org\codehaus\xfire\examples\xfire-mtom\1.2.5\xfire-mtom-1.2.5.war [WARNING] POM for 'jaxen:jaxen:pom:1.1-beta-9:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. [INFO] [war:war] [INFO] Exploding webapp... [INFO] Assembling webapp xfire-mtom in D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom [INFO] Copy webapp webResources to D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom [INFO] Generating war D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom.war [INFO] Building war: D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom\target\xfire-mtom.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10 seconds [INFO] Finished at: Thu Apr 05 14:13:08 BST 2007 [INFO] Final Memory: 6M/11M [INFO] ------------------------------------------------------------------------ D:\install\SOAP\xfire-distribution-1.2.5\xfire-1.2.5\examples\mtom>
--------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email