-
Mar 28th, 2008, 12:51 PM
#1
WS client and SAXBuilder
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules