0

In my project I created a webservice client with Spring Web Services (2.0.4.RELEASE).

The webServiceTemplate is defined in my spring config:

<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<bean id="wsClient" class="org.springframework.ws.client.core.WebServiceTemplate">
    <property name="marshaller" ref="marshaller" />
    <property name="unmarshaller" ref="marshaller" />
</bean>

When I call the service (wsClient.marshalSendAndReceive(...)) and it returns a SOAP fault the webservice client doesn't recognize it. It tries to marshall it and a ValidationException is thrown.

I looked at the Spring Web Service source code. In the WebServiceTemplate class exists a method protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response). But this method always returns false.

I already checked this question: Java Spring Web Service Client Fault Handling

The service sends the response with HTTP status code 500. So that is not the problem.

Does anybody have an idea how to solve this problem?

Thank you!

EDIT: The application runs on a Weblogic 10.3.5

Community
  • 1
  • 1
Sebi
  • 2,534
  • 2
  • 26
  • 28

1 Answers1

0

The problem was not Spring Web Services. It was our webservice returning an invalid response. :-/

What I learned from this problem:

Sebi
  • 2,534
  • 2
  • 26
  • 28