1 Reply Latest reply on Jan 31, 2005 10:49 AM by Thomas Diesler

    Problem in Generation of WSDL

    Gurprit Singh Newbie

      HI IHave used Java2WSDL. I have multiple methods with same input ant output(i.e.) String. But there is an error in generated WSDL.

      It says
      duplicate "element" entity: "in0"

      Entry in Build.xml is

      
      <target name="wsdl" >
       <java classname="org.apache.axis.wsdl.Java2WSDL" fork="yes" dir="." classpathref="ant.classpath">
       <arg value="-l${service.url.investmentService}" /> <!-- service location -->
       <arg value="-sWrapInvestmentService" /> <!-- service port name -->
       <arg value="-o${wsdl.investment}" /> <!-- output wsdl filename -->
       <arg value="-uLITERAL" /> <!-- either LITERAL or ENCODED -->
       <arg value="-yDOCUMENT" />
      
       <arg value="-nhttp://www.skandia.co.uk/wrap/InvestmentWebService" />
       <arg value="uk.co.skandia.wraptools.investment.InvestmentService" /><!-- class-of-portType -->
       </java>
      
      


      The generated wsdl is

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://www.skandia.co.uk/wrap/InvestmentWebService" xmlns:impl="http://www.skandia.co.uk/wrap/InvestmentWebService" xmlns:intf="http://www.skandia.co.uk/wrap/InvestmentWebService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
       <wsdl:types>
       <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.skandia.co.uk/wrap/InvestmentWebService">
       <element name="in0" type="xsd:string"/>
       <element name="saveReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="deleteReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getAvailableFundFiltersReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getFundListReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getFundDetailsReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getFundPerformanceReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getProductCategoriesAndFundRangesReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getAssetClassesReturn" type="xsd:string"/>
       <element name="in0" type="xsd:string"/>
       <element name="getSectorPerformanceReturn" type="xsd:string"/>
       </schema>
       </wsdl:types>
      
       <wsdl:message name="getSectorPerformanceResponse">
      
       <wsdl:part name="getSectorPerformanceReturn" element="impl:getSectorPerformanceReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getSectorPerformanceRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="setAvailableFundFiltersRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="getFundListRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="setAvailableFundFiltersResponse">
      
       </wsdl:message>
      
       <wsdl:message name="getFundDetailsResponse">
      
       <wsdl:part name="getFundDetailsReturn" element="impl:getFundDetailsReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getAssetClassesRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="deleteRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="deleteResponse">
      
       <wsdl:part name="deleteReturn" element="impl:deleteReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getAssetClassesResponse">
      
       <wsdl:part name="getAssetClassesReturn" element="impl:getAssetClassesReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getFundPerformanceResponse">
      
       <wsdl:part name="getFundPerformanceReturn" element="impl:getFundPerformanceReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getProductCategoriesAndFundRangesResponse">
      
       <wsdl:part name="getProductCategoriesAndFundRangesReturn" element="impl:getProductCategoriesAndFundRangesReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getProductCategoriesAndFundRangesRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="getFundDetailsRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="getFundListResponse">
      
       <wsdl:part name="getFundListReturn" element="impl:getFundListReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getAvailableFundFiltersRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="saveRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="getAvailableFundFiltersResponse">
      
       <wsdl:part name="getAvailableFundFiltersReturn" element="impl:getAvailableFundFiltersReturn"/>
      
       </wsdl:message>
      
       <wsdl:message name="getFundPerformanceRequest">
      
       <wsdl:part name="in0" element="impl:in0"/>
      
       </wsdl:message>
      
       <wsdl:message name="saveResponse">
      
       <wsdl:part name="saveReturn" element="impl:saveReturn"/>
      
       </wsdl:message>
      
       <wsdl:portType name="InvestmentService">
      
       <wsdl:operation name="save" parameterOrder="in0">
      
       <wsdl:input name="saveRequest" message="impl:saveRequest"/>
      
       <wsdl:output name="saveResponse" message="impl:saveResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="delete" parameterOrder="in0">
      
       <wsdl:input name="deleteRequest" message="impl:deleteRequest"/>
      
       <wsdl:output name="deleteResponse" message="impl:deleteResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getAvailableFundFilters" parameterOrder="in0">
      
       <wsdl:input name="getAvailableFundFiltersRequest" message="impl:getAvailableFundFiltersRequest"/>
      
       <wsdl:output name="getAvailableFundFiltersResponse" message="impl:getAvailableFundFiltersResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="setAvailableFundFilters" parameterOrder="in0">
      
       <wsdl:input name="setAvailableFundFiltersRequest" message="impl:setAvailableFundFiltersRequest"/>
      
       <wsdl:output name="setAvailableFundFiltersResponse" message="impl:setAvailableFundFiltersResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundList" parameterOrder="in0">
      
       <wsdl:input name="getFundListRequest" message="impl:getFundListRequest"/>
      
       <wsdl:output name="getFundListResponse" message="impl:getFundListResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundDetails" parameterOrder="in0">
      
       <wsdl:input name="getFundDetailsRequest" message="impl:getFundDetailsRequest"/>
      
       <wsdl:output name="getFundDetailsResponse" message="impl:getFundDetailsResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundPerformance" parameterOrder="in0">
      
       <wsdl:input name="getFundPerformanceRequest" message="impl:getFundPerformanceRequest"/>
      
       <wsdl:output name="getFundPerformanceResponse" message="impl:getFundPerformanceResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getProductCategoriesAndFundRanges" parameterOrder="in0">
      
       <wsdl:input name="getProductCategoriesAndFundRangesRequest" message="impl:getProductCategoriesAndFundRangesRequest"/>
      
       <wsdl:output name="getProductCategoriesAndFundRangesResponse" message="impl:getProductCategoriesAndFundRangesResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getAssetClasses" parameterOrder="in0">
      
       <wsdl:input name="getAssetClassesRequest" message="impl:getAssetClassesRequest"/>
      
       <wsdl:output name="getAssetClassesResponse" message="impl:getAssetClassesResponse"/>
      
       </wsdl:operation>
      
       <wsdl:operation name="getSectorPerformance" parameterOrder="in0">
      
       <wsdl:input name="getSectorPerformanceRequest" message="impl:getSectorPerformanceRequest"/>
      
       <wsdl:output name="getSectorPerformanceResponse" message="impl:getSectorPerformanceResponse"/>
      
       </wsdl:operation>
      
       </wsdl:portType>
      
       <wsdl:binding name="WrapInvestmentServiceSoapBinding" type="impl:InvestmentService">
      
       <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      
       <wsdl:operation name="save">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="saveRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="saveResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="delete">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="deleteRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="deleteResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getAvailableFundFilters">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getAvailableFundFiltersRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getAvailableFundFiltersResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="setAvailableFundFilters">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="setAvailableFundFiltersRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="setAvailableFundFiltersResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundList">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getFundListRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getFundListResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundDetails">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getFundDetailsRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getFundDetailsResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getFundPerformance">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getFundPerformanceRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getFundPerformanceResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getProductCategoriesAndFundRanges">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getProductCategoriesAndFundRangesRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getProductCategoriesAndFundRangesResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getAssetClasses">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getAssetClassesRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getAssetClassesResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       <wsdl:operation name="getSectorPerformance">
      
       <wsdlsoap:operation soapAction=""/>
      
       <wsdl:input name="getSectorPerformanceRequest">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:input>
      
       <wsdl:output name="getSectorPerformanceResponse">
      
       <wsdlsoap:body use="literal" namespace="http://www.skandia.co.uk/wrap/InvestmentWebService"/>
      
       </wsdl:output>
      
       </wsdl:operation>
      
       </wsdl:binding>
      
       <wsdl:service name="InvestmentServiceService">
      
       <wsdl:port name="WrapInvestmentService" binding="impl:WrapInvestmentServiceSoapBinding">
      
       <wsdlsoap:address location="http://uk17402.skandia.co.uk:8080/ws4ee/services/WrapInvestmentService"/>
      
       </wsdl:port>
      
       </wsdl:service>
      
      </wsdl:definitions>
      




      It is deployted succesfull but, when i try to call one method id thorws an error

      could not find deserializer for type {http://www.skandia.co.uk/wrap/InvestmentWebService}in0

      i am not using only String a paramter.

      My JaxRpc-mapping.xml looks like

      <?xml version='1.0' encoding='UTF-8' ?>
      <java-wsdl-mapping
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:impl="http://www.skandia.co.uk/wrap/standingdata"
       xmlns:port="http://www.skandia.co.uk/wrap/portfolio"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
       http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
       version="1.1">
      
       <package-mapping>
       <package-type>uk.co.skandia.wraptools.investment</package-type>
       <namespaceURI>http://www.skandia.co.uk/wrap/InvestmentWebService</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>uk.co.skandia.wraptools.riskassessment</package-type>
       <namespaceURI>http://www.skandia.co.uk/wrap/RiskAssessmentWebService</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>java.lang.String</java-type>
       <root-type-qname>port:in0</root-type-qname>
       <qname-scope>element</qname-scope>
       </java-xml-type-mapping>
      
       <java-xml-type-mapping>
       <java-type>java.lang.String</java-type>
       <root-type-qname>impl:getAvailableFundFiltersReturn</root-type-qname>
       <qname-scope>element</qname-scope>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>java.lang.String</java-type>
       <root-type-qname>port:in0</root-type-qname>
       <qname-scope>element</qname-scope>
       </java-xml-type-mapping>
      
      
      </java-wsdl-mapping>
      



      Please help me out.