axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pantvaidya, Vishwajit" <vpant...@selectica.com>
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 (https://issues.apache.org/jira/browse/AXIS2-3196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541070).

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
follows:


<s:complexType name="AttachmentType">

               <s:sequence>

                               <s:element maxOccurs="1" minOccurs="0" name="AttachmentData"
type="s:base64Binary"/>

               </s:sequence>

</s:complexType>

<s:element name="AppendChunkRequestElement">

               <s:complexType>

                               <s:sequence>

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

                                              <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"/>

                               </s:sequence>

               </s:complexType>

</s:element>

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?


Thanks,

Vish.

Mime
View raw message