Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2586

SOAPMessage.writeTo throws "IllegalStateException: XOP parameter not properly inlined" when called within JAX-WS handler.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • jbossws-native-3.1.0
    • jbossws-native
    • None

      Calling writeTo on a SoapMessage from within a JAX-WS handler handling an incoming message the following exception is thrown: -

      16:17:18,230 ERROR [STDERR] java.lang.IllegalStateException: XOP parameter not properly inlined
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.soap.SOAPMessageImpl.saveChanges(SOAPMessageImpl.java:253)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:309)
      16:17:18,231 ERROR [STDERR] at org.jboss.support.ws.handler.CustomHandler.handleMessage(CustomHandler.java:35)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:305)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:142)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:97)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:125)
      16:17:18,231 ERROR [STDERR] at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:201)

      This can be resolved by moving the following two lines within the ServiceEndpointInvoker to above the handler calls: -

      if (binding instanceof CommonSOAPBinding)
      XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());

              darran.lofthouse@redhat.com Darran Lofthouse
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: