Dispatch<Object> dispatch = svc
.createDispatch(portName, jbc, Service.Mode.PAYLOAD, mtom);
//Create a request bean with imagedepot bean as value
ObjectFactory factory = new ObjectFactory();
SendImage request = factory.createSendImage();
request.setInput(imageDepot);
// The provider service returns the same image back if successful
SendImage response = (SendImage) dispatch.invoke(request);
assertTrue(response != null);
// Try again to verify
response = (SendImage) dispatch.invoke(request);