Iam able to upload the image using MTOM-XOP by value concept.After that I tried to upload the same image using MTOM-XOP by Reference concept (XOP:Include).Iam able to write the Client program and generates the OMElement and passing this to Service also.But Here i strucked.I don't know how to handle the Referenced image and writting into the specified folder.I searched on google but found many samples and solutions for By value concept and SWA concept.Please give me guidance or sample program for handling the OMElement at server side?
OMElement:
<fd:upload xmlns:fd="http://mtom.sample.com"><fd:fileName>dog</fd:fileName><fd:fileType>jpg</fd:fileType><fd:fileContent><axis2ns1:Include xmlns:axis2ns1="http://www.w3.org/2004/08/xop/include" href="dc88fd5aa40a7cbdd01c18b97c1202008f2f09ebaf2cf2f3@apache.org" /></fd:fileContent></fd:upload>
How to handle the href attribute and I found on solution that is
ArrayList<OMElement> xops =AttachmentUtils.findXopElements(element);
if (xops != null && xops.size() > 0) {
logFile("Found XOP:Include Elements\n");
}
QName href = new QName("","href");
Iterator<OMElement> itr = xops.iterator();
while (itr.hasNext()) {
OMElement xop = itr.next();
String cid = xop.getAttributeValue(href);
logFile("CID :"+cid+"\n");
}
But this part not executed at server side.Please give us guidance on this.
Thanks.