You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tevoi Andrea <te...@cad.it> on 2002/11/15 17:33:27 UTC

WSDL2Java generator exception

hi all,

if i try to generate java classes from this wsdl that imports a schema axis throws this exception:

org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: c:\temp\wsdlvisitor\_this\ns\Myel.java.   Hint: you may have mapped two namespaces with elements of the same name to the same package name.
 	at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:140)
 	at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:144)
 	at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:287)
 	at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:356)
 	at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:281)
 	at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:80)
 	at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:244)
 	at java.lang.Thread.run(Thread.java:536)

It seems that if i define an element and a type with the same name (myel in this case) the exception is thrown.
Now, if i define two elements with the same name Axis generates two classes with different names (i.e. myel.java and myelType1.java).

any helps?

A.T.