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 Gaƫl Pouzerate <ga...@pouzerate.com> on 2006/01/19 17:57:14 UTC

Re: WSDL2Java already contains type 'string Exception

Seem to me that this problem only occurs with AXIS2 v0.94.
Please try with 0.93 and see what happens... (worked for me!)


2006/1/19, Torsten Schmidt <ma...@gmx.de>:
> Hi,
>
> I don't know how to solve this with the types in the shema -
> if i generate the .xsd without the second part it generates without
> problems:
>
> 1. the exception
> 2. the .xsd
>
> 1.
>
> Retrieving document at 'parlayx_common_faults_2_0.wsdl'.
> Retrieving schema at 'parlayx_common_types_2_0.xsd', relative to
> 'file:/C:/-/-/-/-/-/-/-/Parlay X/annex/third_party_call/parlayx_common_faul
> ts_2_0.wsdl'.
> Retrieving schema at 'parlayx_common_types_2_0.xsd'.
> Retrieving schema at 'parlayx_third_party_call_types_2_0.xsd'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: *java.lang.RuntimeException: Schema for
> namespace 'http://www.csapi.org/schema/parlayx/thir
> d_party_call/v2_0' already contains type 'string*
>         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://www.csapi.org/schema/parlayx/third_party_call/v2_0' already
> contains type 'string*
>         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://www.csapi.org/schema/parlayx/third_party_call/v2_0' already
> contains type 'string
>         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
>
>
> 2. with the commented part there is no problem generating the code, but
> its generated without the stuff represented there...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- August 13, 2004 -->
> <xsd:schema
>
> targetNamespace="http://www.csapi.org/schema/parlayx/third_party_call/v2_0"
>
> xmlns:parlayx_third_party_call_xsd="http://www.csapi.org/schema/parlayx/third_party_call/v2_0"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>    <xsd:complexType name="CallInformation">
>       <xsd:sequence>
>          <xsd:element name="callStatus"
> type="parlayx_third_party_call_xsd:CallStatus"/>
>          <xsd:element name="startTime" type="xsd:dateTime"/>
>          <xsd:element name="duration" type="xsd:int"/>
>          <xsd:element name="terminationCause"
> type="parlayx_third_party_call_xsd:CallTerminationCause"/>
>       </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:simpleType name="CallStatus">
>       <xsd:restriction base="xsd:string">
>          <xsd:enumeration value="CallInitial"/>
>          <xsd:enumeration value="CallConnected"/>
>          <xsd:enumeration value="CallTerminated"/>
>       </xsd:restriction>
>    </xsd:simpleType>
>
>   <!-- <xsd:simpleType name="CallTerminationCause">
>       <xsd:restriction base="xsd:string">
>          <xsd:enumeration value="CallingPartyNoAnswer"/>
>          <xsd:enumeration value="CalledPartyNoAnswer"/>
>          <xsd:enumeration value="CallingPartyBusy"/>
>          <xsd:enumeration value="CalledPartyBusy"/>
>          <xsd:enumeration value="CallingPartyNotReachable"/>
>          <xsd:enumeration value="CalledPartyNotReachable"/>
>          <xsd:enumeration value="CallHangUp"/>
>          <xsd:enumeration value="CallAborted"/>
>       </xsd:restriction>
>    </xsd:simpleType> -->
> </xsd:schema>
>