You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andrew B <vi...@yahoo.com> on 2006/07/10 18:53:34 UTC
[Axis2] MTOM client example
Hi,
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
Re: [Axis2] MTOM client example
Posted by Thilina Gunarathne <cs...@gmail.com>.
Andrew,
hmmm.. Interesting... Give me some time to look in to this.
~Thilina
On 7/11/06, Andrew B <vi...@yahoo.com> wrote:
>
> Thilina,
>
> Thanks for the reply. Tried that option, and it didn't make any
> difference.
>
> The messages are as follows:
>
> Request:
>
> POST /axis2/services/TTWSServiceService HTTP/1.1
> User-Agent: Axis2
> SOAPAction: ""
> Authorization: Basic V0FMTUFSVDpXQUwxMjNNQVJU
> Host: 127.0.0.1:8888
> Transfer-Encoding: chunked
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031;
> type="application/xop+xml"; start="<
> 0.urn:uuid:53171FBA7FFC6984B711526347067032@apache.org>";
> start-info="text/xml"; charset=UTF-8
>
> 33e
> --MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031
> content-type:application/xop+xml; charset=UTF-8; type="text/xml";
> content-transfer-encoding:binary
> content-id:<0....@apache.org>
>
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
> /><soapenv:Body><TTIS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="VW_TrailerData_Request_Schema.xsd">
> <TRAILERDATATRNRQ>
> <TRNID>1111</TRNID>
> <TRAILERDATARQ>
> <TARGETASSETS>
> <TARGETALL>Y</TARGETALL>
> </TARGETASSETS>
> <GETLATESTDATA>Y</GETLATESTDATA>
> <COMPRESS>Y</COMPRESS>
> </TRAILERDATARQ>
> </TRAILERDATATRNRQ>
> </TTIS></soapenv:Body></soapenv:Envelope>
> --MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031--
> 0
>
>
> Response:
>
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1
> date=200510231054)/Tomcat-5.5
> Set-Cookie: JSESSIONID=8757EBE12760AF3DEEC3119F5A53ED3D; Path=/
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814;
> type="application/xop+xml"; start="<
> 0.urn:uuid:F5DB3E419AAC78B0F011526347677815@apache.org>";
> start-info="text/xml";charset=UTF-8
> Transfer-Encoding: chunked
> Date: Tue, 11 Jul 2006 16:19:27 GMT
>
> 275
> --MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814
> content-type:application/xop+xml; charset=UTF-8; type="text/xml";
> content-transfer-encoding:binary
> content-id:<0....@apache.org>
>
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
> /><soapenv:Body><ttws:CompressedXML xmlns:ttws="
> http://www.geassetintelligence.com"><xop:Include href="cid:
> 1.urn:uuid:F5DB3E419AAC78B0F011526347677816@apache.org" xmlns:xop="
> http://www.w3.org/2004/08/xop/include"
> /></ttws:CompressedXML></soapenv:Body></soapenv:Envelope>
> 2000
>
> --MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814
> content-id:<1....@apache.org>
> content-type:application/octet-stream
> content-transfer-encoding:binary
>
> xÅ"ì�moÛF¶ÇßßOAì‹Û765ùZ/ÆÃ"XbL‘*IYQ..Å kt´IÃ' [more
> binary .....]
> --MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814--
> 0
>
>
> Thanks,
>
> Andrew
>
>
>
> *Thilina Gunarathne <cs...@gmail.com>* wrote:
>
> Hi Andrew,
>
> Axis2 MTOM should work out of the box without much hassel if you have
> enabled MTOM on client side as follows.
>
> options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
>
> The way you are trying to receive the byte[] is correct.
>
> Can u post ur messsage snaphots. You can capture them using TCPMON.
>
> ~Thilina
>
>
> On 7/11/06, Andrew B <vi...@yahoo.com> 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 <mg...@hotmail.com>* 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 B <vi...@yahoo.com>
> > *To:* axis-user@ws.apache.org
> > *Sent:* Monday, July 10, 2006 12:53 PM
> > *Subject:* [Axis2] MTOM client example
> >
> > Hi,
> >
> > 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
> > <http://us.rd.yahoo.com/evt=42242/*http://advision.webevents.yahoo.com/handraisers>shows you when there are new messages.
> >
>
>
>
> --
> "May the SourcE be with u"
> http://webservices.apache.org/~thilina/<http://webservices.apache.org/%7Ethilina/>
> http://thilinag.blogspot.com/
> http://www.bloglines.com/blog/Thilina
>
>
> ------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
> starting at 1¢/min.
> <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com>
>
>
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina
Re: [Axis2] MTOM client example
Posted by Andrew B <vi...@yahoo.com>.
Thilina,
Thanks for the reply. Tried that option, and it didn't make any difference.
The messages are as follows:
Request:
POST /axis2/services/TTWSServiceService HTTP/1.1
User-Agent: Axis2
SOAPAction: ""
Authorization: Basic V0FMTUFSVDpXQUwxMjNNQVJU
Host: 127.0.0.1:8888
Transfer-Encoding: chunked
Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031; type="application/xop+xml"; start="<0....@apache.org>"; start-info="text/xml"; charset=UTF-8
33e
--MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031
content-type:application/xop+xml; charset=UTF-8; type="text/xml";
content-transfer-encoding:binary
content-id:<0....@apache.org>
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><TTIS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="VW_TrailerData_Request_Schema.xsd">
<TRAILERDATATRNRQ>
<TRNID>1111</TRNID>
<TRAILERDATARQ>
<TARGETASSETS>
<TARGETALL>Y</TARGETALL>
</TARGETASSETS>
<GETLATESTDATA>Y</GETLATESTDATA>
<COMPRESS>Y</COMPRESS>
</TRAILERDATARQ>
</TRAILERDATATRNRQ>
</TTIS></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_53171FBA7FFC6984B711526347067031--
0
Response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5
Set-Cookie: JSESSIONID=8757EBE12760AF3DEEC3119F5A53ED3D; Path=/
Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814; type="application/xop+xml"; start="<0....@apache.org>"; start-info="text/xml";charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 11 Jul 2006 16:19:27 GMT
275
--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814
content-type:application/xop+xml; charset=UTF-8; type="text/xml";
content-transfer-encoding:binary
content-id:<0....@apache.org>
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><ttws:CompressedXML xmlns:ttws="http://www.geassetintelligence.com"><xop:Include href="cid:1.urn:uuid:F5DB3E419AAC78B0F011526347677816@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include" /></ttws:CompressedXML></soapenv:Body></soapenv:Envelope>
2000
--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814
content-id:<1....@apache.org>
content-type:application/octet-stream
content-transfer-encoding:binary
xÅì�moÃF¶ÃÃÃOAìâ¹Ã765ùZ/ÃÃXbLâ*IYQ..Å kt´Ià [more binary .....]
--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814--
0
Thanks,
Andrew
Thilina Gunarathne <cs...@gmail.com> wrote: Hi Andrew,
Axis2 MTOM should work out of the box without much hassel if you have enabled MTOM on client side as follows.
options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
The way you are trying to receive the byte[] is correct.
Can u post ur messsage snaphots. You can capture them using TCPMON.
~Thilina
On 7/11/06, Andrew B <vi...@yahoo.com> 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 <mg...@hotmail.com> 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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: [Axis2] MTOM client example
Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi Andrew,
Axis2 MTOM should work out of the box without much hassel if you have
enabled MTOM on client side as follows.
options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
The way you are trying to receive the byte[] is correct.
Can u post ur messsage snaphots. You can capture them using TCPMON.
~Thilina
On 7/11/06, Andrew B <vi...@yahoo.com> 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 <mg...@hotmail.com>* 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 B <vi...@yahoo.com>
> *To:* axis-user@ws.apache.org
> *Sent:* Monday, July 10, 2006 12:53 PM
> *Subject:* [Axis2] MTOM client example
>
> Hi,
>
> 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<http://us.rd.yahoo.com/evt=42242/*http://advision.webevents.yahoo.com/handraisers>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
Re: [Axis2] MTOM client example
Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon Andrew-
The way I attempt to debug these situations is to start at the Macro Level and fine tune from there
services.xml
check the Inflow and Outflow parameters
The Outflow has class definitions (passwordCallbackClass) and properties files (sec.properties)
all of which have to be on the classpath
axis2.xml
Messages flowing in or out route thru the defined the respective messageReceiver where the respective classes have to be on the path
The same hold true for phases
Anyone else???
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 B
To: axis-user@ws.apache.org ; Martin Gainty
Sent: Monday, July 10, 2006 4:09 PM
Subject: Re: [Axis2] MTOM client example
Ah, you've got me there. I don't know what those things are - the MTOM documentation (http://ws.apache.org/axis2/1_0/mtom-guide.html) never mentioned any of that.
-Andrew
Martin Gainty <mg...@hotmail.com> wrote:
I would look at your outflow definitions for any missing handlers .can we take a look at module.xml
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 B
To: axis-user@ws.apache.org ; Martin Gainty
Sent: Monday, July 10, 2006 3:29 PM
Subject: Re: [Axis2] MTOM client example
Martin,
The stacktrace is:
java.net.UnknownServiceException
at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSourcejava: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 <mg...@hotmail.com> 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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: [Axis2] MTOM client example
Posted by Andrew B <vi...@yahoo.com>.
Ah, you've got me there. I don't know what those things are - the MTOM documentation (http://ws.apache.org/axis2/1_0/mtom-guide.html) never mentioned any of that.
-Andrew
Martin Gainty <mg...@hotmail.com> wrote: I would look at your outflow definitions for any missing handlers ..can we take a look at module.xml
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 B
To: axis-user@ws.apache.org ; Martin Gainty
Sent: Monday, July 10, 2006 3:29 PM
Subject: Re: [Axis2] MTOM client example
Martin,
The stacktrace is:
java.net.UnknownServiceException
at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSourcejava: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 <mg...@hotmail.com> 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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: [Axis2] MTOM client example
Posted by Martin Gainty <mg...@hotmail.com>.
I would look at your outflow definitions for any missing handlers ..can we take a look at module.xml
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 B
To: axis-user@ws.apache.org ; Martin Gainty
Sent: Monday, July 10, 2006 3:29 PM
Subject: Re: [Axis2] MTOM client example
Martin,
The stacktrace is:
java.net.UnknownServiceException
at javax.mail.internet.MimePartDataSource.getOutputStream(MimePartDataSourcejava: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 <mg...@hotmail.com> 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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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.
Re: [Axis2] MTOM client example
Posted by Andrew B <vi...@yahoo.com>.
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 <mg...@hotmail.com> 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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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.
Re: [Axis2] MTOM client example
Posted by Martin Gainty <mg...@hotmail.com>.
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 B
To: axis-user@ws.apache.org
Sent: Monday, July 10, 2006 12:53 PM
Subject: [Axis2] MTOM client example
Hi,
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