HttpSoapClientMarshaler marshaler = new HttpSoapClientMarshaler();
PostMethod method = new PostMethod(url);
method.addRequestHeader("Content-Type", "text/xml");
method.addRequestHeader("SOAPAction", "urn:xmethods-delayed-quotes#getQuote");
InOnly exchange = new InOnlyImpl("id");
NormalizedMessage in = exchange.createMessage();
exchange.setInMessage(in);
in.setContent(new StringSource("<?xml version='1.0'?><ns1:getQuote xmlns:ns1='urn:xmethods-delayed-quotes' xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:se='http://schemas.xmlsoap.org/soap/envelope/' se:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><symbol xsi:type='xsd:string'>SUNW</symbol></ns1:getQuote>"));
marshaler.fromNMS(method, exchange, in);
System.out.println(((StringRequestEntity) method.getRequestEntity()).getContent());
HttpClient httpClient = new HttpClient();
httpClient.executeMethod(method);
System.out.println(method.getResponseBodyAsString());
exchange = new InOnlyImpl("id");
in = exchange.createMessage();
exchange.setInMessage(in);
marshaler.toNMS(in, method);
Node node = new SourceTransformer().toDOMNode(new SourceTransformer().toStreamSource(in.getContent()));
System.out.println(new SourceTransformer().toString(node));