axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pantvaidya, Vishwajit" <>
Subject [Axis2] MTOM Exception with Axis2 1.3 "org.apache.axis2.databinding.ADBException: Unexpected subelement Buffer"
Date Fri, 07 Dec 2007 05:19:28 GMT
I am using Axis2 1.3 to receive a pdf doc using MTOM from a .NET 2.0 WSE 3.0 C# client. I am
already using an axiom jar from a nightly build that has Thilina's patch (

I get the above error in the AppendChunkRequestElement class created by wsdl2java when it
tries to parse the MTOM request received from .NET. The .NET client creates a byte array and
sets it into the AttachmentData element. The complete request element is defined in wsdl as

<s:complexType name="AttachmentType">


                               <s:element maxOccurs="1" minOccurs="0" name="AttachmentData"



<s:element name="AppendChunkRequestElement">



                                              <s:element name="ClientWorkingFolderOnServer"

                                              <s:element name="FileName" type="s:string"/>

                                              <s:element name="Buffer" type="tns:AttachmentType"/>

                                              <s:element name="Offset" type="s:long"/>

                                              <s:element name="BytesRead" type="s:int"/>




After stepping thru the factory code I see that it parses Buffer and expects Offset next.
As far as I can see from Eclipse variables snapshot, the next element is Offset. But for some
reason it does not find it and throws above error.

Strangest thing is - I asked the .NET client guy to set a non-binary bytearray like byte[0]=0,byte[1]=1,
etc into AttachmentData element and send it thru' MTOM and then it works. Why does it not
work with the PDF file byte[].

Does the .NET client have to transform the file into a base64 encoded array before sending
it to me? Any other suggestions?



View raw message