Oracle® Web Services Manager Administrator's Guide 10g (10.1.3.3.0) Part Number E10299-01 |
|
|
View PDF |
This appendix includes the following sections:
Oracle Web Services Manager (Oracle WSM) provides a test page for your use in validating Web service operation in environments where Oracle WSM is deployed. The Oracle WSM test page automates the generation of valid Web service requests that are needed for tests. Oracle WSM gives you a method for testing a remote Web service to verify that it is functional prior to registering it to an Oracle WSM Gateway or Oracle WSM Agent.
Use the Test Web Service page to test whether your JAX-RPC or REST Web service deployed successfully. You can use the Test Web Service page to perform the following tasks:
View the Web service's deployed service description (WSDL)
Exercise the Web service operations with different values
Exercise operations for different values for Web service security and reliability
Provide values for HTTP authentication for the request
Perform stress testing
To test your WSDL and see if you can access the Web service, you must make a request to the Oracle WSM Gateway to which the WSDL is registered. You must get the URL to which you make your request.
To view the WSDL for the Web service
From the navigation pane of Web Services Manager Control, select Policy Management, then select Register Services.
Click Services for the gateway where the service is registered.
In the List of Services, click Edit for the service (Figure B-1).
In the Edit Service page, copy the URL in the Service WSDL URL field (Figure B-2).
This section describes how to use the Test Web Service page to verify that you are receiving the expected results from the Web service.
To test your Web service
From the navigation pane of Web Services Manager Control, select Tools, then select Test Page to display the Test Web Service page. (Figure B-3).
Enter the WSDL URL in the box, and click Submit Query.
The page refreshes (Figure B-4) and displays the endpoint URL of the WSDL and the port. Use Port to specify the protocol and network address used to access the Web service. You can configure your test to perform different tasks as described in the sections that follow.
Figure B-4 Test Web Service Page with Additional Parameters
The Test Web Service page allows you to test any of the operations exposed by a JAX-RPC or REST Web service. By default, the parameters and attributes that can be edited are displayed in an HTML form. Optional parameters and attributes on the form are indicated by a check box.
Select the check box to provide a value for the parameter.
Note:
To distinguish attributes from parameters in the HTML Form, attributes are preceded with an at sign (@).Use the Operation list to select the Web service operation that you want to test.
A plus sign (+) in the form indicates that you can add additional copies of a structure.
The letter X in the form indicates that you can remove copies of a structure that you do not want to use.
Instead of entering values for a JAX-RPC or REST Web service operation in an HTML form, you can enter them directly in XML source code. To do this, select the XML Source option on the Test Web Service page.
Note:
If you enter values in the XML source, you do not have to precede attributes with at signs (@).If you enter values for an operation in the XML source and then toggle to the HTML Form mode, the values you entered will not be preserved. The form will be displayed, cleared of any values.
Remember the following when using the Test Web Service page:
Click the plus sign (+) next to the feature to reveal the parameters. The specific parameters are described in detail in the sections that follow.
You must explicitly indicate that you want to test a particular feature by selecting it. Select the Include in Header check box or the Enable check box next to the name of the feature. If you do not select the check box, the feature will not be included in the test, even if your fill in values for the parameters.
You can invoke a JAX-RPC Web service operation with different values for security and reliability features. To reveal the parameters for these features, select the check boxes next to Reliable Messaging and WS-Security. Select the Include in Header check box to enable these features in the test.
Note:
REST Web services, as implemented by Oracle Application Server Web Services, do not support security or reliability features. If you specify any of the security or reliability options for a REST Web service request, they will be ignored.Select the Reliable Messaging check box to indicate that reliability features will participate in the test. A reliability SOAP header will be inserted into the SOAP envelope of the request. Figure B-5 shows the parameters you can set.
Duplicate Elimination – Turning this feature on inserts the Duplicate Elimination reliability header into the message. This tells the reliable end point to eliminate duplicates of the messages that will be sent. The default value is on
.
Guaranteed Delivery – Turning this feature on inserts the Guaranteed Delivery reliability header into the message. This tells the reliable end point that it must acknowledge receiving the message. The default value is on.
Reply to URL – Indicates the URL to which acknowledgments and faults will be sent for messages that want asynchronous acknowledgments. The URL is typically the host name of the client, with the port that the listener is on.
Reply Pattern – Indicates how the client can interact with the end point. The valid values are: Callback (asynchronous acknowledgment or fault), or Poll (the acknowledgment or fault must be polled for). The default value is Poll.
Figure B-5 Reliable Messaging Parameters on the Test Web Service Page
Select the WS-Security check box to indicate that security features will participate in the test. A security SOAP header will be inserted into the SOAP envelope. You can choose different settings for the User Name and Password parameters (Figure B-6).
Figure B-6 WS-Security Parameters on the Test Web Service Page
Use the Oracle WSM Agent parameter (Figure B-7) to execute the Web service request through the Oracle WSM Agent. The agent applies any policies that have been configured for it on the Web service request. The Configuration Location is the directory location where the Oracle WSM Agent is installed. Use a fully qualified path for this directory location.
Figure B-7 Oracle WSM Agent Parameters on the Test Web Service Page
Select the Show Transport Info check box to display the HTTP Authentication options for the JAX-RPC or REST Web service (Figure B-8). If the HTTP service you are testing is password protected, the parameters under Show Transport Info allow you to provide a user name and password. You can also specify a value for SOAP Action in case the service has to provide any specialized filtering on the SOAP request.
Figure B-8 HTTP Authentication Parameters on the Test Web Service Page
Select the Perform Stress Test check box to display the options to create and configure a continuous series of invocations of the JAX-RPC or REST Web service operation (Figure B-9).
Number of Concurrent Threads – The number of concurrent threads on which the invocations should be sent. The default is 10 threads.
Number of Loops – The number of times to invoke the operation. The default is 5 times.
Delay – The number of milliseconds to wait between operation invocations. The default is 1000 milliseconds (1 second).
Figure B-9 Stress Testing Parameters on the Test Web Service Page
When you invoke the test, a stress report page is returned. The report page identifies the service end point and operation being tested, the size of the message sent, the number of concurrent threads on which it is run, the number of times it is run on each thread, and the delay between each operation invocation.
Click Invoke to send the message as a SOAP request to the JAX-RPC Web service end point. The Test Result page displays the response from the service. The response can be displayed in formatted XML (default) or as raw XML (wire format).
The Test Web Service page for a REST Web service allows you to send the test message to the REST service as either an XML REST POST or GET operation. In addition, Oracle Application Server Web Services gives you the option of sending the message as a SOAP request.
The Test Web Service page provides the following options that allow you to invoke the Web service operation on the test message:
Invoke – Invokes the XML REST request as a SOAP request over HTTP. The service returns a SOAP response message to the test page application. The response can be displayed in formatted XML (default0 or as unformatted XML.
Invoke REST POST – Generates and invokes a REST POST request. The response is returned to the test page application. The response can be displayed in formatted XML (default) or as unformatted XML.
Invoke REST GET – Sends the request to the service as an HTML GET command in the Web browser. The response is displayed in the browser without the test page application.
Once you have configured the Test Web Service page to run a particular test, you can save these settings so that you can reuse the test at a later time. Select the check box next to Save Test, and enter a name and description for your test (Figure B-10).
Figure B-10 Save Test Parameters on the Test Web Service Page
To run this test again, select Tools in the navigation pane, then select Saved Tests. Your test appears in the List of Tests. You can run your test again by clicking Run, or modify the test by clicking Edit.