Hi all, found a problem with WSDL2Java if the WSDL file imports a quite complex import/include XML schema hierarchie. Checking the archives I didn't help in this case. To demostrate the problem look at the follwing hierarchie:
test.wsdl
import msg1.xsd // defines the message
import type_lib.xsdt // sets up a type library
include types_main.xsdt // here are the real types
.... // ... more
include fooBar.xsdt // even more
You find the files used for this test in the attachement.
Problem: WSDL2Java does not find a global type or element defined in
"types_main.xsdt". A similar test using a XML file that uses the same
hierarchie and name (also included) works perfectly when paresed with
xerces 2.0.2. I tried several namespace options, and other things but
the result was always the same.
Did I something wrong? Or is it a (known?) problem with WSDL2Java?
Here are the printouts of the test runs:
Result of xerces run (counter example but with valiadtion and scheam
validation switched on):
D:\wsdl_test>java sax.Counter -v -s test.xml
java sax.Counter -v -s test.xml
test.xml: 1011 ms (2 elems, 2 attrs, 0 spaces, 34 chars)
Result of WSDL2Java run:
D:\wsdl_test>java org.apache.axis.wsdl.WSDL2Java test.wsdl
java org.apache.axis.wsdl.WSDL2Java test.wsdl
java.io.IOException: Type {urn:typeIncludes}Data1 is referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:458)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:374)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:361)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:347)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:234)
at java.lang.Thread.run(Unknown Source)
regards,
Werner
Werner Dittmann
Siemens ICM N PG ES AS TP
mailto:[EMAIL PROTECTED]
Tel: +49(0)89 722 42481/+49(0)172 85 85 245
wsdl_test.zip
Description: Zip archive
