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 Peter Len <pe...@earthlink.net> on 2005/06/22 16:10:20 UTC

Axis1.1 / Axis 1.2 IllegalArgumentException

Hello,

I am trying to run some tests to upgrade from Axis 1.1 to Axis 1.2 and 
have run into a problem.  My WSDL has the following:

<xs:complexType name="OntSearchResponseType">
    <xs:sequence>
            <xs:element name="id" type="ifis:SearchIdType"/>
            <xs:element name="result" type="ifis:OntResultType"/>
    </xs:sequence>
</xs:complexType>

<xs:simpleType name="SearchIdType">
    <xs:annotation>
        <xs:documentation>Per provider unique search id.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:positiveInteger"/>
</xs:simpleType>

When I run WSDL2Java under 1.1 a SearchIdType object is created but 
under Axis 1.2 it is not.

 In my test I have my client still running under Axis 1.1 with the Axis 
1.1 WSDL2Java generated objects (can't convert the client just yet 
because other modules are out of my control).  I have two servers 
running.  One is running the Axis 1.1 stuff and the other server is 
running Axis 1.2 with the Axis 1.2 WSDL2Java generated objects.

When I make a web service call from my client to the Axis 1.1 server the 
SOAP body being returned is:

<soapenv:Body 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
wsu:Id="id-30999846"> 
      <searchResponse xmlns="urn:ifis-wsdl">  
         <id xmlns="">1</id>  
         <result xmlns="" xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#" 
ns1:isStillProcessing="false" ns1:timestamp="2005-06-22T12:45:52.020Z"/>   
      </searchResponse>
   </soapenv:Body>

When I make a web service call from my client to the Axis 1.2 server the 
SOAP body being returned is:

<soapenv:Body 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
wsu:Id="id-1132857">
         <searchResponse xmlns="urn:ifis-wsdl">
            <id xmlns="" xsi:type="xsd:positiveInteger">1</id>
            <result xmlns="" 
xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#" 
ns1:isStillProcessing="false" ns1:timestamp="2005-06-22T12:54:28.191Z"/>
         </searchResponse>
      </soapenv:Body>

You can see that the Axis 1.2 server returned a slightly different 
version of the "id" element.  When hitting the Axis 1.2 server, my 
client ends up throwing an "IllegalArgumentException: argument type 
mismatch" error.  My thought is that when Axis (1.1) deserializes the 
SOAP Body on my client, it is having problems with this new version of 
the "id" element. 

Can anyone verify that this is what is causing the error?

Thanks - Peter








Re: Axis1.1 / Axis 1.2 IllegalArgumentException

Posted by Peter Len <pe...@earthlink.net>.
Solved.......

Even though the SearchIdType did not exist as an object after running 
WSDL2Java using Axis 1.2, there still was a typeMapping entry that got 
created (in the deploy.wsdd file) which I failed to add to my 
server-config.wsdd file.  Once I did that all was well.

Developer error.

Thanks - Peter

Peter Len wrote:

> Hello,
>
> I am trying to run some tests to upgrade from Axis 1.1 to Axis 1.2 and 
> have run into a problem.  My WSDL has the following:
>
> <xs:complexType name="OntSearchResponseType">
>     <xs:sequence>
>             <xs:element name="id" type="ifis:SearchIdType"/>
>             <xs:element name="result" type="ifis:OntResultType"/>
>     </xs:sequence>
> </xs:complexType>
>
> <xs:simpleType name="SearchIdType">
>     <xs:annotation>
>         <xs:documentation>Per provider unique search 
> id.</xs:documentation>
>     </xs:annotation>
>     <xs:restriction base="xs:positiveInteger"/>
> </xs:simpleType>
>
> When I run WSDL2Java under 1.1 a SearchIdType object is created but 
> under Axis 1.2 it is not.
>
>  In my test I have my client still running under Axis 1.1 with the 
> Axis 1.1 WSDL2Java generated objects (can't convert the client just 
> yet because other modules are out of my control).  I have two servers 
> running.  One is running the Axis 1.1 stuff and the other server is 
> running Axis 1.2 with the Axis 1.2 WSDL2Java generated objects.
>
> When I make a web service call from my client to the Axis 1.1 server 
> the SOAP body being returned is:
>
> <soapenv:Body 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
> wsu:Id="id-30999846"> 
>       <searchResponse xmlns="urn:ifis-wsdl">  
>          <id xmlns="">1</id>  
>          <result xmlns="" 
> xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#" 
> ns1:isStillProcessing="false" 
> ns1:timestamp="2005-06-22T12:45:52.020Z"/>   
>       </searchResponse>
>    </soapenv:Body>
>
> When I make a web service call from my client to the Axis 1.2 server 
> the SOAP body being returned is:
>
> <soapenv:Body 
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
> wsu:Id="id-1132857">
>          <searchResponse xmlns="urn:ifis-wsdl">
>             <id xmlns="" xsi:type="xsd:positiveInteger">1</id>
>             <result xmlns="" 
> xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#" 
> ns1:isStillProcessing="false" ns1:timestamp="2005-06-22T12:54:28.191Z"/>
>          </searchResponse>
>       </soapenv:Body>
>
> You can see that the Axis 1.2 server returned a slightly different 
> version of the "id" element.  When hitting the Axis 1.2 server, my 
> client ends up throwing an "IllegalArgumentException: argument type 
> mismatch" error.  My thought is that when Axis (1.1) deserializes the 
> SOAP Body on my client, it is having problems with this new version of 
> the "id" element. 
>
> Can anyone verify that this is what is causing the error?
>
> Thanks - Peter
>
>
>
>
>
>
>