2 Replies Latest reply on Feb 6, 2008 12:25 AM by smathankumar

    Method Overloading in JBossWS

      Hi,

      I created a WebService with Method Overloading in JBoss. While generating WSDL from Java, I got two operations with same operation name with out any difference. My generated WSDL file contains only one Schema element, one Shema Complex type, and two Operations. Give me a suggesion for generate two operations for my methods.

      My Code Like This

      @WebMethod
      public String getAssignedCrbt(String a)
      {
      ...
      }


      @WebMethod
      public String getAssignedCrbt(String a,String b)
      {
      ...
      }

      For Eg.

      <xs:element name='getAssignedCrbt' type='tns:getAssignedCrbt'/>

      <xs:complexType name='getAssignedCrbt'>
      <xs:sequence>
      <xs:element minOccurs='0' name='arg0' type='xs:string'/>
      </xs:sequence>
      </xs:complexType>


      <message name='Crbt_getAssignedCrbt'>



      <operation name='getAssignedCrbt' parameterOrder='getAssignedCrbt'>






      <operation name='getAssignedCrbt'>
      <soap:operation soapAction=''/>

      <soap:body use='literal'/>


      <soap:body use='literal'/>


      <soap:fault name='ProvisionException' use='literal'/>


      <operation name='getAssignedCrbt'>
      <soap:operation soapAction=''/>

      <soap:body use='literal'/>


      <soap:body use='literal'/>


      <soap:fault name='ProvisionException' use='literal'/>

        • 1. Re: Method Overloading in JBossWS

          Hi,
          RequestWrapper is used to remove the overloading. But the overloading concept is not advisable by the Basic Profile of WS-I BP 1.0 compliance. If any other ways means, share with me.

          @WebMethod(operationName="getAssignedCrbtOver", action="urn:getAssignedCrbtOver")
          @RequestWrapper(localName="getAssignedCrbtOver",targetNamespace="targetnamespace",className = "packagename.getAssignedCrbtOver")
          public String getAssignedCrbt(@WebParam(name = "arg0")String a,@WebParam(name = "arg1")String b)
          {
          ....
          }

          • 2. Method Overloading in JBossWS

            Hi,

            Operation name overloading in a wsdl:portType is disallowed by the Basic Profile of WS-I BP 1.0 compliance. But, Now i am able do overloading through RequestWrapper annotation.

            Is there any idea to remove the overloading concepts in future versions.