+ "<soap:Body><GetPerson xmlns=\"http://camel.apache.org/wsdl-first/types\">"
+ "<personId>hello</personId></GetPerson></soap:Body></soap:Envelope>";
StringEntity entity = new StringEntity(body, ContentType.create("text/xml", "ISO-8859-1"));
post.setEntity(entity);
CloseableHttpClient httpclient = HttpClientBuilder.create().build();
try {
HttpResponse response = httpclient.execute(post);
assertEquals(200, response.getStatusLine().getStatusCode());
String responseBody = EntityUtils.toString(response.getEntity());
String correct = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body>"
+ "<GetPersonResponse xmlns=\"http://camel.apache.org/wsdl-first/types\">"
+ "<personId>hello</personId><ssn>000-000-0000</ssn><name>Bonjour</name></GetPersonResponse></soap:Body></soap:Envelope>";
assertEquals("Get a wrong response", correct, responseBody);
} finally {
httpclient.close();
}
}