org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'text/html;charset=ISO-8859-1'

Spring JIRA | Philippe Mouawad | 9 years ago
  1. 0

    Hello, I use WebserviceTemplate configured <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"> <constructor-arg ref="messageFactory"/> <property name="checkConnectionForFault" value="true"></property> </bean>. As you can see, my server returns an error 500, but due to the code of hasError: return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage); hasError returns false. this code seems strange to me, if a 500 is returned the response might not be XML so unmarshalling will fail and it does: org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'text/html;charset=ISO-8859-1' at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:262) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createAxiomSoapMessage(AxiomSoapMessageFactory.java:224) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:196) at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:53) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:491) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:440) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:395) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:341) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:326) at com.kingfisher.product.wsclient.TestSpringWSClient.main(TestSpringWSClient.java:100) Related to http://jira.springframework.org/browse/SWS-137. Request: POST /TutorialWS/services/LocalProduct HTTP/1.1 Accept-Encoding: gzip Content-Type: text/xml; charset="UTF-8" SOAPAction: "" Cache-Control: no-cache Pragma: no-cache User-Agent: Java/1.4.2_12 Host: 127.0.0.1:9090 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 486 <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><v1:getLocatedProducts xmlns:v1="http://v1.product.ws.store.kingfisher.com" xmlns:xsd="http://data.v1.product.ws.store.kingfisher.com/xsd"><v1:param0><xsd:callType>1</xsd:callType><xsd:familyCode>1</xsd:familyCode><xsd:moduleCode>1</xsd:moduleCode><xsd:subFamilyCode>1</xsd:subFamilyCode></v1:param0></v1:getLocatedProducts></soapenv:Body></soapenv:Envelope> Response: HTTP/1.1 500 Erreur Interne de Servlet Server: Apache-Coyote/1.1 Content-Type: text/html;charset=ISO-8859-1 Content-Language: fr-FR Transfer-Encoding: chunked Date: Mon, 14 Apr 2008 17:06:47 GMT Connection: close <html><head><title>Apache Tomcat/4.1.36-LE-jdk14 - Rapport d'erreur</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Etat HTTP 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Rapport d'exception</p><p><b>message</b> <u></u></p><p><b>description</b> <u>Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NoClassDefFoundError: Test at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:535) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:198) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:545) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.NoClassDefFoundError: Test at com.kingfisher.product.ws.ProductWsMarshallingEndpoint.invokeInternal(ProductWsMarshallingEndpoint.java:58) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:131) at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:216) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) ... 37 more </pre></p><p><b>cause m�re</b> <pre>java.lang.NoClassDefFoundError: Test at com.kingfisher.product.ws.ProductWsMarshallingEndpoint.invokeInternal(ProductWsMarshallingEndpoint.java:58) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:131) at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:216) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:198) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:545) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:534) </pre></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/4.1.36-LE-jdk14</h3></body></html>

    Spring JIRA | 9 years ago | Philippe Mouawad
    org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'text/html;charset=ISO-8859-1'
  2. 0

    Hello, I use WebserviceTemplate configured <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"> <constructor-arg ref="messageFactory"/> <property name="checkConnectionForFault" value="true"></property> </bean>. As you can see, my server returns an error 500, but due to the code of hasError: return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage); hasError returns false. this code seems strange to me, if a 500 is returned the response might not be XML so unmarshalling will fail and it does: org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'text/html;charset=ISO-8859-1' at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:262) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createAxiomSoapMessage(AxiomSoapMessageFactory.java:224) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:196) at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:53) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:491) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:440) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:395) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:341) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:326) at com.kingfisher.product.wsclient.TestSpringWSClient.main(TestSpringWSClient.java:100) Related to http://jira.springframework.org/browse/SWS-137. Request: POST /TutorialWS/services/LocalProduct HTTP/1.1 Accept-Encoding: gzip Content-Type: text/xml; charset="UTF-8" SOAPAction: "" Cache-Control: no-cache Pragma: no-cache User-Agent: Java/1.4.2_12 Host: 127.0.0.1:9090 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 486 <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><v1:getLocatedProducts xmlns:v1="http://v1.product.ws.store.kingfisher.com" xmlns:xsd="http://data.v1.product.ws.store.kingfisher.com/xsd"><v1:param0><xsd:callType>1</xsd:callType><xsd:familyCode>1</xsd:familyCode><xsd:moduleCode>1</xsd:moduleCode><xsd:subFamilyCode>1</xsd:subFamilyCode></v1:param0></v1:getLocatedProducts></soapenv:Body></soapenv:Envelope> Response: HTTP/1.1 500 Erreur Interne de Servlet Server: Apache-Coyote/1.1 Content-Type: text/html;charset=ISO-8859-1 Content-Language: fr-FR Transfer-Encoding: chunked Date: Mon, 14 Apr 2008 17:06:47 GMT Connection: close <html><head><title>Apache Tomcat/4.1.36-LE-jdk14 - Rapport d'erreur</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Etat HTTP 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Rapport d'exception</p><p><b>message</b> <u></u></p><p><b>description</b> <u>Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NoClassDefFoundError: Test at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:535) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:198) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:545) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.NoClassDefFoundError: Test at com.kingfisher.product.ws.ProductWsMarshallingEndpoint.invokeInternal(ProductWsMarshallingEndpoint.java:58) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:131) at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:216) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) ... 37 more </pre></p><p><b>cause m�re</b> <pre>java.lang.NoClassDefFoundError: Test at com.kingfisher.product.ws.ProductWsMarshallingEndpoint.invokeInternal(ProductWsMarshallingEndpoint.java:58) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:131) at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:216) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:198) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:545) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:534) </pre></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/4.1.36-LE-jdk14</h3></body></html>

    Spring JIRA | 9 years ago | Philippe Mouawad
    org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'text/html;charset=ISO-8859-1'
  3. 0

    A SOAP request is sent with the following Content-Type header: {noformat} Content-Type: multipart/related; boundary="MIMEBoundary_697784e707e24f3b138e9522eb5c625fe5ba4ed126325b47"; type="application/xop+xml"; start="<0.797784e707e24f3b138e9522eb5c625fe5ba4ed126325b47@apache.org>"; start-info="application/xop+xml" {noformat} This is generated from Spring-WS/Axiom (version 1.2.11) using https://gist.github.com/1853883 plus the following: {code} template.marshalSendAndReceive(request, new SoapActionCallback(SOAP_ACTION_UPLOAD_DOCUMENT) { @Override public void doWithMessage(final WebServiceMessage message) throws IOException { super.doWithMessage(message); AxiomSoapMessage msg = (AxiomSoapMessage)message; OMOutputFormat fmt = new OMOutputFormat(); fmt.setCharSetEncoding("UTF-8"); fmt.setContentType(MTOMConstants.MTOM_TYPE); fmt.setDoOptimize(true); fmt.setSOAP11(true); msg.setOutputFormat(fmt); } }); {code} The Jaxb2Marshaller is configured with <property name="mtomEnabled" value="true"/> When the server receives this request, the following exception is thrown: {noformat} [21/01/13 18:07:47:177 GMT] 00000014 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[document-service]: org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'multipart/related; boundary="MIMEBoundary_729ef333846e300e9f705a8fa7136ea83f8863ac613c67d6"; type="application/xop+xml"; start="<0.629ef333846e300e9f705a8fa7136ea83f8863ac613c67d6@apache.org>"; start-info="application/xop+xml"' at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:282) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createMultiPartAxiomSoapMessage(AxiomSoapMessageFactory.java:258) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:210) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:81) at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:90) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:86) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:59) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:221) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) ... {noformat} This appears to be because AxiomSoapMessageFactory.getSoapEnvelopeNamespace() is expecting the Content-type header to contain either "text/xml" or "application/soap+xml" which isn't the case with Axiom's MTOM messages. I haven't tested directly with 2.0.5 but I expect the behaviour to be the same since AxiomSoapMessageFactory.getSoapEnvelopeNamespace() hasn't changed.

    Spring JIRA | 4 years ago | Gerard Krupa
    org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'multipart/related; boundary="MIMEBoundary_729ef333846e300e9f705a8fa7136ea83f8863ac613c67d6"; type="application/xop+xml"; start="<0.629ef333846e300e9f705a8fa7136ea83f8863ac613c67d6@apache.org>"; start-info="application/xop+xml"'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    AxiomSoapMessageCreationException: Unknown content type 'application/wsdl+xml'

    Stack Overflow | 2 years ago | Nick Foote
    org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'application/wsdl+xml'
  6. 0

    A SOAP request is sent with the following Content-Type header: {noformat} Content-Type: multipart/related; boundary="MIMEBoundary_697784e707e24f3b138e9522eb5c625fe5ba4ed126325b47"; type="application/xop+xml"; start="<0.797784e707e24f3b138e9522eb5c625fe5ba4ed126325b47@apache.org>"; start-info="application/xop+xml" {noformat} This is generated from Spring-WS/Axiom (version 1.2.11) using https://gist.github.com/1853883 plus the following: {code} template.marshalSendAndReceive(request, new SoapActionCallback(SOAP_ACTION_UPLOAD_DOCUMENT) { @Override public void doWithMessage(final WebServiceMessage message) throws IOException { super.doWithMessage(message); AxiomSoapMessage msg = (AxiomSoapMessage)message; OMOutputFormat fmt = new OMOutputFormat(); fmt.setCharSetEncoding("UTF-8"); fmt.setContentType(MTOMConstants.MTOM_TYPE); fmt.setDoOptimize(true); fmt.setSOAP11(true); msg.setOutputFormat(fmt); } }); {code} The Jaxb2Marshaller is configured with <property name="mtomEnabled" value="true"/> When the server receives this request, the following exception is thrown: {noformat} [21/01/13 18:07:47:177 GMT] 00000014 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[document-service]: org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'multipart/related; boundary="MIMEBoundary_729ef333846e300e9f705a8fa7136ea83f8863ac613c67d6"; type="application/xop+xml"; start="<0.629ef333846e300e9f705a8fa7136ea83f8863ac613c67d6@apache.org>"; start-info="application/xop+xml"' at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:282) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createMultiPartAxiomSoapMessage(AxiomSoapMessageFactory.java:258) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:210) at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:81) at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:90) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:86) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:59) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:221) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) ... {noformat} This appears to be because AxiomSoapMessageFactory.getSoapEnvelopeNamespace() is expecting the Content-type header to contain either "text/xml" or "application/soap+xml" which isn't the case with Axiom's MTOM messages. I haven't tested directly with 2.0.5 but I expect the behaviour to be the same since AxiomSoapMessageFactory.getSoapEnvelopeNamespace() hasn't changed.

    Spring JIRA | 4 years ago | Gerard Krupa
    org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException: Unknown content type 'multipart/related; boundary="MIMEBoundary_729ef333846e300e9f705a8fa7136ea83f8863ac613c67d6"; type="application/xop+xml"; start="<0.629ef333846e300e9f705a8fa7136ea83f8863ac613c67d6@apache.org>"; start-info="application/xop+xml"'

    Root Cause Analysis

    1. org.springframework.ws.soap.axiom.AxiomSoapMessageCreationException

      Unknown content type 'text/html;charset=ISO-8859-1'

      at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace()
    2. Spring WS Core
      WebServiceTemplate.sendSourceAndReceiveToResult
      1. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:262)
      2. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createAxiomSoapMessage(AxiomSoapMessageFactory.java:224)
      3. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:196)
      4. org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:53)
      5. org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:491)
      6. org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:440)
      7. org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:395)
      8. org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:341)
      9. org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:326)
      9 frames
    3. com.kingfisher.product
      TestSpringWSClient.main
      1. com.kingfisher.product.wsclient.TestSpringWSClient.main(TestSpringWSClient.java:100)
      1 frame