Hello,
Its me again.... I have a few more questions about Attachments in SOAP.
I have the MTOM examples setup and working, uploading and downloading a binary
file. All good on that. Thanks!
So, now, Im trying to get the SOAP w/ Attachments examples working. I have
the UPLOAD example working,
but cant get the DOWNLOAD version working.
I have a couple questions:
1) I noticed you have a method signature like:
public OMElement getFile(OMElement element)
Why are you using OMElement as the argument and return value?
Couldn't you just send a String to request a specific file and return a String
with the ContentID specified for a reference to the attachment? Or even better
use a SwA reference, something like this in the WSDL:
<xs:element name="getFile">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="filename" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getFileResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true"
type="ref:swaRef"/>
</xs:sequence>
</xs:complexType>
</xs:element>
2) I noticed you use in your services.xml file:
<messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
Is there a reason you chose this class to be your receiver instead of:
<messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/> which is what the UPLOAD method uses in the SwA attachment method. 3) I was under the impression that the main difference between MTOM and SwA methods of attachment is that in the MTOM method, the encoded binary file is INSIDE the envelope of the message instead of outside of the envelope, yet, when I look at what is being transmitted, it looks like the binary file is still being sent as an attachment outside of the envelope no matter which method is used. Why is this? Am I not understading the differences correctly? __ Marc Lefebvre, Principle Software Engineer Akimeka, 1305 N. Holopono Street, Kihei, HI 96753 Phone: (808)442-7168, Email: [EMAIL PROTECTED] echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
