* @param obj
* @return
*/
public Source invoke(Source obj) {
TestLogger.logger.debug(">> JAXB Provider Service: Request received.\n");
SendImage siRequest = null;
SendImageResponse siResponse = null;
StreamSource streamSource = null;
try {
//Create a request object
siRequest = new ObjectFactory().createSendImage();
//Unmarshall recieved Source to get request param.
JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");
Unmarshaller um = jbc.createUnmarshaller();
siRequest = (SendImage)um.unmarshal(obj);
//Create a response object
siResponse = new ObjectFactory().createSendImageResponse();
siResponse.setOutput(siRequest.getInput());
//Marshall the response object and create a StreamSource from the
//resulting byte array input stream
Marshaller m = jbc.createMarshaller();
ByteArrayOutputStream baos = new ByteArrayOutputStream();