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:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Friday, November 02, 2007 4:25 PM
To: [email protected]
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:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Friday, November 02, 2007 4:12 PM
To: [email protected]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to