>On 5/22/06, Laurent CELLA <[EMAIL PROTECTED]> wrote:
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 ).
MTOM is backward compatible with SwA. So we use MTOM to send SwA messages.
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 ?
Receiving of attachments will not be affected by any configurations. MTOM/SwA/non-optimised will be auto detected by Axis2 based on the content-type, and will be decoded accordingly.
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);
}
Change this to MESSAGE_LABEL_IN_VALUE
HTH,
~Thilina
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]
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
