1 Reply Latest reply on Mar 31, 2010 4:49 PM by stefanrufer

    spring-ws SOAP response empty

      I am trying to deploy a spring-ws SOAP webservice in JBoss 5.1 (JDK 1.6.0_18, spring 2.5.6, spring-ws 1.5.9). I am using JAXB2 as O/X binding. Setup is fine, beans found and wired, requests can be sent and responses are generated. However, SoapUI tells me that the reponse is "empty". It neither is in a SOAP envelope nor contains my simple pingResponse any content that is assembled on the server.

       

      The correct response would be (generated with the same deployable in Tomcat 6.0.20):

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP-ENV:Header/>
          <SOAP-ENV:Body>
             <ns2:PingResponse xmlns:ns2="http://six-group.com/issuing-backoffice/schemas">
                <ns2:status>OK</ns2:status>
                <ns2:responseTime>0ms</ns2:responseTime>
             </ns2:PingResponse>
          </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

       

      But I just get something like:

      <Envelope>
          <Header/>
          <Body>
             <ns2:PingResponse xmlns:ns2="http://six-group.com/issuing-backoffice/schemas"/>
         </Body>
      </Envelope>

       

      Any hints appreciated.

       

      cu

      Stefan

        • 1. Re: spring-ws SOAP response empty

          Resolved: The JBoss SAAJ implementation has some issues, the following addition in the spring-ws application context resolves it:

           

          <bean id="messageFactory">
              <property name="messageFactory">

                  <!-- This is the Java 6 variant of this fix! Note the "internal" package missing in the spring-ws FAQ. -->
                  <bean class="com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"/>
              </property>
            </bean>

           

          See http://static.springsource.org/spring-ws/sites/1.5/faq.html#saaj-jboss for the hint. But you bet that was hard to find ;-)

           

          hope this helps

          Stefan