Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.5 M1, 1.0.3
    • Component/s: XML
    • Labels:
      None
    • Environment:
      Windows XP, JDK 1.5

      Description

      I used the following configuration for accessing a web service:

      <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">

      <property name="defaultUri" value="http://anyURL"/>
      <property name="marshaller" ref="castorMarshaller"/>
      <property name="unmarshaller" ref="castorMarshaller"/>

      </bean>

      Due to the fact that the access occurs inside a JBoss running on JDK 1.5 I run into the problem that SAAJ is not available in the JDK and the JBoss version of the SAAJ-library led to SAAJ-version problems.

      So I switched to Axiom using the following:

      <bean id="axiom_MessageFactory" class="org.springframework.ws.soap.axiom.AxiomSoap MessageFactory">

      <property name="payloadCaching" value="true"/>

      </bean>
      <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">

      <constructor-arg ref="axiom_MessageFactory"/>
      <property name="defaultUri" value="http://anyURI"/>
      <property name="marshaller" ref="castorMarshaller"/>
      <property name="unmarshaller" ref="castorMarshaller"/>

      </bean>

      I have to access the web service three times. The first and second call were successful. The third failed with:
      Exception in thread "main" java.lang.NullPointerException

      at org.springframework.xml.stream.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:70)
      at org.springframework.xml.stream.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:50)
      at org.springframework.oxm.castor.CastorMarshaller.un marshalSaxReader(CastorMarshaller.java:286)
      at org.springframework.oxm.castor.CastorMarshaller.un marshalXmlStreamReader(CastorMarshaller.java:297)
      at org.springframework.oxm.AbstractMarshaller.unmarsh alStaxSource(AbstractMarshaller.java:301)
      at org.springframework.oxm.AbstractMarshaller.unmarsh al(AbstractMarshaller.java:125)
      at org.springframework.ws.support.MarshallingUtils.un marshal(MarshallingUtils.java:65)
      at org.springframework.ws.client.core.WebServiceTempl ate$2.extractData(WebServiceTemplate.java:275)
      at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:416)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 264)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 252)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 244)

      The NullPointerException does not help very much. But i switched the payloadCaching property to:

      <property name="payloadCaching" value="false"/>

      fixed it.

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Split bug into two separate bugs.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Split bug into two separate bugs.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing issues for 1.5.0 M1

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.0 M1

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              mhausl Michael Hausl
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: