use of org.springframework.ws.soap.client.core.SoapActionCallback in project webservices-axiom by apache.
the class SecureEchoTest method runTest.
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document requestDocument = documentBuilder.newDocument();
Element request = requestDocument.createElementNS("urn:test", "p:Echo");
request.setTextContent("Hello");
Document responseDocument = documentBuilder.newDocument();
context.getBean(WebServiceTemplate.class).sendSourceAndReceiveToResult(new DOMSource(request), new SoapActionCallback("http://www.example.com/echo"), new DOMResult(responseDocument));
Element response = responseDocument.getDocumentElement();
assertEquals("urn:test", response.getNamespaceURI());
assertEquals("Echo", response.getLocalName());
assertEquals("Hello", response.getTextContent());
}
Aggregations