It seems that the problem only exists with AXIS2 0.94!!
I just tried with 0.93 and it works fine...

++
Gaël

2006/1/18, Torsten Schmidt <[EMAIL PROTECTED]>:
> Gaël Pouzerate schrieb:
>
> >Hi,
> >
> >I'm trying to run WSDL2Java (AXIS2 0.94) on a very simple WSDL file,
> >and I get a weird exception:
> >"Schema for namespace 'http://dmp/search/types' already contains type 'int"
> >
> >=> What is that supposed to mean?
> >
> >The WSDL File is the following:
> >-------------------------------------------------------
> ><?xml version="1.0" encoding="UTF-8"?>
> ><definitions
> > xmlns:tns="http://dmp"; xmlns="http://schemas.xmlsoap.org/wsdl/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:ns2="http://dmp/search/types";
> > name="DmpEndpoint"
> > targetNamespace="http://dmp";>
> >  <types>
> >    <schema
> >        xmlns:tns="http://dmp/search/types";
> >        xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/";
> >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >        xmlns="http://www.w3.org/2001/XMLSchema";
> >        targetNamespace="http://dmp/search/types";>
> >      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> >      <simpleType name="sexType">
> >        <restriction base="xsd:int">
> >          <enumeration value="0"/>
> >        </restriction>
> >      </simpleType>
> >      <simpleType name="deathType">
> >        <restriction base="xsd:int">
> >          <enumeration value="0"/>
> >        </restriction>
> >      </simpleType>
> >    </schema>
> >  </types>
> ></definitions>
> >-------------------------------------------------------
> >
> >If I remove one of the two "simpleType", then this error doesn't occur
> >anymore. (Note that I removed most of the file content to narrow the
> >problem).
> >
> >I didn't find anything in the mailing list archive or on google
> >regarding such a problem.
> >
> >Is anyone able to help me on that?
> >
> >Thanx
> >Gaël
> >
> >
> >PS: Full exception stack:
> >------------------------------------------------------
> >Exception in thread "main"
> >org.apache.axis2.wsdl.codegen.CodeGenerationException:
> >java.lang.RuntimeException: java.lang.RuntimeException: Schema for
> >namespace 'http://dmp/search/types' already contains type 'int
> >        at 
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:118)
> >        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31)
> >        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> >Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> >Schema for namespace 'http://dmp/search/types' already contains type
> > 'int
> >        at 
> > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:152)
> >        at 
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:80)
> >        ... 2 more
> >Caused by: java.lang.RuntimeException: Schema for namespace
> >'http://dmp/search/types' already contains type 'int
> >        at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237)
> >        at 
> > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98)
> >        at 
> > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233)
> >        at 
> > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:86)
> >        ... 3 more
> >
> >
> >
> >
> Hi,
> I have the same problem on a different type: string
>
> (@see mail subject: WSDL2Java Exception on valid WSDL)
>
> if you solve this problem please let me know how...
>
> thanx
>
>

Reply via email to