axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barlotta, Michael [USA]" <barlotta_mich...@bah.com>
Subject RE: Axis1/1.4 Client to MTOM WebService
Date Mon, 05 Nov 2007 16:45:11 GMT
I added this code to my Serializer and got the call to work...
Thanks Thilina.

                        DataHandler dh = data.getBinaryData();
                        InputStream is = dh.getInputStream();
                        ByteArrayOutputStream baos =
IOHelper.getInputStreamAsBytes(is);
                        String b64 = Base64.encode(baos.toByteArray());
                        context.serialize(new QName("binaryData"), null,
b64, null, Boolean.TRUE, Boolean.FALSE);

Mike Barlotta
Associate
Booz | Allen | Hamilton

-----Original Message-----
From: Barlotta, Michael [USA] [mailto:barlotta_michael@bah.com
<mailto:barlotta_michael@bah.com> ]
Sent: Friday, November 02, 2007 4:25 PM
To: axis-user@ws.apache.org
Subject: RE: Axis1/1.4 Client to MTOM WebService

Thanks Thilina,

I thought I read MTOM support was added in Axis1...

If I understand correctly I need to base64 encode the bytes that are
read from a file and pass that to the JAFDataHandlerSerializer. Right?

What are my other options in Axis1 to get this to work given the WS
input required?

Thanks again,

Mike Barlotta
Associate
Booz | Allen | Hamilton

-----Original Message-----
From: Thilina Gunarathne [mailto:csethil@gmail.com
<mailto:csethil@gmail.com> ]
Sent: Friday, November 02, 2007 4:12 PM
To: axis-user@ws.apache.org
Subject: Re: Axis1/1.4 Client to MTOM WebService

Hi,
I"m not sure about the level of support for MTOM in Axis 1.4.. IIRC DIms
added some basic support some time back..

Looking at your code, you seems to be trying to send the binary data
inline only.. You need to make sure to base64 encode the binary data
when putting them inline...

But this approach will only work for smaller binary data only...

> Serializer jafs = new JAFDataHandlerSerializer(); jafs.serialize(new
> QName("binaryData"), null, data.getBinaryData(), context);
Make sure to base64 encode the above data...

~Thilina

<REMOVED EMAIL TRAIL>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message