Using the Web Services Test Client, you can:
Test basic functionality to ensure that the web service was deployed and is operating as expected.
Test basic authentication security.
Test advanced features, such as web services addressing, atomic transactions, SOAP Message Transmission Optimization Mechanism (MTOM), Fast Infoset, and Oracle Web Service Manager (OWSM) security policies.
Note:
For web services that use SOAP over Java Messaging Service (JMS) transport as the connection protocol, you can test only basic features.
View the WSDL for the web service and the imported schemas, if applicable.
Export and import test cases.
Configure Java keystores (JKS) for use in testing security.
Configure and use HTTP proxy settings, as required by your environment.
The following sections describe how to use the Web Services Test Client:
You can invoke the Web Services Test Client from any browser, using the web service endpoint, or using the Administration Console, as described in the following sections:
"Invoking the Web Services Test Client From a Browser" on page 5‐2
"Invoking the Web Services Test Client Using the Web Service Endpoint" on page 5‐3
"Invoking the Web Services Test Client Using the Administration Console" on page 5‐3
Note:
When you first invoke the Web Services Test Client, there will be a brief delay while the application deploys.
To test web services that use SOAP over JMS transport as the connection protocol, the test page must be invoked from the server on which the web service is deployed.
You can invoke the Web Services Test Client from any browser by entering the following URL:
http://host:port/ws_utc
where:
host
refers to the computer on which WebLogic Server is running.
port
refers to the port number on which WebLogic Server is listening (default value is 7001
).
When prompted, enter the login credentials for the Web Services Test Client.
The Web Services Test Client home page is invoked. To select the web service WSDL, see "Selecting the Web Service to Test" on page 5‐3.
You can invoke the Web Services Test Client by navigating to the web service endpoint.
For an Oracle Infrastructure web service, when you navigate to the web service endpoint, the Web Services Test Client is invoked with the web service WSDL selected.
For JAX-WS and JAX-RPC web services, an intermediary page is invoked. Click Test to invoke the Web Services Test Client with the web service WSDL selected.
When prompted, enter the login credentials for the Web Services Test Client.
To test the web service operations, see "Testing Web Service Operations" on page 5‐4.
To test a deployed web service using the Administration Console, follow these steps:
The Web Services Test Client is invoked with the web service WSDL selected. To test the web service operations, see "Testing Web Service Operations" on page 5‐4.
From the Web Services Test Client home page, enter the WSDL corresponding to the web service that you want to test. Return to this page at anytime by selecting Choose Another WSDL.
To select the web service to test:
Alternatively, you can select a WSDL that was previously loaded from the WSDL list. To toggle the list, click Show WSDL List or Hide WSDL List.
The web service operations that are available to test are displayed. For more information, see "Testing Web Service Operations" on page 5‐4.
To test a web service operation:
The Test Results section is displayed at the bottom of the content area, displaying the SOAP request and response messages. If the test fails, the stack error information is displayed in the Test Results section.
You can configure basic settings for the Web Services Test Client, including the username and password for basic authentication, by clicking the Basic Settings tab in the Settings section, setting the values defined in Table 5–1, and clicking Invoke to invoke the web service.
Table 5-1 Basic Test Client Settings
Setting | Description |
---|---|
Endpoint URL |
Override the web service endpoint address. |
User Name |
Username to use for testing basic authentication. Note: You configure the JKS keystores, as described in "Configuring the JKS Keystores" on page 5‐11 |
Password |
Password to use for testing basic authentication. Note: You configure the JKS keystores, as described in "Configuring the JKS Keystores" on page 5‐11 |
Encoding |
Encoding standard. Valid values include: |
BindingType |
Binding type. Valid values include:
|
HTTP Proxy |
Flag that specifies whether the HTTP proxy is enabled. You can configure the global HTTP proxy setting, as described in "Configuring an HTTP Proxy" on page 5‐11. Note: This setting is available in development mode only. |
To test the advanced features of a web service, refer to the following sections:
Note:
For web services that use SOAP over JMS transport as the connection protocol, you can test only basic features.
WS-Addressing provides a transport-neutral mechanism to address web services and their associated messages. Using WS-Addressing, endpoints are uniquely and unambiguously defined in the SOAP header. For more information, see "Using Web Services Addressing" in Developing JAX-WS Web Services for Oracle WebLogic Server.
You can test WS-Addressing, if enabled on the web service, by clicking the Addressing tab in the Settings section, setting the values defined in Table 5–2, and clicking Invoke to invoke the web service.
Table 5-2 Test Settings for WS-Addressing
Setting | Description |
---|---|
Enabled |
Flag that specifies whether WS-Addressing is enabled on the Web Service Test Client. |
Version |
WS-Addressing version. Valid values include:
|
ReplyTo |
Type of the |
FaultTo |
Type of the FaultTo header. Valid values include: |
web services enable interoperability with other external transaction processing systems, such as Websphere, Microsoft .NET, and so on, through the support of the following specifications:
Web Services Atomic Transaction (WS-AtomicTransaction) Versions 1.0, 1.1, and 1.2: http://docs.oasis-open.org/ws-tx/wstx-wsat-1.2-spec-cs-01/wstx-wsat-1.2-spec-cs-01.html
Web Services Coordination (WS-Coordination) Versions 1.0, 1.1, and 1.2: http://docs.oasis-open.org/ws-tx/wstx-wscoor-1.2-spec-cs-01/wstx-wscoor-1.2-spec-cs-01.html
For more information about web services atomic transactions, see "Using Web Services Atomic Transactions" in Developing JAX-WS Web Services for Oracle WebLogic Server.
You can test atomic transactions, if enabled on the web service, by clicking the Atomic Transaction tab in the Settings section, setting the values defined in Table 5–4, and clicking Invoke to invoke the web service.
Table 5-3 Test Settings for Atomic Transactions
Setting | Description |
---|---|
Enabled |
Flag that specifies whether atomic transactions are enabled on the Web Service Test Client. |
Version |
Version of the web services atomic transaction coordination context that is used for the Web Service Test Client. Valid values include: |
Transaction Flow Type |
Flag that specifies whether the web services atomic transaction coordination context is passed with the transaction flow. For information about setting this value, see "Enabling Web Services Atomic Transactions on Web Services" in Developing JAX-WS Web Services for Oracle WebLogic Server. |
Action After Invocation |
Action required after invocation. Valid values include |
SOAP Message Transmission Optimization Mechanism/XML-binary Optimized Packaging (MTOM/XOP) defines a method for optimizing the transmission of XML data of type xs:base64Binary
or xs:hexBinary
in SOAP messages. When the transport protocol is HTTP, Multipurpose Internet Mail Extension (MIME) attachments are used to carry that data while at the same time allowing both the sender and the receiver direct access to the XML data in the SOAP message without having to be aware that any MIME artifacts were used to marshal the base64Binary
or hexBinary
data.
For more information about MTOM, see:
JAX-WS: "Optimizing Binary Data Transmission Using MTOM/XOP" in Developing JAX-WS Web Services for Oracle WebLogic Server
Oracle Infrastructure Web Services: "Using MTOM Encoded Message Attachments" in Developing Oracle Infrastructure Web Services.
You can test MTOM, if enabled on the web service, by clicking the MTOM tab in the Settings section, setting the values defined in Table 5–5, and clicking Invoke to invoke the web service.
Table 5-4 Test Settings for MTOM
Setting | Description |
---|---|
Enabled |
Flag that specifies whether MTOM is enabled on the Web Service Test Client. |
Threshold |
Attachment threshold (in bytes) that specifies whether |
Fast Infoset is a compressed binary encoding format that provides a more efficient serialization than the text-based XML format. For more information about Fast Infoset, see
JAX-WS: "Optimizing XML Using Fast Infoset" in Developing JAX-WS Web Services for Oracle WebLogic Server.
Oracle Infrastructure Web Services: "Optimizing XML Transmission Using Fast Infoset" in Developing Oracle Infrastructure Web Services.
You can test Fast Infoset, if enabled on the web service, by clicking the Fast Infoset tab in the Settings section, setting the values defined in Table 5–6, and clicking Invoke to invoke the web service.
Table 5-5 Test Settings for Fast Infoset
Setting | Description |
---|---|
Enabled |
Flag that specifies whether atomic transactions are enabled on the Web Service Test Client. |
Negotiation Type |
Negotiation strategy. Valid values include:
For more information about the content negotiation strategy, see:
|
You can test OWSM security policies by clicking the OWSM tab in the Settings section, setting the values defined in Table 5–8, and clicking Invoke to invoke the web service.
Note:
For Java EE web services, this tab is available only if you have OWSM installed.
Only a subset of the OWSM predefined policies is available, and you can configure only the attributes presented for those policies. All of the other policy attributes use only the policy defaults.
This means that copies you made of the predefined policies are not available. It also means that you cannot enable Secure Conversation, change the message security algorithm suite, and so forth.
Table 5-6 Test Settings for OWSM
Setting | Description |
---|---|
Enabled |
Flag that specifies whether OWSM policies are enabled on the Web Service Test Client. |
Policies |
Select the policies that you want to test on the client by selecting the associated check box. You can test only a subset of security policies. Note: For the policy selected, you must configure the required properties below. Otherwise, an exception is thrown. |
Username |
Username used for basic authentication. |
Password |
Password used for basic authentication. |
Keystore Location |
Location of the keystore file. Click Choose File to navigate to the file in your local directory, which is typically in |
Remote Keystore Location |
Location of the remote keystore. If not specified, the keystore local to the server is used. |
Keystore Password |
Password used for keystore access. |
Encryption Key Alias |
Alias of the key within the keystore that will be used to decrypt the response from the service. This property is not used in WSS11 policies. |
Encryption Key Password |
Password for the key within the keystore that will be used for decryption. This property is not used in WSS11 policies. |
Signature Key Alias |
Alias of the key within the keystore that is used for digital signatures. For WSS11 policies, this property is used for mutual authentication only. |
Signature Key Password |
Password for the alias of the key within the keystore that is used for digital signatures. |
Recipient Key Alias |
Alias for the recipient's public key that is used to encrypt type outbound message. |
SAML Audience URI |
Relying party, as a comma-separated URI. This property accepts wildcards. |
SAML Issuer Name |
SAML issuer name to use when trying access a service that is protected using SAML mechanism. |
Include User Roles |
User roles in a SAML assertion. |
Attesting Mapping Attribute |
Mapping attribute used to represent the attesting entity. Only the DN is currently supported. This attribute is applicable only to sender vouches message protection use cases. It is not applicable to SAML over SSL policies. |
To view the WSDL for the current web service, click WSDL.
To view the imported WSDL and schemas, click Imported WSDL and Schema. From the dialog box, click the imported file that you wish to view. Click x in the upper right corner to close the dialog box.
Note:
Configuration settings are available in development only.
You can configure the Web Services Test Client to define an HTTP proxy, set the default working directory, or define a Java Keystore (JKS), as described in the following sections:
You configure an HTTP proxy for your Web Services Test Client on the General Settings page.
To configure an HTTP proxy:
You configure the JKS keystores that are associated with the OWSM security policies that you are testing on the Web Services Test Client Security Settings page.
For more information about defining the JKS keystores on WebLogic Server, see "How to Configure a JKS Keystore on WebLogic Server" in Securing Web Services and Managing Policies with Oracle Web Services Manager.
To configure the Java Keystores (JKS):
Click in the upper-right corner of the Web Services Test Client.
Click Security in the navigation pane.
To add a new JKS keystore:
Click Add.
Enter a name for the JKS keystore in the Setting Name field.
Enter the password for the JKS keystore in the Keystore Password field.
Note:
Defining the password for the JKS keystore in a production environment is not recommended.
Enter the path to the file in the Keystore File field, or click Choose File to navigate to the file in your local directory.
Click Submit.
To edit or delete an existing JKS keystore:
Click Edit.
To delete a JKS keystore, click .
To edit a JKS keystore, click , edit the fields, and click Submit Edit.
To exit edit mode, click Cancel Edit.
You can configure the default working directory for the Web Services Test Client. By default, the working directory is set to the following subdirectory within the domain directory:
<domain-directory>/tmp/WSTestPageWorkDir
To configure the default working directory:
You can view the input arguments in a user-friendly form, or you can edit the XML source code directly. If you edit the XML source directly, you must enter valid XML. To view the input argument as XML, click Raw Message. To toggle back to the user-friendly form, click Form Entry.
Note:
The Invocation History pane displays only after you invoke your first test operation and is available in development mode only.
You can view the results for tests executed previously within the current session by clicking on the operation in the Invocation History pane. Failed test instances appear in red in the Invocation History pane.
Note:
This feature is available in development mode only.
You can export individual test cases from the Web Services Test Client and then import them into another test environment, as described in the following sections:
To export a test case, click in the upper-right corner of the Web Services Test Client. The test case is saved as an XML file using the following filename: ws-testcase.xml
. If you save multiple test cases, a suffix is added to the filename as follows: ws-testcase(
n
).xml
, where n
is incremented each time a new test case is saved.
In a development environment, the Web Services Test Client is enabled, by default. In a production environment, the Web Services Test Client is disabled (and undeployed), by default.
You can enable or disable the Web Services Test Client in one of the following ways:
Using the Administration Console, as described below.
Using Fusion Middleware Control at the domain or web service endpoint level, as described in "Enabling or Disabling the Web Services Test Client Using Fusion Middleware Control" on page 4‐25.
Using WLST, as described in "Enabling or Disabling the Web Services Test Client Using WLST" on page 4‐58.
You should disable the Web Services Test Client to increase security by reducing the externally visible details of an application that exposes web services.
Note:
It is recommended that you not enable the Web Services Test Client in production mode. For information about production mode, see "Domain Modes" in Understanding Domain Configuration for Oracle WebLogic Server.
To enable or disable the Web Services Test Client at the domain level using the Administration Console: