Axis2 MTOM should work out of the box without much hassel if you have enabled MTOM on client side as follows.
The way you are trying to receive the byte[] is correct.options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
Can u post ur messsage snaphots. You can capture them using TCPMON.
~Thilina
On 7/11/06, Andrew B <[EMAIL PROTECTED]> wrote:
Martin,
The stacktrace is:
java.net.UnknownServiceException
at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSource.java:57)
at ttaxis2client.TestClient.main(TestClient.java :73)
and the code is:
OMElement response = stub
.getData();
OMText binaryNode = (OMText) response.getFirstOMChild();
DataHandler dataHandler = (DataHandler) binaryNode
.getDataHandler();
DataSource ds = dataHandler.getDataSource();
ByteArrayOutputStream baos = (ByteArrayOutputStream) ds.getOutputStream();
byte[] compressedXML = baos.toByteArray();
Thanks,
Andrew
Martin Gainty <[EMAIL PROTECTED]> wrote:Andrew-Please post Stacktrace
Thanks
M-*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----From: Andrew BSent: Monday, July 10, 2006 12:53 PMSubject: [Axis2] MTOM client exampleHi,
Can anyone point me to an example of an Axis2 client that receives a byte array via MTOM? The Axis2 documentation shows how to get an image, not a byte array.
Thanks,
Andrew
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Why keep checking for Mail? The all-new Yahoo! Mail Beta shows you when there are new messages.
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina