1 Reply Latest reply on Apr 2, 2014 5:14 AM by mcaserta

    Empty SOAP body

    mcaserta

      Hi there,

      we're experiencing some weird behavior with regard to a CXF JaxWS endpoint in jboss-fuse-6.0.0.redhat-024.

       

      From time to time, for no discernible reason, the endpoint gets deployed and started in a state such that it always returns an empty SOAP body response such as:

       

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

         <soap:Body/>

      </soap:Envelope>

       

      Otherwise, the service works as expected. It either gets deployed okay or it doesn't. The empty response doesn't seem to be related to changes in our codebase or even to the deployment environment (we've randomly and consistently experienced the same issue on Ubuntu, RHEL and OS X).

       

      I understand it's impossible to reproduce the issue without further info, but:

       

      • we were wondering if the behavior is due to a known bug that we haven't been able to track down in the forums/issue trackers/etc
      • we are willing to privately share our codebase for further investigation

       

      Anyway, the endpoint is exposed as a blueprint service like this:

       

          <camel-cxf:cxfEndpoint id="serviceEndpoint"

                                 address="${serviceEndpoint.server.url}"

                                 serviceClass="com.customer.wsdl.CustomerService">

              <camel-cxf:features>

                  <bean class="org.apache.cxf.feature.LoggingFeature"/>

              </camel-cxf:features>

              <camel-cxf:properties>

                  <entry key="dataFormat" value="PAYLOAD"/>

              </camel-cxf:properties>

          </camel-cxf:cxfEndpoint>

       

      The camel route looks like this:

       

              <route id="mainEntryPointRoute">

                  <from uri="cxf:bean:serviceEndpoint"/>

                  <bean ref="preMessageProcessor"/>

                  <to ref="amqJpaLogQueue" pattern="InOnly"/>

                  <process ref="ackProcessor"/>

              </route>

       

      The ackProcessor is implemented like this:

       

      public class AckProcessor implements Processor {

          @Override

          public void process(Exchange exchange) {

               String busId = exchange.getIn().getHeader("ourBusId", String.class);

              exchange.getIn().setBody(responder.process(busId));

          }

      }

       

      responder.process(...) returns an instance of the jaxb annotated class that implements the soap response. I am sure of this because I can see the right instance with the right values in the debugger, even when the serialized soap body results empty.

       

      We obviously don't exclude the possibility that we're doing something horribly wrong, in which case, please feel free to bash us

       

      Any help will be greatly appreciated. Thanks in advance.