users@jax-rpc.java.net

Re: Using base/subclass types in WSDL

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Tue, 18 Apr 2006 08:23:50 -0700

Try using the -f:searchschema option.

Ryan LeCompte wrote:

> Hello,
>
> Consider the following WSDL snippet which uses base/sub types:
>
>
> <xsd:complexType name="BaseType">
>
> <xsd:sequence>
>
> <xsd:element name="commonValue1" type="xsd:int" minOccurs="1"
> maxOccurs="1"/>
>
> <xsd:element name="commValue2" type="xsd:string" minOccurs="1"
> maxOccurs="1"/>
>
> </xsd:sequence>
>
> </xsd:complexType>
>
> <xsd:complexType name="SubTypeOne">
>
> <xsd:complexContent>
>
> <xsd:extension base="tns:BaseType">
>
> <xsd:sequence>
>
> <xsd:element name="subTypeValue1" type="xsd:string" minOccurs="1"
> maxOccurs="1"/>
>
> </xsd:sequence>
>
> </xsd:extension>
>
> </xsd:complexContent>
>
> </xsd:complexType>
>
> <xsd:complexType name="SubTypeTwo">
>
> <xsd:complexContent>
>
> <xsd:extension base="tns:BaseType">
>
> <xsd:sequence>
>
> <xsd:element name="subTypeValue2" type="xsd:string" minOccurs="0"
> maxOccurs="1"/>
>
> </xsd:sequence>
>
> </xsd:extension>
>
> </xsd:complexContent>
>
>
>
> When I run the above WSDL with .NET, all three classes are generated
> (BaseType, SubTypeOne, SubTypeTwo). However, when I pass it through
> wscompile with JWSDP 1.5, only "BaseType" is generated and it is not
> declared as "abstract" in the generated Java code. Is there something
> that I'm missing here? How do you get all the appropriate classes to
> be generated?
>
> Thanks,
>
> Ryan
>