Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Eclipse error during geneation of java source code from wsdl.
Eclipse error during geneation of java source code from wsdl. [message #535998] Wed, 26 May 2010 15:36
victor  is currently offline victor
Messages: 1
Registered: May 2010
Junior Member
Hi all, I'm using Linux, Eclipse Java EE 3.5.2 and axis2 1.3.

The concrete error is :

Quote:
Exception occurred during code generation for the WSDL : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException


My wsdl and the schema that imports are the following:

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="nuevo" targetNamespace="nuevo">



    <xs:complexType name="ParamsType">

        <xs:sequence>

            <xs:element name="MainParams" minOccurs="0" maxOccurs="1"/>

            <xs:element name="optParams" minOccurs="0" maxOccurs="1"/>

        </xs:sequence>

    </xs:complexType>



    <xs:complexType name="CQPIndexerParamsType">

        <xs:complexContent>

            <xs:restriction base="ParamsType">

                <xs:sequence>

                    <xs:element name="MainParams" type="CQPIndexerMainParamsType" minOccurs="0"

                        maxOccurs="1"/>

                    <xs:element name="optParams"/>

                </xs:sequence>

            </xs:restriction>

        </xs:complexContent>

    </xs:complexType>



    <xs:complexType name="CQPIndexerMainParamsType">

        <xs:sequence>

            <xs:element name="CQPCorpus" type="CQPCorpusType"/>

            <xs:element name="CQPCorpusStructure" type="CQPCorpusStructureType"/>

        </xs:sequence>

    </xs:complexType>

 

    <xs:simpleType name="LanguageISO639-iso-639-3-codeType">

        <xs:restriction base="xs:string">

            <xs:enumeration value="aaa">

                <xs:annotation>

                    <xs:appinfo>Ghotuo</xs:appinfo>

                </xs:annotation>

            </xs:enumeration>

            <xs:enumeration value="zzj">

                <xs:annotation>

                    <xs:appinfo>Zhuang</xs:appinfo>

                </xs:annotation>

            </xs:enumeration>

        </xs:restriction>

    </xs:simpleType>



    <xs:complexType name="TextType">

        <xs:choice>

            <xs:element name="string" type="xs:string"/>

            <xs:element name="file" type="xs:anyURI"/>

        </xs:choice>

    </xs:complexType>



    <xs:simpleType name="CQPCorpusType">

        <xs:restriction base="xs:string">

        </xs:restriction>

    </xs:simpleType>

    

    <xs:simpleType name="CQPCorpusStructureType">

        <xs:restriction base="xs:string">

        </xs:restriction>

    </xs:simpleType>

        

    <xs:element name="CQPIndexerParams" type="CQPIndexerParamsType"/>


</xs:schema>


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
			xmlns:xsd1="nuevo"
			xmlns:tns="http://www.example.org/new/" 
			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="new" targetNamespace="http://www.example.org/new/">
  <wsdl:types>
    <xsd:schema xmlns:Q1="nuevo" targetNamespace="http://www.example.org/new/">
            <xsd:import namespace="nuevo" schemaLocation="complex_types.xsd"></xsd:import>
            
            <xsd:element name="NewOperationResponse">
    		<xsd:complexType>
    			<xsd:sequence>
    				<xsd:element name="out" type="xsd:string" />
    			</xsd:sequence>
    		</xsd:complexType>
    	</xsd:element>

    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="NewOperationRequest">
    <wsdl:part element="xsd1:CQPIndexerParams" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="NewOperationResponse">
    <wsdl:part element="tns:NewOperationResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:portType name="new">
    <wsdl:operation name="NewOperation">
      <wsdl:input message="tns:NewOperationRequest"/>
      <wsdl:output message="tns:NewOperationResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="newSOAP" type="tns:new">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="NewOperation">
      <soap:operation soapAction="http://www.example.org/new/NewOperation"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="new">
    <wsdl:port binding="tns:newSOAP" name="newSOAP">
      <soap:address location="http://www.example.org/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Important fact: when no restriction are used the error doesn't raise and everything works fine. Is the case of the following schema (using the previous wsdl).

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="nuevo" targetNamespace="nuevo">



    <xs:complexType name="ParamsType">

        <xs:sequence>

            <xs:element name="MainParams" minOccurs="0" maxOccurs="1"/>

            <xs:element name="optParams" minOccurs="0" maxOccurs="1"/>

        </xs:sequence>

    </xs:complexType>



    <xs:complexType name="CQPIndexerParamsType">

        <xs:complexContent>

            <xs:restriction base="ParamsType">

                <xs:sequence>

                    <xs:element name="MainParams" type="CQPIndexerMainParamsType" minOccurs="0"

                        maxOccurs="1"/>

                    <xs:element name="optParams"/>

                </xs:sequence>

            </xs:restriction>

        </xs:complexContent>

    </xs:complexType>



    <xs:complexType name="CQPIndexerMainParamsType">

        <xs:sequence>

            <xs:element name="CQPCorpus" type="CQPCorpusType"/>

            <xs:element name="CQPCorpusStructure" type="CQPCorpusStructureType"/>

        </xs:sequence>

    </xs:complexType>



    <xs:simpleType name="LanguageISO639-iso-639-3-codeType">

        <xs:restriction base="xs:string">

            <xs:enumeration value="aaa">

                <xs:annotation>

                    <xs:appinfo>Ghotuo</xs:appinfo>

                </xs:annotation>

            </xs:enumeration>

            <xs:enumeration value="zzj">

                <xs:annotation>

                    <xs:appinfo>Zhuang</xs:appinfo>

                </xs:annotation>

            </xs:enumeration>

        </xs:restriction>

    </xs:simpleType>



    <xs:complexType name="TextType">

        <xs:choice>

            <xs:element name="string" type="xs:string"/>

            <xs:element name="file" type="xs:anyURI"/>

        </xs:choice>

    </xs:complexType>



    <xs:simpleType name="CQPCorpusType">

        <xs:restriction base="xs:string">

        </xs:restriction>

    </xs:simpleType>

    

    <xs:simpleType name="CQPCorpusStructureType">

        <xs:restriction base="xs:string">

        </xs:restriction>

    </xs:simpleType>

    

<!--  <xs:element name="CQPIndexerParams" type="CQPIndexerParamsType"/> -->

    <xs:element name="CQPIndexerParams" type="ParamsType"/>

</xs:schema>


Any ideas on what the problem could be?
Previous Topic:Javascript highlighting in CDATA content
Next Topic:Tomcat Server Startup Configuration
Goto Forum:
  


Current Time: Sun Oct 26 04:46:13 GMT 2014

Powered by FUDForum. Page generated in 0.01474 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software