Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5379

The third URL parameter can not be processed (REST web service with WSDL 2.0)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Cannot Reproduce
    • 1.6.2
    • None
    • wsdl
    • None

    Description

      I have developed a simple "hello world" REST web service with WSDL 2.0 and Axis2.
      There are three URL parameters defined, but the third URL parameter can not be processed (ADBException regarding unexpected element). The first two parameters are processed correctly.

      I could not get an answer via the axis2 mailing list regarding this problem ( http://mail-archives.apache.org/mod_mbox/axis-java-user/201207.mbox/%3C500F0ADF.1050108%40gmx.de%3E ), could not find any examples, tutorials or documentation for a REST web service with WSDL 2.0 and more than two parameters.

      The full example code, wsdl, etc. is attached to this issue.

      URL calls

      http://localhost:8080/services/helloWebServiceREST/getHello?input=test -> working
      http://localhost:8080/services/helloWebServiceREST/getHello?input=test&second=test2 -> working
      http://localhost:8080/services/helloWebServiceREST/getHello?input=test&second=test2&third=test3 -> not working ("org.apache.axis2.databinding.ADBException: Unexpected subelement second")
      http://localhost:8080/services/helloWebServiceREST/getHello?input=test&third=test3 -> not working ("org.apache.axis2.databinding.ADBException: Unexpected subelement input")

      Request element

      <xsd:element name="hellorequest">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element minOccurs="0" name="input" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="second" nillable="true" type="xsd:string"/>
      <xsd:element minOccurs="0" name="third" nillable="true" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>

      Attachments

        1. Hellorequest.java
          29 kB
          Sven Strohschein
        2. Helloresponse.java
          17 kB
          Sven Strohschein
        3. hello-rest.wsdl
          2 kB
          Sven Strohschein
        4. hello-rest-modified.wsdl
          4 kB
          Kishanthan Thangarajah
        5. helloWebServiceREST.aar
          26 kB
          Sven Strohschein
        6. HelloWebServiceREST.java
          0.7 kB
          Sven Strohschein
        7. helloWebServiceREST-kishanthan.aar
          17 kB
          Kishanthan Thangarajah
        8. RESTSample_1.0.0.aar
          5 kB
          Kishanthan Thangarajah
        9. services.xml
          0.9 kB
          Sven Strohschein
        10. wsdl2code-result.zip
          69 kB
          Sven Strohschein
        11. wsdl2code-result-wsdl2.0.zip
          19 kB
          Sven Strohschein

        Activity

          People

            kishanthan Kishanthan Thangarajah
            novanic Sven Strohschein
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: