Search in sources :

Example 1 with JDOMSource

use of org.jdom2.transform.JDOMSource in project webservices-axiom by apache.

the class ClientServerTest method runTest.

@Override
protected void runTest() throws Throwable {
    JDOMSource source = new JDOMSource(new SAXBuilder().build(ClientServerTest.class.getResourceAsStream("request.xml")).getRootElement());
    JDOMResult result = new JDOMResult();
    context.getBean(WebServiceTemplate.class).sendSourceAndReceiveToResult(source, result);
    assertEquals(8.0d, Double.parseDouble(result.getDocument().getRootElement().getText()), 1e-6);
}
Also used : SAXBuilder(org.jdom2.input.SAXBuilder) JDOMResult(org.jdom2.transform.JDOMResult) JDOMSource(org.jdom2.transform.JDOMSource) WebServiceTemplate(org.springframework.ws.client.core.WebServiceTemplate)

Aggregations

SAXBuilder (org.jdom2.input.SAXBuilder)1 JDOMResult (org.jdom2.transform.JDOMResult)1 JDOMSource (org.jdom2.transform.JDOMSource)1 WebServiceTemplate (org.springframework.ws.client.core.WebServiceTemplate)1