You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Etienne Giraudy <eg...@gmail.com> on 2007/10/03 17:39:49 UTC

[AXIS2] ADBException: Unexpected subelement contentType

Hi,

I'm working on migrating a web service client from axis 1.4 to axis2 1.3.

With axis2 I have an issue with a complex type containing a
base64Binary element:

<xsd:complexType name="BinaryFile">
<xsd:sequence>
<xsd:element minOccurs="0" name="content" nillable="true"
type="xsd:base64Binary"/>
<xsd:element minOccurs="0" name="contentType" nillable="true"
type="xsd:string"/>
<xsd:element minOccurs="0" name="id" type="xsd:int"/>
<xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>


When the client fails with the following exception;

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement contentType
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
	at com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java:5805)

For testing, we did removed the base64binary element from the response
and the exception disappeared.


Is there a known issue in axis2 1.3 with that kind of complex types?


The client is generated from the wsdl with:
      <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
         <classpath refid="axis.classpath"/>
         <arg value="-uri"/>
         <arg file="${wsdl.path}/MyService.wsdl"/>
         <arg value="-o"/>
         <arg file="output"/>
         <arg value="-u"/>
      </java>


Thanks in advance
Etienne

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


Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Etienne Giraudy <eg...@gmail.com>.
Create an issue for this with wsdl, request and response.
see https://issues.apache.org/jira/browse/AXIS2-3259

Thanks,
Etienne

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Amila Suriarachchi <am...@gmail.com>.
On 10/4/07, Etienne Giraudy <eg...@gmail.com> wrote:
>
> Guys, thanks for your advices.
>
> FYI I don't have really hand on the server (and, oups, it's powered by
> XFire).
> MTOM is not activated by default.
>
>
> So I've not been able to change the
> sequence of element so that the base64binary comes in last.
> What I've been
> able to remove all other elements in order to only keep the base64binary one. In that case I'm able to receive the binary data without exception.
>
> Then I've activated MTOM both on the server and the client and in that
> case, everything runs smoothly (with the 4 elements in the response).
>
>
> Do I need to create a JIRA issue for the exception when in non MTOM mode?


yes. Please attach a sample wsdl (which could show your problem) and request
you send and response you get from the xfire server. Othewise we won't be
able to fix your problem.

