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

Hierarchical RESTful resources support

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.2
    • Component/s: kernel, wsdl
    • Labels:
      None

      Description

      REST resources can be like the below
      HTTP GET http:/www.example.com/customer/

      {customerID}
      HTTP GET http:/www.example.com/customer/{customerID}

      /orders/

      {orderID}/
      HTTP GET
      http:/www.example.com/customer/{customerID}/orders/{orderID}

      /orderitem/

      {itemnumber}

      Customer Details can be fetched using the first resource. Order details of a specific customer can be fetched using second resource. Item details of a specific order of a customer can be fetched using last resource.
      Corresponding WSDL with these operations are attached (Customer.wsdl2)
      While executing the above service (Created an aar with System.out.println in skeleton), the last resource is executed successfully. But while executing the first two resources, “String index out of range” exception is thrown.
      During the service deployment Axis2 builds the HTTP Location Table for the above service as follows.
      GET/customer - AxisOperation Object of OrderItem
      GET/orders - AxisOperation Object of OrderItem
      GET/orderitem - AxisOperation Object of OrderItem

      This is because Axis2 removes the parmeters (Dynamic variables whose values are expected to be sent at runtime) that are declared in the whttp:location element

      To solve this HTTP Location Table has to be populated with parameters as well. In that case the HTTP Location Table for the above service will be

      GET/customer - AxisOperation Object of Customer
      GET/orders - AxisOperation Object of Orders
      GET/orderitem - AxisOperation Object of OrderItem

      And the HTTPLocationBasedDispatcher.findOperation has to find the operation based on this populated HTTP Location Table.

        Attachments

        1. Order.wsdl2
          4 kB
          Samuel Alexander Gnanaraj
        2. AXIS2-1.7.patch
          26 kB
          Nurhan R. Mustafa

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              samuelalexanderg Samuel Alexander Gnanaraj
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: