Duplicate shema elements in WSDL generated at runtime.
------------------------------------------------------

                 Key: AXIS-2534
                 URL: http://issues.apache.org/jira/browse/AXIS-2534
             Project: Apache Axis
          Issue Type: Bug
          Components: Basic Architecture
    Affects Versions: 1.4
         Environment: OS: Windows XP
JDK: 1.4
Tomcat: 5.0.28
            Reporter: Andrew Morrison


I am deploying a Message style web service to Axis using a WSDD with an 
included schema.  
The intention is that the input and return should both be of a type defined in 
the included schema.

The WSDL generated by Axis is creating two elements with the same name.  
The schema defined element is included as expected: <element name="eligibility" 
type="cns:eligibilityType"/>. 
A second duplicate element of a different type is also generated: <element 
name="eligibility" type="xsd:anyType"/>

I believe this is a bug as it is creating an invalid schema. This may be 
related to bug AXIS-910.

The contents of the wsdd, xsd, and generated wsdl are all included below

======================= deploy.wsdd 
==============================================
<deployment name="CuramWebService" 
        xmlns="http://xml.apache.org/axis/wsdd/"; 
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
        xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
        xmlns:curamns="http://www.mycns.com/mycns";>
        <service name="CuramMessageService1" provider="java:MSG" >
                <parameter name="className" 
value="curam.messagestyle.service.CuramMessageService" />
                <parameter name="allowedMethods" value="processSOAPBody" />    
                <parameter name="wsdlInputSchema" 
value="http://localhost:8080/axis/schemas/eligibility_noxs.xsd"/>
                <parameter name="wsdlTargetNamespace" 
value="http://www.mycns.com/mycns"/>
               <operation
                     name="processSOAPBody"
                     qname="curamns:eligibility"
                     returnQName="curamns:eligibility"
                     returnType="curamns:eligibilityType">
              </operation>
        </service>
</deployment>

======================= eligibility_noxs.xsd 
==============================================
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:cns="http://www.mycns.com/mycns"; 
targetNamespace="http://www.mycns.com/mycns"; elementFormDefault="qualified">
        <element name="eligibility" type="cns:eligibilityType"/>
        <complexType name="eligibilityType">
                <sequence>
                        <element name="claimant">
                                <complexType>
                                        <sequence>
                                                <element name="firstName" 
type="string"/>
                                                <element name="secondName" 
type="string"/>
                                                <element name="address" 
type="string"/>
                                                <element name="dateofbirth" 
type="string"/>
                                                <element name="prsi" 
type="long"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="product">
                                <complexType>
                                        <sequence>
                                                <element name="productname" 
type="string"/>
                                                <element name="productprovider" 
type="string" minOccurs="0"/>
                                                <element name="frequency" 
type="string"/>
                                        </sequence>
                                </complexType>
                        </element>
                        <element name="evidence">
                                <complexType>
                                        <sequence>
                                                <element name="haschild" 
type="boolean"/>
                                                <element 
name="numberofchildren" type="int"/>
                                        </sequence>
                                </complexType>
                        </element>
                </sequence>
        </complexType>
</schema>

======================= axis_generated.wsdl 
==============================================

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.mycns.com/mycns"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:cns="http://www.mycns.com/mycns"; xmlns:impl="http://www.mycns.com/mycns"; 
xmlns:intf="http://www.mycns.com/mycns"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
        <wsdl:types>
                <schema elementFormDefault="qualified" 
targetNamespace="http://www.mycns.com/mycns"; 
xmlns="http://www.w3.org/2001/XMLSchema"; xmlns:cns="http://www.mycns.com/mycns";>
                        <element name="eligibility" type="cns:eligibilityType"/>
                        <complexType name="eligibilityType">
                                <sequence>
                                        <element name="claimant">
                                                <complexType>
                                                        <sequence>
                                                                <element 
name="firstName" type="string"/>
                                                                <element 
name="secondName" type="string"/>
                                                                <element 
name="address" type="string"/>
                                                                <element 
name="dateofbirth" type="string"/>
                                                                <element 
name="prsi" type="long"/>
                                                        </sequence>
                                                </complexType>
                                        </element>
                                        <element name="product">
                                                <complexType>
                                                        <sequence>
                                                                <element 
name="productname" type="string"/>
                                                                <element 
minOccurs="0" name="productprovider" type="string"/>
                                                                <element 
name="frequency" type="string"/>
                                                        </sequence>
                                                </complexType>
                                        </element>
                                        <element name="evidence">
                                                <complexType>
                                                        <sequence>
                                                                <element 
name="haschild" type="boolean"/>
                                                                <element 
name="numberofchildren" type="int"/>
                                                        </sequence>
                                                </complexType>
                                        </element>
                                </sequence>
                        </complexType>
                        <element name="eligibility" type="xsd:anyType"/>
                </schema>
        </wsdl:types>
        <wsdl:message name="eligibilityResponse">
                <wsdl:part element="impl:eligibility" name="eligibility"/>
        </wsdl:message>
        <wsdl:message name="eligibilityRequest">
                <wsdl:part element="impl:eligibility" name="part"/>
        </wsdl:message>
        <wsdl:portType name="CuramMessageService">
                <wsdl:operation name="eligibility">
                        <wsdl:input message="impl:eligibilityRequest" 
name="eligibilityRequest"/>
                        <wsdl:output message="impl:eligibilityResponse" 
name="eligibilityResponse"/>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="CuramMessageService1SoapBinding" 
type="impl:CuramMessageService">
                <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
                <wsdl:operation name="eligibility">
                        <wsdlsoap:operation soapAction=""/>
                        <wsdl:input name="eligibilityRequest">
                                <wsdlsoap:body use="literal"/>
                        </wsdl:input>
                        <wsdl:output name="eligibilityResponse">
                                <wsdlsoap:body use="literal"/>
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="CuramMessageServiceService">
                <wsdl:port binding="impl:CuramMessageService1SoapBinding" 
name="CuramMessageService1">
                        <wsdlsoap:address 
location="http://localhost:8080/axis/services/CuramMessageService1"/>
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to