Search code examples
weblogic-10.xspring-wssaajjdom-2

SpringWS2 and JDOM2 Webservice on Weblogic 10.3.5 - Request Element Texts are not bound


After deploying my Spring WS 2 Webservices (using JDOM2 Element as Parameter) on a Weblogic 10.3.5 Server, child Elements of the root Element - wich is the main parameter of my endpoint function - never contain TEXT-content.

Example:

Request XML (as sent)

<root foo="bar">
  <doo>dat</doo>
</root>

Request JDOM2 Element Structure (as presented in function)

<root foo="bar">
  <doo/>
</root>

This works fine in junit and on glassfish server. There is no special configuration for weblogic yet.

I suspect that some weblogic library might override the JDOM2 implementation, but I would really appreciate some input if You had simmilar experiences.

update

While debugging into the jdom2 implementation I found out, that Text is entering the DOMBuilder as "weblogic.xml.saaj.TextImpl". JDom is unable to extract the text.

Maybe someone has a hint how to prevent weblogic libraries from messing up the application... ?

(Thanks for the comment too)


Solution

  • I solved the problem by setting the SAAJ Message Factory to the Sun implementation:

    Using Maven dependency:

    <dependency>
      <groupId>com.sun.xml.messaging.saaj</groupId>
      <artifactId>saaj-impl</artifactId>
      <version>1.3.3</version><!-- or higher -->
    </dependency>
    

    Adding to Spring Configuration:

    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
      <property name="messageFactory">
        <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1_Impl"/>
      </property>
    </bean>