1

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)

elfwyn
  • 568
  • 2
  • 11
  • 33
  • 1
    I have checked and scanned the JDOM2 code, and can confirm that JDOM 2.x serialization should be working fine. I know this does not help solve the problem, but it should help focus the attention where the problem more likely is. Please keep this question updated as you work through it. – rolfl Oct 01 '12 at 14:57

1 Answers1

2

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>
elfwyn
  • 568
  • 2
  • 11
  • 33