// Implementation methods
//-------------------------------------------------------------------------
protected void assertRequestUsingJBIAPIs(QName service) throws Exception {
InOut exchange = client.createInOutExchange();
NormalizedMessage inMessage = exchange.getInMessage();
inMessage.setProperty("name", "James");
inMessage.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
exchange.setService(service);
boolean answer = client.sendSync(exchange);
assertTrue("Should have successed", answer);
NormalizedMessage outMessage = exchange.getOutMessage();
assertNotNull("outMessage is null!", outMessage);
assertEquals("foo header", "hello", outMessage.getProperty("foo"));
log.info("Received result: " + outMessage.getContent());
log.info("XML is: " + transformer.toString(outMessage.getContent()));