Regards,
> Etienne
>
>
> On 10/4/07, Amila Suriarachchi <am...@gmail.com> wrote:
> >
> > Can you send your wsdl? and your request and responses.
> > have you enabled the MTOM or not?
> >
> > Amila.
> >
> > On 10/4/07,  Yogesh.Dhake@mizuhocbus.com < Yogesh.Dhake@mizuhocbus.com>
> > wrote:
> > >
> > >
> > > Hi
> > >
> > > I am bit new to Axis2 but I worked on SOAP / MTOM.    I think element
> > > type need to be xmime:base64Binary as shown in axis2 sample.
> > >
> > > Etienne if you are planning to use MTOM then Axis sample on MTOM is
> > > quite useful. See how you can define your "content"  element . I was
> > > succcessful in transferring file upto 1 GB in 67 sec  using MTOM.
> > >
> > > Let me know if you need more help
> > >
> > > Regards
> > > Yogesh
> > >
> > >
> > >
> > >
> > > *"Ajith Ranabahu" <ajith.ranabahu@gmail.com >*
> > >
> > > 10/03/2007 02:48 PM Please respond to
> > > axis-user@ws.apache.org
> > >
> > > To
> > > axis-user@ws.apache.org cc
> > >
> > > Subject
> > > Re: [AXIS2] ADBException: Unexpected subelement contentType
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hmm..
> > > It could be a bug. I'm thinking that since we have special treatment
> > > for base64Binary, the problem could be that. Can you try putting the
> > > base64Binary type as the last element of the sequence ? (I have a
> > > feeling that the issue could be  with something immediately following
> > > the base64bin type)
> > >
> > > Ajith
> > >
> > > On 10/3/07, Etienne Giraudy < egiraudy@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I'm working on migrating a web service client from axis 1.4 to axis2
> > > 1.3.
> > > >
> > > > With axis2 I have an issue with a complex type containing a
> > > > base64Binary element:
> > > >
> > > > <xsd:complexType name="BinaryFile">
> > > > <xsd:sequence>
> > > > <xsd:element minOccurs="0" name="content" nillable="true"
> > > > type="xsd:base64Binary"/>
> > > > <xsd:element minOccurs="0" name="contentType" nillable="true"
> > > > type="xsd:string"/>
> > > > <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> > > > <xsd:element minOccurs="0" name="name" nillable="true"
> > > type="xsd:string"/>
> > > > </xsd:sequence>
> > > > </xsd:complexType>
> > > >
> > > >
> > > > When the client fails with the following exception;
> > > >
> > > > org.apache.axis2.AxisFault:
> > > org.apache.axis2.databinding.ADBException :
> > > > Unexpected subelement contentType
> > > >         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> > > >         at com.foo.MyServiceStub.fromOM(
> > > KnowledgeBaseServiceStub.java:5805)
> > > >
> > > > For testing, we did removed the base64binary element from the
> > > response
> > > > and the exception disappeared.
> > > >
> > > >
> > > > Is there a known issue in axis2 1.3 with that kind of complex types?
> > > >
> > > >
> > > > The client is generated from the wsdl with:
> > > >       <java classname=" org.apache.axis2.wsdl.WSDL2Java"
> > > fork="true">
> > > >          <classpath refid="axis.classpath"/>
> > > >          <arg value="-uri"/>
> > > >          <arg file="${ wsdl.path}/MyService.wsdl"/>
> > > >          <arg value="-o"/>
> > > >          <arg file="output"/>
> > > >          <arg value="-u"/>
> > > >       </java>
> > > >
> > > >
> > > > Thanks in advance
> > > > Etienne
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Ajith Ranabahu
> > >
> > > Reading, after a certain age, diverts the mind too much from its
> > > creative pursuits. Any man who reads too much and uses his own brain
> > > too little falls into lazy habits of thinking - Albert Einstein
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > > *======================================================================================================
> > >
> > > This transmittal and any attachments may contain confidential,
> > > privileged or sensitive information and is solely for the use of the
> > > intended recipient. If you are not the intended recipient, you are hereby
> > > notified that you have received this transmittal and any attachments in
> > > error and any review, dissemination, distribution or copying thereof is
> > > strictly prohibited. If you have received this transmittal and any
> > > attachments in error please notify the sender and immediately destroy the
> > > message and all its attachments. Any opinions herein expressed may be those
> > > of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho
> > > Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of
> > > Mizuho Financial Group ("Mizuho"). Mizuho accepts no responsibility for the
> > > accuracy or completeness of any information herein contained.
> > > E-Mail received by or sent from officer of Mizuho Securities USA Inc.
> > > (which is a registered U.S. broker-dealer and the entity through which
> > > Mizuho generally conducts its investment banking, capital markets, and
> > > securities business in the United States) is electronically archived and
> > > recorded and is subject to review and monitoring by and/or disclosure to
> > > persons other than the recipient, including (but not limited to) Mizuho
> > > Securities USA Inc. supervisory personnel. Such communications may be
> > > produced to regulatory authorities or others with legal rights to the
> > > information. *
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Etienne Giraudy <eg...@gmail.com>.
Guys, thanks for your advices.

FYI I don't have really hand on the server (and, oups, it's powered by
XFire).
MTOM is not activated by default.


So I've not been able to change the
sequence of element so that the base64binary comes in last.
What I've been
able to remove all other elements in order to only keep the
base64binary one. In that case I'm able to receive the binary data
without exception.

Then I've activated MTOM both on the server and the client and in that case,
everything runs smoothly (with the 4 elements in the response).


Do I need to create a JIRA issue for the exception when in non MTOM mode?


