hi,
i'm not very familiar with XML Schema, but I think you need to specify a
targetnamespace
for PhoneNumber and MailAddress types.
mischa
Neulich, etwa am Montag, 17. M�rz 2003 16:49 meinten Fabien Guinet:
> Hello,
>
> The goal is to define a single method which could be interpreted
> differently on the server side depending on the object used (B or C).
> For example, I would like to define a type UserIdentifier which could be
> either a PhoneNumber or a MailAddress. I try to do this with the following
> types definition:
>
> <xsd:element name="UserIdentifier" type="PhoneNumber,
> MailAddress"/> <xsd:complexType name="PhoneNumber">
> <xsd:attribute name="PhoneNumber" type="xsd:string"
> use="optional"/>
> </xsd:complexType>
> <xsd:complexType name="MailAddress">
> <xsd:element name="MailAddress" type="xsd:string"/>
> </xsd:complexType>
>
> But when I'm creating my message with:
>
> <message name="sendRequest">
> <part name="userId" type="UserIdentifier"/>
> </message>
>
> And when I'm running WSDL2J, I get the following error:
>
> java.io.IOException: Type {urn:common}PhoneNumber is referenced but not
> defined.
> at
> org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.
>j ava:496)
> ...
>
> Is there an error in my type definition ? Is this the good way to reach the
> targeted behaviour ?
>
> In advance, many thanks for your help (because I'm a little bit lost :),
>
> Fabien