The Java EE 6 Tutorial

ProcedureTo Test the Service without a Client

The GlassFish Server Administration Console allows you to test the methods of a web service endpoint. To test the sayHello method of HelloServiceBean, follow these steps.

  1. Open the Administration Console by opening the following URL in a web browser:


    http://localhost:4848/
  2. In the left pane of the Administration Console, select the Applications node.

  3. In the Applications table, click helloservice.

  4. In the Modules and Components table, click View Endpoint.

  5. On the Web Service Endpoint Information page, click the Tester link:


    /HelloServiceBeanService/HelloServiceBean?Tester
    

    The tester page opens in a browser window or tab.

  6. Under Methods, type a name as the parameter to the sayHello method.

  7. Click the sayHello button.

    The sayHello Method invocation page opens. Under Method returned, you’ll see the response from the endpoint.