axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajith Ranabahu" <ajith.ranab...@gmail.com>
Subject Re: [AXIS2] ADBException: Unexpected subelement contentType
Date Wed, 03 Oct 2007 18:48:03 GMT
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


Mime
View raw message