I successfully wrote a client for a WS which actually receive the SOAP response from a service endpoint I already have.

A first snippet is:

HttpUrlConnectionMessageSender messageSender = new HttpUrlConnectionMessageSender() {
@Override
public WebServiceConnection createConnection(String uri) throws IOException {
HttpUrlConnection createConnection = (HttpUrlConnection) super.createConnection(uri);
createConnection.getConnection().setRequestPropert y("SOAPAction", soapAction);
return createConnection;
}
};
webServiceTemplate.setMessageSender(messageSender) ;
webServiceTemplate.sendSourceAndReceiveToResult(re quest, result);

-----------------------
having declared:
javax.xml.transport.Source request
jacax.xml.transport.Result result
-----------------------

The problem is that the code works if I use:

result = new StreamResult(System.out);

but I need to use SAX in order to make another job.

Thanks in advance