assertNotNull(jaxbResponse);
Envelope response = jaxbResponse.getValue();
assertNotNull(response);
assertNotNull(response.getBody());
EchoStringResponse echoStringResponse = (EchoStringResponse) response.getBody().getAny().get(0);
TestLogger.logger.debug(">> Response content: " + echoStringResponse.getEchoStringReturn());
assertTrue("[ERROR] - No content in response object", echoStringResponse.getEchoStringReturn() != null);
assertTrue("[ERROR] - Zero length content in response", echoStringResponse.getEchoStringReturn().length() > 0);
// Invoke a second time
// Create the callback for async responses
callback = new JAXBCallbackHandler<Object>();
// Invoke the Dispatch<Object> asynchronously
TestLogger.logger.debug(">> Invoking async(callback) Dispatch with JAX-B Parameter");
monitor = dispatchMessage.invokeAsync(request, callback);
while (!monitor.isDone()) {
TestLogger.logger.debug(">> Async invocation still not complete");
Thread.sleep(1000);
}
jaxbResponse = (JAXBElement<Envelope>) callback.getData();
assertNotNull(jaxbResponse);
response = jaxbResponse.getValue();
assertNotNull(response);
assertNotNull(response.getBody());
echoStringResponse = (EchoStringResponse) response.getBody().getAny().get(0);
TestLogger.logger.debug(">> Response content: " + echoStringResponse.getEchoStringReturn());
assertTrue("[ERROR] - No content in response object", echoStringResponse.getEchoStringReturn() != null);
assertTrue("[ERROR] - Zero length content in response", echoStringResponse.getEchoStringReturn().length() > 0);
}