Hi All,
My client is having axis1.x
SOAP client, who sends a file, for which I am suppose to write a Webservice. I have decided to use axis 2.0 for this service.
To get my axis 1.x SOAP client running with axis 2 SOAP Service, I was using following tutorial.
http://ws.apache.org/axis2/1_0/mtom-guide.html It says.
"Axis2 Handles SwA messages at the inflow only. When Axis2 receives a SwA message it extracts the binary attachment parts and puts a reference to those parts in the Message Context."
I understood this as following, if I send the SOAP message with attachment using axis1.x client to the axis2 webservice. Axis2 will extract the binary attachment and put an element into the xml like
<source href="cid:3936AE19FBED55AE4620B81C73BDD76E" xmlns="/>
and I can retrive this attachment from MessageContext.
But it does not work. The OMElement which I receive as a parameter to my serviceMethod do not have this source element into it. If I use following code given in tutorial.
public OMElement echoAttachment(OMElement omEle) {
OMElement child = (OMElement) omEle.getFirstOMChild(); or OMElement child = element.getFirstChildWithName(new QName("source"));
OMAttribute attr =
child.getAttribute(new QName("href"));
String contentID = attr.getAttributeValue();
..
Child element is always null(in case of both statements from the code snippet)
Can somebody help me here. Tutorial says above code has been tested with axis1.x can somebody send me the
test client in axis 1.x.
Thanks in advance.
-Prasad