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

RESTFul serivce problem when parameters are short

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.6.0
    • Component/s: adb
    • Labels:
      None

      Description

      If I develop a RESTFul web service, there is a case that service paramters are not correctly set.

      The service class is :
      ------------------------------------------------------------
      public class RESTfulEcho {

      public EchoDto echo(Integer id, String message)

      { EchoDto dto = new EchoDto(); dto.setId(id); dto.setMessage(message); return dto; }

      }

      I've tried to call the service like this :
      ------------------------------------------------------------
      http://localhost:8080/axis2/services/RESTfulEcho/echo?message=123

      The parameter "id" is not explicitly set.

      Then the service parameters are :

      id ---> 123
      message ---> null

      When the parameters are explicitly set,
      the service works correctly.
      ------------------------------------------------------------
      http://localhost:8080/axis2/services/RESTfulEcho/echo?id=&message=123

      But, I hope that when the parameters is not explicitly set,
      the parameter is set null or throw a exception.

        Attachments

        1. axis2_3364.patch
          18 kB
          irantha suwandarathna

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              takanorig takanori
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: