Hi Amila,

I do not have the .NET service right now to try it out - but I am attaching a 
snapshot taken earlier of the request from the .NET service captured in tcpmon. 
From that, I see that the AppendChunkRequestElement has namespace= 
xmlns="http://ws.selectica.com/ecm/";

The if condition in AppendChunkRequestElement.java is "if 
(reader.isStartElement() && new 
javax.xml.namespace.QName("http://ws.selectica.com/ecm/","Offset";).equals(reader.getName()))"
 - it does not enter that if body. The else part does not do anything other 
than throw the above exception.


- Vish.

________________________________
From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 06, 2007 9:53 PM
To: [email protected]
Subject: Re: [Axis2] MTOM Exception with Axis2 1.3 
"org.apache.axis2.databinding.ADBException: Unexpected subelement Buffer"


On Dec 7, 2007 10:49 AM, Pantvaidya, Vishwajit <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]>> wrote:

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.
Does this match the namespce as well. if you go through the parse method you 
can see there is an if statement for this. does it go inside the if statement?
Can you paste that code?

thanks,
Amila.



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.



--
Amila Suriarachchi,
WSO2 Inc.
ÿþPOST /services/ECMServiceSoap HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; 
MSIE 6.0; MS Web Services Client 
Protocol 2.0.50727.832)

VsDebuggerCausalityData: 
uIDPo242r3BIgCJHgyYAItWj/TQAAAAAkDsMyewH8EyK4X1JF66yXsEqQ3YjS0JLpWZGJupV8/AACAAA

SOAPAction: ""

Host: 192.168.254.136:8099

Content-Type: multipart/related; 
type="application/xop+xml"; 
boundary=--MIMEBoundary633325621479434259;
 start="<[EMAIL PROTECTED]>"; 
start-info="text/xml; charset=utf-8"

Content-Length: 18184

Expect: 100-continue





----MIMEBoundary633325621479434259

content-id: <[EMAIL PROTECTED]>

content-type: application/xop+xml; 
charset=utf-8; type="text/xml; 
charset=utf-8"

content-transfer-encoding: binary



<soap:Envelope 
xmlns:xop="http://www.w3.org/2004/08/xop/include"
 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action></wsa:Action><wsa:MessageID>urn:uuid:ef214281-ae3e-437e-87ad-35795703b7e5</wsa:MessageID><wsa:ReplyTo><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:ReplyTo><wsa:To>http://192.168.254.136:8099/services/ECMServiceSoap</wsa:To><wsse:Security><wsu:Timestamp
 
wsu:Id="Timestamp-4f1c10ae-e242-4e35-b480-570b50990a88"><wsu:Created>2007-12-07T02:22:27Z</wsu:Created><wsu:Expires>2007-12-07T02:27:27Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><AppendChunkRequestElement
 
xmlns="http://ws.selectica.com/ecm/"><ClientWorkingFolderOnServer>GSOMINSKY-T40-gsominsky</ClientWorkingFolderOnServer><FileName>IBM1.pdf</FileName><Buffer><AttachmentData><xop:Include
 href="cid:[EMAIL PROTECTED]" 
/></AttachmentData></Buffer><Offset>0</Offset><BytesRead>16384</BytesRead></AppendChunkRequestElement></soap:Body></soap:Envelope>

----MIMEBoundary633325621479434259

content-id: <[EMAIL PROTECTED]>

content-type: application/octet-stream

content-transfer-encoding: binary



%PDF-1.3

%âãÏÓ

2 0 obj

<<

/CreationDate (D:20070914173320-07'00')

/ModDate (D:20070914173320-07'00')

/Producer (BCL easyPDF 5.00 \(0310\))

/Creator (BCL)

/Title (easyPDF SDK)

/Author (Your Name)

/Subject (Converter)

/Keywords (PDF)

>>

endobj



17 0 obj

[

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 778 778

250 333 408 500 500 833 778 180 333 333 
500 564 250 333 250 278

500 500 500 500 500 500 500 500 500 500 
278 278 564 564 564 444

921 722 667 667 722 611 556 722 722 333 
389 722 611 889 722 722

556 722 667 556 611 722 722 944 722 722 
611 333 278 333 469 500

333 444 500 444 500 444 333 500 500 278 
278 500 278 778 500 500

500 500 333 389 278 500 500 722 500 500 
444 480 200 480 541 778

500 778 333 500 444 1000 500 500 333 
1000 556 333 889 778 611 778

778 333 333 444 444 350 500 1000 333 
980 389 333 722 778 444 722

250 333 500 500 500 500 200 500 333 760 
276 500 564 333 760 500

400 549 300 300 333 576 453 250 333 300 
310 500 750 750 750 444

722 722 722 722 722 722 889 667 611 611 
611 611 333 333 333 333

722 722 722 722 722 722 722 564 722 722 
722 722 722 722 556 500

444 444 444 444 444 444 667 444 444 444 
444 444 278 278 278 278

500 500 500 500 500 500 500 549 500 500 
500 500 500 500 500 500

]

endobj



20 0 obj

