I have a SOAP Client that works using WebServiceGatewaySupport
. And it works as expected: it sends and retrieves XML Messages perfectly with marshalling features. But, now I want to handle that XML Messages in my service. I can only log traced messages of WebServiceTemplate
. However, I need pure XML Messages that goes around the service. How to achieve that?
@Service
public class SampleGatewayClient extends WebServiceGatewaySupport {
...
public SampleGatewayClient() {
this.setMarshaller(marshaller);
this.setUnmarshaller(marshaller);
this.setDefaultUri(defaultUri);
}
...
private ResponseObject sendAndRetrieveMessage() {
...
// No control over sended and received messages!
return (ResponseObject) getWebServiceTemplate()
.marshalSendAndReceive(gatewayUri, requestPayload);
}
}