You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Balaji (JIRA)" <ax...@ws.apache.org> on 2010/02/09 05:57:28 UTC

[jira] Created: (AXIS-2820) maxOccurs="2" gets converted to maxOccurs="unbound" after WSDL2java

maxOccurs="2"  gets converted to maxOccurs="unbound" after WSDL2java
--------------------------------------------------------------------

                 Key: AXIS-2820
                 URL: https://issues.apache.org/jira/browse/AXIS-2820
             Project: Axis
          Issue Type: Bug
          Components: WSDL processing
    Affects Versions: 1.4
         Environment: windows xp,axis1.4,weblogic8.1
            Reporter: Balaji


I have the below WSDL . The problem here is that WSDL2java does not  bother about the MaxOccur .Which means for any value of maxoccur  more than 1,it considers as unbound. Is this an error?Are there any fix available for this in axis 1.4.

For example in the below WSDL  empSkills elelement has a maxOccur ="2" ,but WSDL2java converts this as maxOccur=unbound .

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="EmployeeSearch" targetNamespace="http://myroots.employee.com.in" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ama="http://myroots.employee.com.in">
  <wsdl:types>
      <xsd:schema  targetNamespace="http://myroots.employee.com.in">
      <xsd:complexType name="EmployeeInput">
       <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="empId" type="xsd:string" ></xsd:element>
	     </xsd:sequence>
          </xsd:complexType>
     <xsd:complexType name="EmployeeDetails">
      <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="empId" type="xsd:string" ></xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="empName" type="xsd:string" ></xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="empDesig" type="xsd:string" ></xsd:element>
            <xsd:element maxOccurs="1" minOccurs="1" name="empOccupation" type="xsd:string" ></xsd:element>
	     <xsd:element maxOccurs="2" minOccurs="0" name="empSkills" type="xsd:string" ></xsd:element>
	     </xsd:sequence>
      </xsd:complexType>
     </xsd:schema>
  </wsdl:types>
  <wsdl:message name="EmployeeInput">
    <wsdl:part name="EmployeeInput" type="ama:EmployeeInput"/>
  </wsdl:message>
  <wsdl:message name="EmployeeDetails">
    <wsdl:part name="EmployeeDetails" type="ama:EmployeeDetails"/>
  </wsdl:message>
  <wsdl:portType name="EmployeePortType">
    <wsdl:operation name="getEmployeeDetails">
      <wsdl:input message="ama:EmployeeInput"/>
      <wsdl:output message="ama:EmployeeDetails"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="EmployeeBinding" type="ama:EmployeePortType">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getEmployeeDetails">
      <wsdlsoap:operation soapAction="http://localhost:7001/test/services/EmployeeSearch/GetEmployeeDetails" style="rpc">
        <wsdl:input>
          <wsdlsoap:body parts="EmployeeInput" use="literal"/>
        </wsdl:input>
        <wsdl:output>
          <wsdlsoap:body parts="EmployeeDetails" use="literal"/>
        </wsdl:output>
      </wsdlsoap:operation>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="EmployeeSearch">
    <wsdl:port binding="ama:EmployeeBinding" name="EmployeeBinding">
      <wsdlsoap:address location="http://localhost:7001/test/services/EmployeeBinding"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.