[

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 778 778

250 333 555 500 500 1000 833 278 333 
333 500 570 250 333 250 278

500 500 500 500 500 500 500 500 500 500 
333 333 570 570 570 500

930 722 667 722 722 667 611 778 778 389 
500 778 667 944 722 778

611 778 722 556 667 722 722 1000 722 
722 667 333 278 333 581 500

333 500 556 444 556 444 333 500 556 278 
333 556 278 833 556 500

556 556 444 389 333 556 500 722 500 500 
444 394 220 394 520 778

500 778 333 500 500 1000 500 500 333 
1000 556 333 1000 778 667 778

778 333 333 500 500 350 500 1000 333 
1000 389 333 722 778 444 722

250 333 500 500 500 500 220 500 333 747 
300 500 570 333 747 500

400 549 300 300 333 576 540 250 333 300 
330 500 750 750 750 500

722 722 722 722 722 722 1000 722 667 
667 667 667 389 389 389 389

722 722 778 778 778 778 778 570 778 722 
722 722 722 722 611 556

500 500 500 500 500 500 722 444 444 444 
444 444 278 278 278 278

500 556 500 500 500 500 500 549 500 556 
556 556 556 500 556 500

]

endobj



23 0 obj

[

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 778 778

250 333 420 500 500 833 778 214 333 333 
500 675 250 333 250 278

500 500 500 500 500 500 500 500 500 500 
333 333 675 675 675 500

920 611 611 667 722 611 611 722 722 333 
444 667 556 833 667 722

611 722 611 500 556 722 611 833 611 556 
556 389 278 389 422 500

333 500 500 444 500 444 278 500 500 278 
278 444 278 722 500 500

500 500 389 389 278 500 444 667 444 444 
389 400 275 400 541 778

500 778 333 500 556 889 500 500 333 
1000 500 333 944 778 556 778

778 333 333 556 556 350 500 889 333 980 
389 333 667 778 389 556

250 389 500 500 500 500 275 500 333 760 
276 500 675 333 760 500

400 549 300 300 333 576 523 250 333 300 
310 500 750 750 750 500

611 611 611 611 611 611 889 667 611 611 
611 611 333 333 333 333

722 667 722 722 722 722 722 675 722 722 
722 722 722 556 611 500

500 500 500 500 500 500 667 444 444 444 
444 444 278 278 278 278

500 500 500 500 500 500 500 549 500 500 
500 500 500 444 500 444

]

endobj



26 0 obj

[

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 750 750

278 278 355 556 556 889 667 191 333 333 
389 584 278 333 278 278

556 556 556 556 556 556 556 556 556 556 
278 278 584 584 584 556

1015 667 667 722 722 667 611 778 722 
278 500 667 556 833 722 778

667 778 722 667 611 722 667 944 667 667 
611 278 278 278 469 556

333 556 556 500 556 556 278 556 556 222 
222 500 222 833 556 556

556 556 333 500 278 556 500 722 500 500 
500 334 260 334 584 750

556 750 222 556 333 1000 556 556 333 
1000 667 333 1000 750 611 750

750 222 222 333 333 350 556 1000 333 
1000 500 333 944 750 500 667

278 333 556 556 556 556 260 556 333 737 
370 556 584 333 737 552

400 549 333 333 333 576 537 278 333 333 
365 556 834 834 834 611

667 667 667 667 667 667 1000 722 667 
667 667 667 278 278 278 278

722 722 778 778 778 778 778 584 778 722 
722 722 722 667 667 611

556 556 556 556 556 556 889 500 556 556 
556 556 278 278 278 278

556 556 556 556 556 556 556 549 611 556 
556 556 556 500 556 500

]

endobj



28 0 obj

<< /Type /Annot

/Subtype /Link

/Rect [258 39 439 29]

/Border [0 0 0]

/A << /S /URI /URI 
(http://www.bcltechnologies.com/easypdf/)
 >>

>>

endobj



31 0 obj

<<

/Length 1713

/Filter /FlateDecode

>>

stream

xÚýÿWksÚFýί¸ã­<#Ëz! 
ß°KÒ¤±ã:"!}ýÿéÈbýÿmÅ.Y-&üû~»`,ÒÖ~±õؽÏsÎ]]M:
 o£.E4"!u¢ÜBüâ_& h²ìxÑ9MþêR&ýÿoýÿ$

’nFI`ÉEÄ×Qd}2¢ó& TçsçÊ"!Ë^: 9 za¬ §½°
2gõúÓÍÝï 
Ñ=ÝýÿÆx~¿¿Ñðúz4ÓðÝýht3ºýÿìÜî÷ö 
,¥¸±C8ýÿÙë¬ñØJ ÎAÜRÖÇrçp87B,& 
²t«rÆ/¢,H H$4"!v¼ÉBVt­ «µ" jN÷¢ÒkS& 
¨*¢’0 Gï1} ýýÙã9a+® S Êjzv# ¢Ñw<TyY»
9rDwÞ]nì¶±5ºÃßôñܧR¹& " Ü"dr 
KEcø4Î 
³?íÓu^Ê"!6JæçqÚó~(WSz¯SC+5{½ZWRqôç_iòáØÿM^,ø%r6+mÜxrºúC:
 ¿©8<GÜgïÏãØ»º9ã(íÂèõ|AÒV{Ë! :êe^Ñ! ¬ 
¾ä¶Â^TRä¦Xе+Ñq}QÑoÒ9 | c©Î§ôþ­­
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to