Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-457

AxiomSoapMessageFactory payloadCaching=false causes org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody() to fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.5
    • Fix Version/s: 1.5.6
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Spring 2.5.6, Windows xp, Jetty 6.1.11, apache.axiom 1.2.7, Soap UI, saaj-api and saaj-impl 1.3, jaxen 1.1

      Description

      http://forum.springframework.org/showthread.php?t=64350

      Hello,

      I have problem with AxiomSoapMessageFactory payloadCaching=false.

      Spring config is simple as this:

      <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
        <property name="payloadCaching" value="false"/>
      </bean>
       
      <bean class="org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping">
        <property name="mappings">
          <props>
            <prop key="SoapAction1">endpoint1</prop>
          </props>
        </property>
      </bean>
       
      <bean id="wsdl" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
        <property name="schema" ref="schema" />
        <property name="portTypeName" value="resource1" />
        <property name="locationUri" value="/service1/" />
        <property name="targetNamespace" value="my.service" />
        <property name="soapActions">
          <props>
            <prop key="UploadAddressMaterial">SoapAction1</prop>
          </props>
        </property>
      </bean>
       
      <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
        <property name="xsd" value="/WEB-INF/schema.xsd" />
      </bean>

      I'm not using any kind of interceptors.

      Actual ws end point extends AbstractStaxStreamPayloadEndpoint but the request doesn't get that far.

      I get exception "com.sun.jdi.InvocationException occurred invoking method." when trying to invoke the web service in method org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody().

      Line 59 SOAPBody axiomBody = getAxiomEnvelope().getBody(); fails some how and the OMException on line 71 is catched. This leads to:

      "Nested in org.springframework.ws.soap.axiom.AxiomSoapMessage Exception: Could not write message to OutputStream: problem accessing the parser. Parser already accessed!; nested exception is javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!:
      java.lang.IllegalStateException: Parser already accessed! "

      I am running spring ws v.1.5.5 and spring core 2.5.6.

      Everything works fine if payloadCaching is true.

      Is this a bug? There is a resolved Jira that looks much the same: id SWS-359

      1. screenshot-1.jpg
        151 kB
      2. screenshot-2.jpg
        207 kB

        Activity

        nikkeri Nikkeri2001 created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.6 [ 11141 ]
        arjen.poutsma Arjen Poutsma made changes -
        Description http://forum.springframework.org/showthread.php?t=64350

        Hello,

        I have problem with AxiomSoapMessageFactory payloadCaching=false.

        Spring config is simple as this:

        <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoap MessageFactory">
        <property name="payloadCaching" value="false"/>
        </bean>

        <bean class="org.springframework.ws.soap.server.endpoint .mapping.SoapActionEndpointMapping">
        <property name="mappings">
        <props>
        <prop key="SoapAction1">endpoint1</prop>
        </props>
        </property>
        </bean>

        <bean id="wsdl"
        class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
        <property name="schema" ref="schema" />
        <property name="portTypeName" value="resource1" />
        <property name="locationUri" value="/service1/" />
        <property name="targetNamespace" value="my.service" />
        <property name="soapActions">
        <props>
        <prop key="UploadAddressMaterial">SoapAction1</prop>
        </props>
        </property>
        </bean>

        <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
        <property name="xsd" value="/WEB-INF/schema.xsd" />
        </bean>


        I'm not using any kind of interceptors.

        Actual ws end point extends AbstractStaxStreamPayloadEndpoint but the request doesn't get that far.

        I get exception "com.sun.jdi.InvocationException occurred invoking method." when trying to invoke the web service in method org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody().

        Line 59 SOAPBody axiomBody = getAxiomEnvelope().getBody(); fails some how and the OMException on line 71 is catched. This leads to:

        "Nested in org.springframework.ws.soap.axiom.AxiomSoapMessage Exception: Could not write message to OutputStream: problem accessing the parser. Parser already accessed!; nested exception is javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!:
        java.lang.IllegalStateException: Parser already accessed! "



        I am running spring ws v.1.5.5 and spring core 2.5.6.

        Everything works fine if payloadCaching is true.

        Is this a bug? There is a resolved Jira that looks much the same: id SWS-359
        http://forum.springframework.org/showthread.php?t=64350

        Hello,

        I have problem with AxiomSoapMessageFactory payloadCaching=false.

        Spring config is simple as this:

        {code:xml}
        <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoap MessageFactory">
          <property name="payloadCaching" value="false"/>
        </bean>

        <bean class="org.springframework.ws.soap.server.endpoint .mapping.SoapActionEndpointMapping">
          <property name="mappings">
            <props>
              <prop key="SoapAction1">endpoint1</prop>
            </props>
          </property>
        </bean>

        <bean id="wsdl" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
          <property name="schema" ref="schema" />
          <property name="portTypeName" value="resource1" />
          <property name="locationUri" value="/service1/" />
          <property name="targetNamespace" value="my.service" />
          <property name="soapActions">
            <props>
              <prop key="UploadAddressMaterial">SoapAction1</prop>
            </props>
          </property>
        </bean>

        <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
          <property name="xsd" value="/WEB-INF/schema.xsd" />
        </bean>
        {code}

        I'm not using any kind of interceptors.

        Actual ws end point extends AbstractStaxStreamPayloadEndpoint but the request doesn't get that far.

        I get exception "com.sun.jdi.InvocationException occurred invoking method." when trying to invoke the web service in method org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody().

        Line 59 SOAPBody axiomBody = getAxiomEnvelope().getBody(); fails some how and the OMException on line 71 is catched. This leads to:

        "Nested in org.springframework.ws.soap.axiom.AxiomSoapMessage Exception: Could not write message to OutputStream: problem accessing the parser. Parser already accessed!; nested exception is javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!:
        java.lang.IllegalStateException: Parser already accessed! "



        I am running spring ws v.1.5.5 and spring core 2.5.6.

        Everything works fine if payloadCaching is true.

        Is this a bug? There is a resolved Jira that looks much the same: id SWS-359
        arjen.poutsma Arjen Poutsma made changes -
        Description http://forum.springframework.org/showthread.php?t=64350

        Hello,

        I have problem with AxiomSoapMessageFactory payloadCaching=false.

        Spring config is simple as this:

        {code:xml}
        <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoap MessageFactory">
          <property name="payloadCaching" value="false"/>
        </bean>

        <bean class="org.springframework.ws.soap.server.endpoint .mapping.SoapActionEndpointMapping">
          <property name="mappings">
            <props>
              <prop key="SoapAction1">endpoint1</prop>
            </props>
          </property>
        </bean>

        <bean id="wsdl" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
          <property name="schema" ref="schema" />
          <property name="portTypeName" value="resource1" />
          <property name="locationUri" value="/service1/" />
          <property name="targetNamespace" value="my.service" />
          <property name="soapActions">
            <props>
              <prop key="UploadAddressMaterial">SoapAction1</prop>
            </props>
          </property>
        </bean>

        <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
          <property name="xsd" value="/WEB-INF/schema.xsd" />
        </bean>
        {code}

        I'm not using any kind of interceptors.

        Actual ws end point extends AbstractStaxStreamPayloadEndpoint but the request doesn't get that far.

        I get exception "com.sun.jdi.InvocationException occurred invoking method." when trying to invoke the web service in method org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody().

        Line 59 SOAPBody axiomBody = getAxiomEnvelope().getBody(); fails some how and the OMException on line 71 is catched. This leads to:

        "Nested in org.springframework.ws.soap.axiom.AxiomSoapMessage Exception: Could not write message to OutputStream: problem accessing the parser. Parser already accessed!; nested exception is javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!:
        java.lang.IllegalStateException: Parser already accessed! "



        I am running spring ws v.1.5.5 and spring core 2.5.6.

        Everything works fine if payloadCaching is true.

        Is this a bug? There is a resolved Jira that looks much the same: id SWS-359
        http://forum.springframework.org/showthread.php?t=64350

        Hello,

        I have problem with AxiomSoapMessageFactory payloadCaching=false.

        Spring config is simple as this:

        {code:xml}
        <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
          <property name="payloadCaching" value="false"/>
        </bean>

        <bean class="org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping">
          <property name="mappings">
            <props>
              <prop key="SoapAction1">endpoint1</prop>
            </props>
          </property>
        </bean>

        <bean id="wsdl" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
          <property name="schema" ref="schema" />
          <property name="portTypeName" value="resource1" />
          <property name="locationUri" value="/service1/" />
          <property name="targetNamespace" value="my.service" />
          <property name="soapActions">
            <props>
              <prop key="UploadAddressMaterial">SoapAction1</prop>
            </props>
          </property>
        </bean>

        <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
          <property name="xsd" value="/WEB-INF/schema.xsd" />
        </bean>
        {code}

        I'm not using any kind of interceptors.

        Actual ws end point extends AbstractStaxStreamPayloadEndpoint but the request doesn't get that far.

        I get exception "com.sun.jdi.InvocationException occurred invoking method." when trying to invoke the web service in method org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody().

        Line 59 SOAPBody axiomBody = getAxiomEnvelope().getBody(); fails some how and the OMException on line 71 is catched. This leads to:

        "Nested in org.springframework.ws.soap.axiom.AxiomSoapMessage Exception: Could not write message to OutputStream: problem accessing the parser. Parser already accessed!; nested exception is javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!:
        java.lang.IllegalStateException: Parser already accessed! "



        I am running spring ws v.1.5.5 and spring core 2.5.6.

        Everything works fine if payloadCaching is true.

        Is this a bug? There is a resolved Jira that looks much the same: id SWS-359
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        arjen.poutsma Arjen Poutsma made changes -
        Attachment echo.zip [ 14976 ]
        nikkeri Nikkeri2001 made changes -
        Attachment nikkeri_echo.zip [ 14977 ]
        nikkeri Nikkeri2001 made changes -
        Attachment screenshot-1.jpg [ 14978 ]
        nikkeri Nikkeri2001 made changes -
        Attachment screenshot-2.jpg [ 14980 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            nikkeri Nikkeri2001
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: