Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11732

Question mark is weirdly added after last query param in Web Service Tester

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.CR1
    • 3.3.0.Beta3
    • webservices
    • None
    • Hide

      STEP: Create dynamic web project with JAX-RS support
      STEP: Create JAX-RS web service with one GET method with @QueryParam parameters:

      HelloWorld.java
      @GET()
      public String method(@QueryParam("param1") String param1,
      		     @QueryParam("param2") String param2,
      		     @QueryParam("param3") String param3,
      		     @QueryParam("param4") String param4) {
          return param1 +  ", " + param2 + ", " +  param3 + ", " +  param4;
      }
      

      STEP: Click on context menu (Run As -> Run on Server) of this GET method in JAX-RS explorer, Web Service Tester view should be visible now
      STEP: Click Invoke Button. In dialog set all query parameters.
      STEP: Fix the URL to contain two slashes after http (known issue: https://issues.jboss.org/browse/JBIDE-11728)
      STEP: Press Invoke button again
      ASSERT: Response message is: param1, param2, param3, param4
      FAIL: Response message is: param1, param2, param3, param4?
      STEP: Reorder the return message in GET method so last query parameter is not the last in response message, for example:

      HelloWorld.java
      @GET()
      public String method(@QueryParam("param1") String param1,
      		     @QueryParam("param2") String param2,
      		     @QueryParam("param3") String param3,
      		     @QueryParam("param4") String param4) {
          return param1 +  ", " + param2 + ", " +  param4 + ", " +  param3;
      }
      

      STEP: Redeploy the project
      STEP: Press Invoke button in Web Service Tester (choose the same URL as before)
      ASSERT: Response message is: param1, param2, param4, param3
      FAIL: Response message is: param1, param2, param4?, param3

      Show
      STEP: Create dynamic web project with JAX-RS support STEP: Create JAX-RS web service with one GET method with @QueryParam parameters: HelloWorld.java @GET() public String method(@QueryParam( "param1" ) String param1, @QueryParam( "param2" ) String param2, @QueryParam( "param3" ) String param3, @QueryParam( "param4" ) String param4) { return param1 + ", " + param2 + ", " + param3 + ", " + param4; } STEP: Click on context menu (Run As -> Run on Server) of this GET method in JAX-RS explorer, Web Service Tester view should be visible now STEP: Click Invoke Button. In dialog set all query parameters. STEP: Fix the URL to contain two slashes after http (known issue: https://issues.jboss.org/browse/JBIDE-11728 ) STEP: Press Invoke button again ASSERT: Response message is: param1, param2, param3, param4 FAIL: Response message is: param1, param2, param3, param4? STEP: Reorder the return message in GET method so last query parameter is not the last in response message, for example: HelloWorld.java @GET() public String method(@QueryParam( "param1" ) String param1, @QueryParam( "param2" ) String param2, @QueryParam( "param3" ) String param3, @QueryParam( "param4" ) String param4) { return param1 + ", " + param2 + ", " + param4 + ", " + param3; } STEP: Redeploy the project STEP: Press Invoke button in Web Service Tester (choose the same URL as before) ASSERT: Response message is: param1, param2, param4, param3 FAIL: Response message is: param1, param2, param4?, param3

          bfitzpat_rh Brian Fitzpatrick (Inactive)
          jjankovi Jaroslav Jankovič (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

            Created:
            Updated:
            Resolved: