Source response = dispatch.invoke(srcStream);
assertNotNull(response);
// Prepare the response content for checking
XMLStreamReader reader = inputFactory.createXMLStreamReader(response);
Reader2Writer r2w = new Reader2Writer(reader);
String responseText = r2w.getAsString();
TestLogger.logger.debug(responseText);
// Check to make sure the content is correct
assertTrue(!responseText.contains("soap"));
assertTrue(!responseText.contains("Envelope"));
assertTrue(!responseText.contains("Body"));
assertTrue(responseText.contains("echoStringResponse"));
// Invoke a second time to verify
stream = new ByteArrayInputStream(bytes);
srcStream = new StreamSource((InputStream) stream);
// Invoke the Dispatch<Source>
TestLogger.logger.debug(">> Invoking sync Dispatch with PAYLOAD mode");
response = dispatch.invoke(srcStream);
assertNotNull(response);
// Prepare the response content for checking
reader = inputFactory.createXMLStreamReader(response);
r2w = new Reader2Writer(reader);
responseText = r2w.getAsString();
TestLogger.logger.debug(responseText);
// Check to make sure the content is correct
assertTrue(!responseText.contains("soap"));
assertTrue(!responseText.contains("Envelope"));