There are some bugs in wsdl2java that have to do with how elements/types are ordered in the schemas. In some circumstances, the symbol table is unable to resolve references to types that are defined "after" the reference in the parse tree. There's an item in bugzilla for this that is still open; the workaround is to reorder the type definitions. I can't recall the details, but look at the bugzilla report and you should find something to go on.
Eric -----Original Message----- From: Ley, Selena (GMI/CPR Dev.) [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 2:19 PM To: '[EMAIL PROTECTED]' Subject: Help re: referenced elements Hi. I'm trying to use the wsdl2java tool to create the java beans. The wsdl imports schemas that defines the elements. So I have an Organization schema with the following snippet:: <xs:import namespace = "http://namespace.worldnet.com/Datatypes/PartyDatatypes_v5_2/" schemaLocation = "file:///c:/schemas/Datatypes/PartyDatatypes_v5_2.xsd"/> {...defined below in Organization schema...} <xs:element name = "IntermediaryIndicator" type = "partyType:IntermediaryIndicator" /> Here's the snippet from the PartyDatatypes schema: <xs:element name = "IntermediaryIndicator" type = "tns:IntermediaryIndicator"/> <xs:simpleType name = "IntermediaryIndicator"> <xs:restriction base = "xs:token"> <xs:enumeration value = ""/> <xs:enumeration value = "N"/> <xs:enumeration value = "Y"/> <xs:maxLength value = "1"/> </xs:restriction> </xs:simpleType> However, when I try using wsdl2java to create the java beans, it gives me the snippet below. I've tried removing the element name declaration in the PartyDatatypes schema and just using the simpleType but that doesn't work either. However, if I change the simple type to be "IntermediaryIndicatorType" and have the Organization reference that new name, then it works. Am I defining the schemas incorrectly? thanks! --Selena java.io.IOException: Type {http://namespace.worldnet.com/Datatypes/PartyDatatypes_v5_2/}IntermediaryIn dicator is referenced but not defined. at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol Table.java:522) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422 ) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav a:408) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav a:393) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245) at java.lang.Thread.run(Unknown Source)
