.println(">>MTOM Invoking Dispatch<Object> with a binary payload");
}
// Send the image and process the response image
try {
SendImageResponse response = (SendImageResponse) dispatch.invoke(request);
if (null != result) {
if (response != null) {
result = result.concat("MTOM Dispatch Response received - " + response.getOutput().getImageData().getContentType());
} else {
result = result.concat("ERROR: MTOM Dispatch NULL Response received");
}
} else {
if (response != null) {
System.out.println(">>MTOM Response received");
System.out
.println(">>MTOM Writing returned image to dispatch_response.gif");
ImageDepot responseContent = response.getOutput();
processImageDepot(responseContent, "dispatch_response.gif");
} else {
System.out.println(">> [ERROR] - Response from the server was NULL");
}