axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <>
Subject Re: Multiple import problem
Date Tue, 28 May 2002 18:03:51 GMT
It looks like you've run across a scenario we haven't covered.  I believe
we tested the case where WSDL is imported multiple times, but you have XML
files imported multiple times.  There's a subtle difference between how the
two are processed.  I'll take a look at this in the next couple days.

Russell Butek

"Sapozhnikov, Michael" <> on 05/28/2002 12:53:21 PM

Please respond to

To:    "''" <>
Subject:    Multiple import problem

I am using WSDL2Java tool (beta-2), trying to generate Java classes and run
into problem when one of my imported xsd has already been imported in
another xsd. Generally, the structure is similar to this:

MyWSDL. wsdl
        +-- import comp.xsd
                +--- import CompGlobals.xsd
                |               |
                |               +-- import OtherGlobals.xsd
                +--- import TableGlobals.xsd
                +--- import tbl1.xsd
                |               |
                |               +--- import TableGlobals.xsd
                +--- import tbl2.xsd
                |               |
                |               +--- import TableGlobals.xsd
                +--- import tblN.xsd
                                +--- import TableGlobals.xsd

tbl1...tblN files define types that refer to the types defined in
TableGlobals.xsd. The error occurs when WSDL2Java tool tries to look for
imports in tbl1.xsd and processes TableGlobals.xsd which was already
processed. Error message says that MyUserDefinedType already exists. (This
happens in SymbolTable.symbolTablePut method).

I tried to move definitions from TableGlobals to OtherGlobals and reference
OtherGlobals instead of TableGlobals in tbl1...tblN files, but this does
not work by the same reason.

The only work around I found so far is to comment out import statement in
all tbl1...tblN files. In this case WSDL2Java tool does not complain and
generates all Java source files for me, but this makes all tbl1...tblN
files invalid.

Another thing is that debug mode in this case did not help me, because this
exception happens before
if (bDebug) {   symbolTable.dump(System.out); } in Emitter.emit(...)
method. So I found helpful to have next code in method
in in its catch clause:

if (bDebug){

In this case at least dump is available and there is no need to debug
source code.
May be it worth including that bit of code?  And may be not only here.

Otherwise it is nice tool which I like better than JAX-RPC RI, which did
not work for me.


Michael Sapozhnikov

View raw message