It works fine for me with Axis 1.1 Here is a sample:
<schema targetNamespace="urn:my.domain" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType abstract="true" name="DeviceGroup"> <sequence> <element name="id" type="xsd:long"/> <element name="name" nillable="true" type="xsd:string"/> <element name="parentGroupName" nillable="true" type="xsd:string"/> <element name="creatorName" nillable="false" type="xsd:string"/> <element name="type" type="xsd:int"/> </sequence> </complexType> <complexType name="StaticDeviceGroup"> <complexContent> <extension base="tns1:DeviceGroup"> <sequence> <element name="devices" nillable="true" type="xsd:anyType"/> </sequence> </extension> </complexContent> </complexType> Christophe > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 09, 2004 8:51 AM > To: [EMAIL PROTECTED] > Subject: Re: "extension base" inheritance seems non-functional in > wsdl2java? > > Actually, it appears Axis is completely oblivious to the "<extension > base=.." tag. > I even tried to define : > <extension base="dummy:IDontExist"> > > and Axis doesn't even generate a warning! Seems to be there's a big > piece of Axis not implemented here, I think when they see this > definition, they just ignore it. > > So since I'm the first person on the planet to want to factorise and > re-use some of my complex objects among web services, how have you guys > been doing it? > For example if all web services return a complex object with parameter > "common1", "common2", and you want a web service to return > this common portion, but also a new parameter "specific1", do you > currently just duplicate every single wsdl you have? > > I was planning a usefull import statement to import this base type in > the wsdl, and then each web service can extend it as needed. > > wh > > [EMAIL PROTECTED] wrote: > > > Yes, sorry, it was just a copy paste error. > > The correct wsdl is : > > > > <xsd:complexType name="EmailResult"> > > <complexContent> > > <extension base="sdns:SDResult"> > > <xsd:all> > > <xsd:element name="Result" > > type="xsd:string"/> > > </xsd:all> > > </extension> > > </complexContent> > > </xsd:complexType> > > > > > > but the end result is the same. > > Does anyone have an example using a wsdl declaration like this that I > > can crib from? > > > > > > [EMAIL PROTECTED] wrote: > > > >> > >> If you copy and pasted this bit of XML, then you have an error. The > >> sequence element doesn't have a closing tag and there are two closing > >> tags for the extension element. However, I would have expected this > >> to show up as an error when running WSDL2Java. > >> > >> Tony > >> > >> > >> > >> I'm trying to factorise my wsdl descriptions for all our web services, > >> but as soon as I use the <extension base="..." the stubs which are > >> generated are completely empty. Is there some special magic option I > >> need to set, or is this functionality just not supported by Axis yet? > >> (using 1.1 beta) > >> The class I want to extend is not even generated by Axis (in the > example > >> below, the SDResult class) > >> > >> I'd appreciate any thoughts on where I'm going wrong. > >> > >> Here's my wsdl snippet : > >> > >> ... > >> <xsd:schema> > >> <xsd:complexType abstract="true" name="SDResult"> > >> <xsd:sequence> > >> <xsd:element name="SDId" > >> type="xsd:string"/> > >> <xsd:element name="SDIndex" > >> type="xsd:int"/> > >> <xsd:element name="SDMimeType" > >> type="xsd:string"/> > >> <xsd:element name="SDURL" > >> type="xsd:string"/> > >> <xsd:element name="SDStatus" > >> type="xsd:string"/> > >> <xsd:element name="SDMessage" > >> type="xsd:string"/> > >> </xsd:sequence> > >> </xsd:complexType> > >> > >> <xsd:complexType name="EmailResult"> > >> <complexContent> > >> <extension base="SDResult"> > >> <sequence> > >> <xsd:element > >> name="Result" type="xsd:string"/> > >> </extension> > >> </extension> > >> </complexContent> > >> </xsd:complexType> > >> </xsd:schema> > >> ... > >> > > > >