You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Rajeev Gupta <Ra...@Sun.COM> on 2006/05/08 00:10:11 UTC

Apache 1.3+ Question (possible bug)

  Hi There,

I am seeing this weird behavior with Axis 1.3 (and also Axis 1.4), where 
my client stubs are not generated correctly.

I have the following complex type in my WSDL file:

<complexType name="IDSessionData">
    <sequence>
        <element name="eSessionIdentifier" type="string" nillable="true"/>
        <element name="sessionIdentifier" type="string" nillable="true"/>
        <element name="userProfile" type="tns:IDUserProfile" 
nillable="true"/>
    </sequence>
</complexType>

<complexType name="IDUserProfile">
        <sequence>
           <element name="profileAttributes" type="tns:IDUserAttribute" 
nillable="true" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
</complexType>


Axis is not generating IDUserProfile class file on the client side at 
all. It's generating IDSessionData with an array of IDUserAttribute 
directly - looks like it's trying to optimize something.... or thinking 
of IDUserPrifile as an element. When I send a soapRequest with 
IDUserAttribute array as part of IDSessionData, the server doesn't 
understand that - which is obvious.

Any idea why this is happening? Is it because of a bad WSDL? or is it a 
bug in Axis 1.3 (and Axis 1.4)
Note: Axis 1.1 is working perfectly fine here....

Thanks,

-- 
Rajeev 



Re: Apache 1.3+ Question (possible bug)

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Rajeev,

The default behaviour has changed in Axis 1.3. Use WSDL2Java's 
--wrapArrays option to have the IDUserProfile class generated.

Regards,
Dies


Rajeev Gupta wrote:
>  Hi There,
> 
> I am seeing this weird behavior with Axis 1.3 (and also Axis 1.4), where 
> my client stubs are not generated correctly.
> 
> I have the following complex type in my WSDL file:
> 
> <complexType name="IDSessionData">
>    <sequence>
>        <element name="eSessionIdentifier" type="string" nillable="true"/>
>        <element name="sessionIdentifier" type="string" nillable="true"/>
>        <element name="userProfile" type="tns:IDUserProfile" 
> nillable="true"/>
>    </sequence>
> </complexType>
> 
> <complexType name="IDUserProfile">
>        <sequence>
>           <element name="profileAttributes" type="tns:IDUserAttribute" 
> nillable="true" minOccurs="0" maxOccurs="unbounded"/>
>        </sequence>
> </complexType>
> 
> 
> Axis is not generating IDUserProfile class file on the client side at 
> all. It's generating IDSessionData with an array of IDUserAttribute 
> directly - looks like it's trying to optimize something.... or thinking 
> of IDUserPrifile as an element. When I send a soapRequest with 
> IDUserAttribute array as part of IDSessionData, the server doesn't 
> understand that - which is obvious.
> 
> Any idea why this is happening? Is it because of a bad WSDL? or is it a 
> bug in Axis 1.3 (and Axis 1.4)
> Note: Axis 1.1 is working perfectly fine here....
> 
> Thanks,