Yeah.. We support both...
"MTOM specification is designed to be backward compatible with the SOAP with Attachments specification. Even though the representation is different, both technologies have the same wire format. We can safely assume that any SOAP with Attachments endpoint can accept a MTOM optimized messages and treat them as SOAP with Attachment messages - Any MTOM optimized message is a valid SwA message. Because of that Axis2 does not define a separate programming model or serialization for SwA. Users can use the MTOM programming model and serialization to send messages to SwA endpoints."
HTH,
~Thilina
On 1/18/06, Tony Dean <[EMAIL PROTECTED]> wrote:
Thanks...I will take a look at this. Just wanted to make sure that I am thinking on the right path.I thought axis2 was going to support both MTOM and SwA?
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 17, 2006 2:34 PM
To: axis-dev@ws.apache.org
Subject: Re: [AXIS2] attachments
I don't think there is an issue if Tony wants to access the MTOM attachments using pure OMElements..Hope following samples would help you...public OMElement mtomSample(OMElement element) throws Exception {
OMElement imageEle = element.getFirstElement();
OMElement imageName = (OMElement) imageEle.getNextOMSibling();
OMText binaryNode = (OMText) imageEle.getFirstOMChild();
String fileName = imageName.getText();
//Extracting the data and saving
DataHandler actualDH;
actualDH = (DataHandler)binaryNode.getDataHandler();//If you need to create completely new envelope then create a new OMElement with a OMText as a child and attach the DataHandler to it.return element; //this will preserve the attachment even in the response
}
Even in the case of SwA we can use the message context injection to retrieve the attachments at the service. But if the user needs to send them back, then he has to explicitly create a new OM tree and attach the attachments.* Axis2 supports sending MTOM only * // PLS refer to MTOM guide for more details on this.Thanks,~Thilina
On 1/18/06, Tony Dean <[EMAIL PROTECTED]> wrote:That's right. Access them for input and inject them into the output using available API.
-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 17, 2006 2:06 PM
To: axis-dev@ws.apache.org
Subject: Re: [AXIS2] attachments
:( http://issues.apache.org/jira/browse/AXIS2-372 :(
Please add your requirements to that issue or add another one.
Basically you need to access the attachments directly via an API from your service right?
-- dims
On 1/17/06, Tony Dean < [EMAIL PROTECTED]> wrote:
> Hi,
>
> I plan on using "org.apache.axis2.receivers.RawXMLINOutMessageReceiver" message receiver so that I can perform my own databinding with input/output messages using generic SOAPElement. How can I process attachments included on the request message as well as add attachments to the response if all that I have as input/output messages are SOAPElements?
>
> Thanks for your help.
>
> Tony Dean
> SAS Institute Inc.
> 919.531.6704
> [EMAIL PROTECTED]
>
> SAS... The Power to Know
> http://www.sas.com
>
>
--
Davanum Srinivas : http://wso2.com/blogs/
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina