Hi Dear Axis Users.
I Have tested the sample given in AXIS 2 rel 1.0 : MTOMService /
imagetransfer
-> the client let us select a file, name it and post to the server.
-> the server is a MTOM implementation.
It works perfectly.
So, I modified a bit the Server Sample to handles in SOAP with
attachments. found in the user guide in this url
http://ws.apache.org/axis2/1_0/mtom-guide.html
Then I Used the client again, but targeting my modified service instead.
This sample is supposed to return us an instance of class Attachments
linking to attachments retrieved on mime.
The result is null.
When i log the OMElement received by the method, it looks like it is the
MTOM way
( my attachment is contained in a XML node ).
It looks like exactly as my service was configured to be implemented
with MTOM pattern.
Where to configure my service in order it to function the SWA way ?
I had no axis2.xml present. Is it a default behaviour that would make
MTOM by default in AXIS 2 rel 1.0 ?
My Server code modification consisted in what is following ( only to
make my method match the mtomSample element )
public void setOperationContext(OperationContext oc) throws AxisFault {
msgcts =
oc.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
}
public OMElement mtomSample(OMElement omEle) throws Exception {
System.out.println("here we are! " + omEle.toString()); //
MTOM like xml ( attachments by value )
Attachments attachment = (Attachments)
msgcts.getProperty(MTOMConstants.ATTACHMENTS);
System.out.println("attachment=" + attachment ); // null returned.
....
omEle.detach();
omEle.build();
return omEle;
}
Thanks alot for the time you have taken to read this mail.
Laurent CELLA
Inexbee Software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]