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"'

Spring JIRA | Gerard Krupa | 4 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 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"'
  2. 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 '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()
    2. Spring WS Core
      MessageDispatcherServlet.doService
      1. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.getSoapEnvelopeNamespace(AxiomSoapMessageFactory.java:282)
      2. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createMultiPartAxiomSoapMessage(AxiomSoapMessageFactory.java:258)
      3. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:210)
      4. org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:81)
      5. org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:90)
      6. org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:86)
      7. org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:59)
      8. org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:221)
      8 frames
    3. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      2. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
      2 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
      1 frame