Regards,
Etienne


On 10/4/07, Amila Suriarachchi <am...@gmail.com> wrote:
>
> Can you send your wsdl? and your request and responses.
> have you enabled the MTOM or not?
>
> Amila.
>
> On 10/4/07, Yogesh.Dhake@mizuhocbus.com <Yo...@mizuhocbus.com>
> wrote:
> >
> >
> > Hi
> >
> > I am bit new to Axis2 but I worked on SOAP / MTOM.    I think element
> > type need to be xmime:base64Binary as shown in axis2 sample.
> >
> > Etienne if you are planning to use MTOM then Axis sample on MTOM is
> > quite useful. See how you can define your "content"  element . I was
> > succcessful in transferring file upto 1 GB in 67 sec  using MTOM.
> >
> > Let me know if you need more help
> >
> > Regards
> > Yogesh
> >
> >
> >
> >
> > *"Ajith Ranabahu" <aj...@gmail.com>*
> >
> > 10/03/2007 02:48 PM Please respond to
> > axis-user@ws.apache.org
> >
> > To
> > axis-user@ws.apache.org cc
> >
> > Subject
> > Re: [AXIS2] ADBException: Unexpected subelement contentType
> >
> >
> >
> >
> >
> >
> > Hmm..
> > It could be a bug. I'm thinking that since we have special treatment
> > for base64Binary, the problem could be that. Can you try putting the
> > base64Binary type as the last element of the sequence ? (I have a
> > feeling that the issue could be  with something immediately following
> > the base64bin type)
> >
> > Ajith
> >
> > On 10/3/07, Etienne Giraudy <eg...@gmail.com> wrote:
> > > Hi,
> > >
> > > I'm working on migrating a web service client from axis 1.4 to axis2
> > 1.3.
> > >
> > > With axis2 I have an issue with a complex type containing a
> > > base64Binary element:
> > >
> > > <xsd:complexType name="BinaryFile">
> > > <xsd:sequence>
> > > <xsd:element minOccurs="0" name="content" nillable="true"
> > > type="xsd:base64Binary"/>
> > > <xsd:element minOccurs="0" name="contentType" nillable="true"
> > > type="xsd:string"/>
> > > <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> > > <xsd:element minOccurs="0" name="name" nillable="true"
> > type="xsd:string"/>
> > > </xsd:sequence>
> > > </xsd:complexType>
> > >
> > >
> > > When the client fails with the following exception;
> > >
> > > org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> > > Unexpected subelement contentType
> > >         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> > >         at com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java
> > :5805)
> > >
> > > For testing, we did removed the base64binary element from the response
> > > and the exception disappeared.
> > >
> > >
> > > Is there a known issue in axis2 1.3 with that kind of complex types?
> > >
> > >
> > > The client is generated from the wsdl with:
> > >       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
> > >          <classpath refid="axis.classpath"/>
> > >          <arg value="-uri"/>
> > >          <arg file="${wsdl.path}/MyService.wsdl"/>
> > >          <arg value="-o"/>
> > >          <arg file="output"/>
> > >          <arg value="-u"/>
> > >       </java>
> > >
> > >
> > > Thanks in advance
> > > Etienne
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Ajith Ranabahu
> >
> > Reading, after a certain age, diverts the mind too much from its
> > creative pursuits. Any man who reads too much and uses his own brain
> > too little falls into lazy habits of thinking - Albert Einstein
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > *======================================================================================================
> >
> > This transmittal and any attachments may contain confidential,
> > privileged or sensitive information and is solely for the use of the
> > intended recipient. If you are not the intended recipient, you are hereby
> > notified that you have received this transmittal and any attachments in
> > error and any review, dissemination, distribution or copying thereof is
> > strictly prohibited. If you have received this transmittal and any
> > attachments in error please notify the sender and immediately destroy the
> > message and all its attachments. Any opinions herein expressed may be those
> > of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho
> > Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of
> > Mizuho Financial Group ("Mizuho"). Mizuho accepts no responsibility for the
> > accuracy or completeness of any information herein contained.
> > E-Mail received by or sent from officer of Mizuho Securities USA Inc.
> > (which is a registered U.S. broker-dealer and the entity through which
> > Mizuho generally conducts its investment banking, capital markets, and
> > securities business in the United States) is electronically archived and
> > recorded and is subject to review and monitoring by and/or disclosure to
> > persons other than the recipient, including (but not limited to) Mizuho
> > Securities USA Inc. supervisory personnel. Such communications may be
> > produced to regulatory authorities or others with legal rights to the
> > information. *
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Yo...@mizuhocbus.com.
Hi 

I have enabled MTOM on  client side and on service side as I am sending 
attachment in both direction.

1) Enable MTOM as per documentation.

2) My wsdl is too big & multiple sections  but here is snipet from WSDL 

Schema def ....
<xsd:schema 
        attributeFormDefault="qualified" elementFormDefault="qualified" 
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
                xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
                targetNamespace="http://mizuho.com/emis/ep/paraminfo"
                xmlns:par="http://mizuho.com/emis/ep/paraminfo">
xmlmime import...
<xsd:import namespace="http://www.w3.org/2005/05/xmlmime"
                              schemaLocation="xmlmime.xsd"  />
Actual attachment element.....
<xsd:complexType name="Attachment">
                <xsd:all>
                        <xsd:element name="binaryNode" type=
"xmime:base64Binary"
                                maxOccurs="1" minOccurs="0" />
                        <xsd:element name="size" type="xsd:decimal" 
maxOccurs="1"
                                minOccurs="0" />
                        <xsd:element name="checksum" type="xsd:decimal"
                                maxOccurs="1" minOccurs="0" />
                </xsd:all>
        </xsd:complexType>


SOAP request seen using TCP MON

POST /emisep/services/EMISEPService HTTP/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_E31D752EA8DCB78A471191441356647; 
type="application/xop+xml"; 
start="0.urn:uuid:E31D752EA8DCB78A471191441356648@apache.org"; 
start-info="application/soap+xml"; action="getFile"
User-Agent: Axis2
Host: 203.100.16.166:8082
Transfer-Encoding: chunked

61c
--MIMEBoundaryurn_uuid_E31D752EA8DCB78A471191441356647
Content-Type: application/xop+xml; charset=UTF-8; 
type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0....@apache.org>
   <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
         <soapenv:Body 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
            <ns1:getFileRequest 
xmlns:ns1="http://mizuho.com/emis/ep/paraminfo">
               <ns1:method>getFile</ns1:method>
               <ns1:parameters>
                  <ns1:FileDataInfo>
                     <ns1:fileExtension>txt</ns1:fileExtension>
                     <ns1:wildCardIndicator>N</ns1:wildCardIndicator>
                     <ns1:fileName>test1Meg</ns1:fileName>
                     <ns1:folderName>c:\TEMP</ns1:folderName>
                     <ns1:scriptName>*</ns1:scriptName>
                     <ns1:attachment>
                        <ns1:size>1231</ns1:size>
                        <ns1:checksum>1231</ns1:checksum>
                     </ns1:attachment>
                  </ns1:FileDataInfo>
               </ns1:parameters>
               <ns1:response>
                  <ns1:attachment>
                     <ns1:size>1231</ns1:size>
                     <ns1:checksum>1231</ns1:checksum>
                  </ns1:attachment>
                  <ns1:responseStatus>false</ns1:responseStatus>
                  <ns1:hasAttachment>true</ns1:hasAttachment>
                  <ns1:fileList>
                     <ns1:fileName>test.log</ns1:fileName>
                  </ns1:fileList>
                  <ns1:tableName>TableaNAme</ns1:tableName>
               </ns1:response>
               <ns1:EPInfo>
                  <ns1:node>
                     <ns1:name>sasdf</ns1:name>
                     <ns1:id>12</ns1:id>
                  </ns1:node>
                  <ns1:system>
                     <ns1:name>sasdf</ns1:name>
                     <ns1:id>12</ns1:id>
                  </ns1:system>
               </ns1:EPInfo>
               <ns1:currentInterface>
                  <ns1:name>sdfa</ns1:name>
                  <ns1:id>12</ns1:id>
               </ns1:currentInterface>
            </ns1:getFileRequest>
         </soapenv:Body>
 
</soapenv:Envelope>--MIMEBoundaryurn_uuid_E31D752EA8DCB78A471191441356647--0


Actual SOAP response  when seen thru TCPMON

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_BEA3504621155EBAFD1191441357256; 
type="application/xop+xml"; 
start="0.urn:uuid:BEA3504621155EBAFD1191441357257@apache.org"; 
start-info="application/soap+xml"; 
action="//schemas.xmlsoap.org/wsdl/EMISEPServicePortType/getFileResponse"
Transfer-Encoding: chunked
Date: Wed, 03 Oct 2007 19:55:57 GMT

5e1
--MIMEBoundaryurn_uuid_BEA3504621155EBAFD1191441357256
Content-Type: application/xop+xml; charset=UTF-8; 
type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0....@apache.org>
   <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
         <soapenv:Body>
            <ns1:getFileResponse 
xmlns:ns1="http://mizuho.com/emis/ep/paraminfo">
               <ns1:method>getFile</ns1:method>
               <ns1:parameters>
                  <ns1:FileDataInfo>
                     <ns1:fileExtension>txt</ns1:fileExtension>
                     <ns1:wildCardIndicator>N</ns1:wildCardIndicator>
                     <ns1:fileName>test1Meg</ns1:fileName>
                     <ns1:folderName>c:\TEMP</ns1:folderName>
                     <ns1:scriptName>*</ns1:scriptName>
                     <ns1:attachment>
                        <ns1:size>1231</ns1:size>
                        <ns1:checksum>1231</ns1:checksum>
                     </ns1:attachment>
                  </ns1:FileDataInfo>
               </ns1:parameters>
               <ns1:response>
                  <ns1:attachment>
                     <ns1:binaryNode>
                        <xop:Include 
href="cid:1.urn:uuid:BEA3504621155EBAFD1191441357258@apache.org" 
xmlns:xop="http://www.w3.org/2004/08/xop/include" />
                     </ns1:binaryNode>
                     <ns1:size>121</ns1:size>
                     <ns1:checksum>121</ns1:checksum>
                  </ns1:attachment>
                  <ns1:responseStatus>true</ns1:responseStatus>
                  <ns1:hasAttachment>true</ns1:hasAttachment>
               </ns1:response>
               <ns1:EPInfo>
                  <ns1:node>
                     <ns1:name>sasdf</ns1:name>
                     <ns1:id>12</ns1:id>
                  </ns1:node>
                  <ns1:system>
                     <ns1:name>sasdf</ns1:name>
                     <ns1:id>12</ns1:id>
                  </ns1:system>
               </ns1:EPInfo>
               <ns1:currentInterface>
                  <ns1:name>sdfa</ns1:name>
                  <ns1:id>12</ns1:id>
               </ns1:currentInterface>
            </ns1:getFileResponse>
         </soapenv:Body>
      </soapenv:Envelope>
38

--MIMEBoundaryurn_uuid_BEA3504621155EBAFD1191441357256
2000

Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-ID: 
      <1....@apache.org>Test Data 
.........................................................................................................Test 
Data 
v
Test Data 
.........................................................................................................
vTest Data 
.........................................................................................................Test 
Data 
.........................................................................................................Test 
Data 

DATA Deleted ..............................
Test Data 
......................................................................................................... 
 

38

--MIMEBoundaryurn_uuid_BEA3504621155EBAFD1191441357256
2
--
0


Regard
Yogesh Dhake








"Amila Suriarachchi" <am...@gmail.com> 
10/04/2007 01:36 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: [AXIS2] ADBException: Unexpected subelement contentType






Can you send your wsdl? and your request and responses.
have you enabled the MTOM or not?

Amila.

On 10/4/07, Yogesh.Dhake@mizuhocbus.com <Yo...@mizuhocbus.com> 
wrote:

Hi 

I am bit new to Axis2 but I worked on SOAP / MTOM.    I think element type 
need to be xmime:base64Binary as shown in axis2 sample. 

Etienne if you are planning to use MTOM then Axis sample on MTOM is quite 
useful. See how you can define your "content"  element . I was succcessful 
in transferring file upto 1 GB in 67 sec  using MTOM. 

Let me know if you need more help 

Regards 
Yogesh 




"Ajith Ranabahu" <aj...@gmail.com> 
10/03/2007 02:48 PM 

Please respond to
axis-user@ws.apache.org



To
axis-user@ws.apache.org 
cc

Subject
Re: [AXIS2] ADBException: Unexpected subelement contentType








Hmm..
It could be a bug. I'm thinking that since we have special treatment
for base64Binary, the problem could be that. Can you try putting the
base64Binary type as the last element of the sequence ? (I have a
feeling that the issue could be  with something immediately following
the base64bin type)

Ajith

On 10/3/07, Etienne Giraudy <eg...@gmail.com> wrote:
> Hi,
>
> I'm working on migrating a web service client from axis 1.4 to axis2 
1.3.
>
> With axis2 I have an issue with a complex type containing a
> base64Binary element:
>
> <xsd:complexType name="BinaryFile">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="content" nillable="true"
> type="xsd:base64Binary"/>
> <xsd:element minOccurs="0" name="contentType" nillable="true"
> type="xsd:string"/>
> <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> <xsd:element minOccurs="0" name="name" nillable="true" 
type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
>
> When the client fails with the following exception;
>
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement contentType
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>         at 
com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java:5805)
>
> For testing, we did removed the base64binary element from the response
> and the exception disappeared.
>
>
> Is there a known issue in axis2 1.3 with that kind of complex types?
>
>
> The client is generated from the wsdl with:
>       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>          <classpath refid="axis.classpath"/>
>          <arg value="-uri"/>
>          <arg file="${wsdl.path}/MyService.wsdl"/>
>          <arg value="-o"/>
>          <arg file="output"/>
>          <arg value="-u"/>
>       </java>
>
>
> Thanks in advance
> Etienne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own brain
too little falls into lazy habits of thinking - Albert Einstein

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


====================================================================================================== 

This transmittal and any attachments may contain confidential, privileged 
or sensitive information and is solely for the use of the intended 
recipient. If you are not the intended recipient, you are hereby notified 
that you have received this transmittal and any attachments in error and 
any review, dissemination, distribution or copying thereof is strictly 
prohibited. If you have received this transmittal and any attachments in 
error please notify the sender and immediately destroy the message and all 
its attachments. Any opinions herein expressed may be those of the author 
and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank 
(USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho 
Financial Group ("Mizuho"). Mizuho accepts no responsibility for the 
accuracy or completeness of any information herein contained. 
E-Mail received by or sent from officer of Mizuho Securities USA Inc. 
(which is a registered U.S. broker-dealer and the entity through which 
Mizuho generally conducts its investment banking, capital markets, and 
securities business in the United States) is electronically archived and 
recorded and is subject to review and monitoring by and/or disclosure to 
persons other than the recipient, including (but not limited to) Mizuho 
Securities USA Inc. supervisory personnel. Such communications may be 
produced to regulatory authorities or others with legal rights to the 
information. 



-- 
Amila Suriarachchi,
WSO2 Inc. 

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Amila Suriarachchi <am...@gmail.com>.
Can you send your wsdl? and your request and responses.
have you enabled the MTOM or not?

Amila.

On 10/4/07, Yogesh.Dhake@mizuhocbus.com <Yo...@mizuhocbus.com> wrote:
>
>
> Hi
>
> I am bit new to Axis2 but I worked on SOAP / MTOM.    I think element type
> need to be xmime:base64Binary as shown in axis2 sample.
>
> Etienne if you are planning to use MTOM then Axis sample on MTOM is quite
> useful. See how you can define your "content"  element . I was succcessful
> in transferring file upto 1 GB in 67 sec  using MTOM.
>
> Let me know if you need more help
>
> Regards
> Yogesh
>
>
>
>
>  *"Ajith Ranabahu" <aj...@gmail.com>*
>
> 10/03/2007 02:48 PM  Please respond to
> axis-user@ws.apache.org
>
>   To
> axis-user@ws.apache.org  cc
>
>  Subject
> Re: [AXIS2] ADBException: Unexpected subelement contentType
>
>
>
>
>
>
> Hmm..
> It could be a bug. I'm thinking that since we have special treatment
> for base64Binary, the problem could be that. Can you try putting the
> base64Binary type as the last element of the sequence ? (I have a
> feeling that the issue could be  with something immediately following
> the base64bin type)
>
> Ajith
>
> On 10/3/07, Etienne Giraudy <eg...@gmail.com> wrote:
> > Hi,
> >
> > I'm working on migrating a web service client from axis 1.4 to axis2 1.3
> .
> >
> > With axis2 I have an issue with a complex type containing a
> > base64Binary element:
> >
> > <xsd:complexType name="BinaryFile">
> > <xsd:sequence>
> > <xsd:element minOccurs="0" name="content" nillable="true"
> > type="xsd:base64Binary"/>
> > <xsd:element minOccurs="0" name="contentType" nillable="true"
> > type="xsd:string"/>
> > <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> > <xsd:element minOccurs="0" name="name" nillable="true"
> type="xsd:string"/>
> > </xsd:sequence>
> > </xsd:complexType>
> >
> >
> > When the client fails with the following exception;
> >
> > org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> > Unexpected subelement contentType
> >         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> >         at com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java
> :5805)
> >
> > For testing, we did removed the base64binary element from the response
> > and the exception disappeared.
> >
> >
> > Is there a known issue in axis2 1.3 with that kind of complex types?
> >
> >
> > The client is generated from the wsdl with:
> >       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
> >          <classpath refid="axis.classpath"/>
> >          <arg value="-uri"/>
> >          <arg file="${wsdl.path}/MyService.wsdl"/>
> >          <arg value="-o"/>
> >          <arg file="output"/>
> >          <arg value="-u"/>
> >       </java>
> >
> >
> > Thanks in advance
> > Etienne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Ajith Ranabahu
>
> Reading, after a certain age, diverts the mind too much from its
> creative pursuits. Any man who reads too much and uses his own brain
> too little falls into lazy habits of thinking - Albert Einstein
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> *
> ======================================================================================================
> This transmittal and any attachments may contain confidential, privileged
> or sensitive information and is solely for the use of the intended
> recipient. If you are not the intended recipient, you are hereby notified
> that you have received this transmittal and any attachments in error and any
> review, dissemination, distribution or copying thereof is strictly
> prohibited. If you have received this transmittal and any attachments in
> error please notify the sender and immediately destroy the message and all
> its attachments. Any opinions herein expressed may be those of the author
> and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank
> (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho
> Financial Group ("Mizuho"). Mizuho accepts no responsibility for the
> accuracy or completeness of any information herein contained.
> E-Mail received by or sent from officer of Mizuho Securities USA Inc.
> (which is a registered U.S. broker-dealer and the entity through which
> Mizuho generally conducts its investment banking, capital markets, and
> securities business in the United States) is electronically archived and
> recorded and is subject to review and monitoring by and/or disclosure to
> persons other than the recipient, including (but not limited to) Mizuho
> Securities USA Inc. supervisory personnel. Such communications may be
> produced to regulatory authorities or others with legal rights to the
> information.*
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Yo...@mizuhocbus.com.
Hi 

I am bit new to Axis2 but I worked on SOAP / MTOM.    I think element type 
need to be xmime:base64Binary as shown in axis2 sample.

Etienne if you are planning to use MTOM then Axis sample on MTOM is quite 
useful. See how you can define your "content"  element . I was succcessful 
in transferring file upto 1 GB in 67 sec  using MTOM.

Let me know if you need more help

Regards
Yogesh





"Ajith Ranabahu" <aj...@gmail.com> 
10/03/2007 02:48 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: [AXIS2] ADBException: Unexpected subelement contentType






Hmm..
It could be a bug. I'm thinking that since we have special treatment
for base64Binary, the problem could be that. Can you try putting the
base64Binary type as the last element of the sequence ? (I have a
feeling that the issue could be  with something immediately following
the base64bin type)

Ajith

On 10/3/07, Etienne Giraudy <eg...@gmail.com> wrote:
> Hi,
>
> I'm working on migrating a web service client from axis 1.4 to axis2 
1.3.
>
> With axis2 I have an issue with a complex type containing a
> base64Binary element:
>
> <xsd:complexType name="BinaryFile">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="content" nillable="true"
> type="xsd:base64Binary"/>
> <xsd:element minOccurs="0" name="contentType" nillable="true"
> type="xsd:string"/>
> <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> <xsd:element minOccurs="0" name="name" nillable="true" 
type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
>
> When the client fails with the following exception;
>
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement contentType
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>         at 
com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java:5805)
>
> For testing, we did removed the base64binary element from the response
> and the exception disappeared.
>
>
> Is there a known issue in axis2 1.3 with that kind of complex types?
>
>
> The client is generated from the wsdl with:
>       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>          <classpath refid="axis.classpath"/>
>          <arg value="-uri"/>
>          <arg file="${wsdl.path}/MyService.wsdl"/>
>          <arg value="-o"/>
>          <arg file="output"/>
>          <arg value="-u"/>
>       </java>
>
>
> Thanks in advance
> Etienne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own brain
too little falls into lazy habits of thinking - Albert Einstein

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



======================================================================================================
This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group (”Mizuho”). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained.
E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel.  Such communications may be produced to regulatory authorities or others with legal rights to the information.

Re: [AXIS2] ADBException: Unexpected subelement contentType

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hmm..
It could be a bug. I'm thinking that since we have special treatment
for base64Binary, the problem could be that. Can you try putting the
base64Binary type as the last element of the sequence ? (I have a
feeling that the issue could be  with something immediately following
the base64bin type)

Ajith

On 10/3/07, Etienne Giraudy <eg...@gmail.com> wrote:
> Hi,
>
> I'm working on migrating a web service client from axis 1.4 to axis2 1.3.
>
> With axis2 I have an issue with a complex type containing a
> base64Binary element:
>
> <xsd:complexType name="BinaryFile">
> <xsd:sequence>
> <xsd:element minOccurs="0" name="content" nillable="true"
> type="xsd:base64Binary"/>
> <xsd:element minOccurs="0" name="contentType" nillable="true"
> type="xsd:string"/>
> <xsd:element minOccurs="0" name="id" type="xsd:int"/>
> <xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
>
> When the client fails with the following exception;
>
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement contentType
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>         at com.foo.MyServiceStub.fromOM(KnowledgeBaseServiceStub.java:5805)
>
> For testing, we did removed the base64binary element from the response
> and the exception disappeared.
>
>
> Is there a known issue in axis2 1.3 with that kind of complex types?
>
>
> The client is generated from the wsdl with:
>       <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
>          <classpath refid="axis.classpath"/>
>          <arg value="-uri"/>
>          <arg file="${wsdl.path}/MyService.wsdl"/>
>          <arg value="-o"/>
>          <arg file="output"/>
>          <arg value="-u"/>
>       </java>
>
>
> Thanks in advance
> Etienne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own brain
too little falls into lazy habits of thinking - Albert Einstein

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