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:[EMAIL PROTECTED]>"; 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.urn:uuid:[EMAIL PROTECTED]>

<?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:[EMAIL PROTECTED]>"; 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.urn:uuid:[EMAIL PROTECTED]>

<?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="" xmlns:xop="http://www.w3.org/2004/08/xop/include" /></ttws:CompressedXML></soapenv:Body></soapenv:Envelope>
2000

--MIMEBoundaryurn_uuid_F5DB3E419AAC78B0F011526347677814
content-id:<1.urn:uuid:[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]> 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 <[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 B
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.

Reply via email to