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

URL-Parameters not processed by REST-Services

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Not A Problem
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: wsdl
    • Labels:
      None

      Description

      I was able to generate a REST service with WSDL 2.0 and the wsdl2code Maven plugin from Axis2. The service is also running and gets executed when I try to access it via the browser, but it is not possible to call it with parameters...

      It is a very simple "HelloWorld" REST service which should just take a String as a parameter and return the String within a message. As said before the service is executed, but the variables/input String is even NULL. I tried the following URLs to call the service:

      http://localhost:8080/services/helloWebServiceREST/getHello/input --> executed, but no parameter value
      http://localhost:8080/services/helloWebServiceREST/getHello?input --> executed, but no parameter value
      http://localhost:8080/services/helloWebServiceREST/getHello?input=test --> executed, but no parameter value
      http://localhost:8080/services/helloWebServiceREST/Hello?input --> not executed
      http://localhost:8080/services/helloWebServiceREST/Hello/input --> not executed

      Is there is mistake in the WSDL or services.xml and which would be the correct URL to call the service with a parameter? The documentation for RESTful services with WSDL 2.0 and Axis2 is insufficient... It seems that there are also no working examples or tutorial on the web.

        Attachments

        1. hello-rest.wsdl
          2 kB
          Sven Strohschein
        2. HelloWebServiceREST.java
          0.7 kB
          Sven Strohschein
        3. helloWebServiceREST-modified.wsdl
          3 kB
          Kishanthan Thangarajah
        4. services.xml
          0.9 kB
          Sven Strohschein

          Activity

            People

            • Assignee:
              kishanthan Kishanthan Thangarajah
              Reporter:
              novanic Sven Strohschein
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: