Tag: Spring Web Services
-
Spring Web Services: Client Integration Testing with MockWebServiceServer
Spring Web Services provides a great way to perform web service client integration tests. However, the example in the documentation requires the client class to extend org.springframework.ws.client.core.support.WebServiceGatewaySupport, which is rather ugly. Instead, I prefer to have WebServiceTemplate injected into my client class. So, I made a slight tweak to my integration test to work this… Read More…
-
The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher
PROBLEM You get this error message when invoking a web service:- org.springframework.ws.soap.client.SoapFaultClientException: The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the… Read More…
-
Cannot process the message because the content type ‘application/soap+xml; charset=utf-8’ was not the expected type ‘text/xml; charset=utf-8’
PROBLEM You are getting this exception when invoking a web service:- org.springframework.ws.client.WebServiceTransportException: Cannot process the message because the content type ‘application/soap+xml; charset=utf-8’ was not the expected type ‘text/xml; charset=utf-8’. [415] SOLUTION You are using the wrong SOAP version. SOAP v1.1 uses text/xml while SOAP v1.2 uses application/soap+xml. If you are using Spring Web Services, add… Read More…
-
Using Spring Web Services and JAXB to Invoke Web Service Based on WSDL
There are several ways to consume a web service based on a WSDL from Java. After trying a couple of approaches, I’m currently leaning towards Spring Web Services and JAXB. The biggest advantage of using both Spring Web Services and JAXB to consume a web service is the flexibility to change the web service URL… Read More…