3.1 Overview of Web Services WLST Commands

You can use the web services WLST commands, in online mode, to:

  • Perform web service configuration and OWSM policy management tasks.

  • Manage the OWSM repository.

  • Check the status of OWSM components.

  • View and define trusted issuers and DN lists for SAML signing certificates.

Note:

Ensure that the user is mapped to the appropriate OWSM logical roles, based on the WLST operations you wish to perform. For more information, see "Modifying the User's Group or Role" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

The web services WLST configuration and policy management commands perform many of the same management functions that you can complete using Fusion Middleware Control, such as managing deployed, active, and running web services applications. They can be executed everywhere in WLST online mode, for example:

wls:/domain/serverConfig
wls:/domain/domainRuntime

The following sections provide more information about using the WLST commands:

3.1.1 Specifying Application, Composite, and Service Names

The web service WLST commands configure a web service for a specific application. Therefore, the application path name has to uniquely identify the application and the server instance to which it is deployed.

The following sections describe how to specify the application and service names to uniquely identify the web service.

Specifying a Web Service Application Name

To specify a web service application in a WLST command, use the following format:

[/domain/server/]application[#version_number]

Parameters shown in brackets [] are optional. The following examples show the sample format for a web service application name:

/base_domain/AdminServer/HelloWorld#1_0
/base_domain/server1/HelloWorld#1_0

If there is only one deployed instance of an application in a domain, you may omit the domain/server parameter, as shown in the following example:

HelloWorld#1_0

In all other instances, the domain/server parameter is required. If it is not specified and WLST finds more than one deployment of the same application on different servers in the domain, you are prompted to specify the domain and the server names.

Web service and web service client applications are deployed directly to WebLogic Server server instances. Each application is managed separately. For example, if the application myapp is deployed to both the AdminServer and server1 instances in the domain mydomain, then you need to issue configuration commands to each of the servers using the appropriate application path name:

/mydomain/AdminServer/myapp#1_0
/mydomain/server1/myapp#1_0

Specifying a Service Name

When there are multiple versions (namespaces) of a web service name for Web Service and Web Service clients, you must specify the namespace and the service name using the following format:

{http://namespace/}serviceName

Note the following:

  • For web service and client management commands, and policy management commands, you do not need to enter the namespace if there is only one service name qualified. If there are multiple versions of the service and you do not specify the namespace with the service name, an exception is thrown.

  • The namespace ({http://namespace/}) should not be included for a SOA composite.

  • For policy set management commands, both the namespace and service name are required for Web Service and Web Service Client (ws-service and ws-client) resource types.

For more information, see "Determining the Namespace for a Web Service" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

3.1.2 Identifying the Policy Subject

You can navigate to a policy subject in WLST, without having to refer to Fusion Middleware Control or the WSM-Console. By using the selectWSMPolicySubject command, together with an understanding of the navigation model, you can discover the application, assembly, and subject names by moving down the hierarchy tree. An assembly uniquely identifies a module within an application, for example a .war file.

Selecting the Application

You can select a specific application for modification if an application name is provided.

If you know only a part of the application name, the argument can be a pattern containing wildcard characters. In this case, all of the applications matching that pattern will be listed. You can then select that application to proceed further. If no argument is provided then all application names will be listed.

When the application name is known

If you know the name of the application, enter it as the argument to selectWSMPolicySubject command. WLST responds with the names of the assemblies contained in the application.

In the following example, jaxwsejb30ws is entered as the name of the application. WLST responds with #jaxwsejb, the name of the assembly contained in the application.

wls:/base_domain/serverConfig> selectWSMPolicySubject('jaxwsejb30ws')
 
#jaxwsejb
 
Select any of the assembly name to proceed.

When only a part of the application name is known

If you know only a part of the application name, you can enter a pattern with wildcard characters. In the following example, jax* is entered as the name of the application in the selectWSMPolicySubject command. WLST responds with a list of applications that match the string.

wls:/base_domain/serverConfig> selectWSMPolicySubject('jax*')
 
jaxws_provider
jaxwsejb30ws
 
Select any of the application name to proceed.

wls:/jrfServer_domain/serverConfig> selectWSMPolicySubject('jaxwsejb30ws')
 
#jaxws3jb
Select any of the assembly name to proceed

When the application name is not known

If you do not know the name of the application, enter the selectWSMPolicySubject command with no arguments. WLST responds with the names of all applications known to the system. In the following example, the selectWSMPolicySubject command is entered with no arguments. WLST responds with the names of all applications known to the system.

wls:/base_domain/serverConfig> selectWSMPolicySubject()

SimpleRestApp
jaxws_provider
jaxwsejb30ws
wsm-pm

Select any of the application name to proceed.

wls:/jrfServer_domain/serverConfig> selectWSMPolicySubject('jaxwsejb30ws')
#jaxws3jb
Select any of the assembly name to proceed

Selecting the Assembly

You can select a specific assembly for modification if an application name and assembly name is provided.

If you know only a part of the assembly name, the argument can be a pattern containing wildcard characters. In this case, all of the assemblies matching that pattern will be listed. You can then select an assembly to proceed further. If no argument is provided then all assembly names will be listed.

Note:

For ws-connection type policy subjects, use an empty string '' for the assembly name.

When the assembly name is known

If you know the name of the assembly, enter it with the application name as arguments to the selectWSMPolicySubject command. WLST responds with the names of the subjects contained in the assembly. In the following example, jaxwsejb30ws is entered as the name of the application and #jaxwsejb is entered as the name of the assembly. WLST responds with a list of all of the subjects contained in the assembly.

wls:/base_domain/serverConfig> selectWSMPolicySubject ('jaxwsejb30ws','#jaxwsejb')
 
WS-SERVICE({http://mycompany.com/targetNamespace}EchoEJBService#EchoEJBServicePort)
WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort)
WS-SERVICE({http://mycompany.com/jaxws/tests}CalculatorService#CalculatorPort)
WS-SERVICE({http://soapinterop.org/DoclitWrapperWTJ}DoclitWrapperWTJService#DoclitWrapperWTJPort)
WS-SERVICE({http://j2ee.tests.ejb.impl/}JaxwsWithHandlerChainBeanService#JaxwsWithHandlerChainBeanPort)
 
Select any of the subject name to proceed.

When only a part of the assembly name is known

If you know only a part of the assembly name, you can enter a pattern with wildcard characters. In the following example, #jaxws* is entered as the partial name of the assembly and jaxwsejb30ws is entered as the name of the application in the selectWSMPolicySubject command. WLST responds with #jaxwsejb, the name of the assembly contained in the application.

wls:/base_domain/serverConfig> selectWSMPolicySubject('jaxwsejb30ws','#jaxws*')
 
#jaxwsejb
Select any of the assembly name to proceed. 

wls:/base_domain/serverConfig> selectWSMPolicySubject ('jaxwsejb30ws','#jaxwsejb')
 
WS-SERVICE({http://mycompany.com/targetNamespace}EchoEJBService#EchoEJBServicePort)
WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort)
WS-SERVICE({http://mycompany.com/jaxws/tests}CalculatorService#CalculatorPort)
WS-SERVICE({http://soapinterop.org/DoclitWrapperWTJ}DoclitWrapperWTJService#DoclitWrapperWTJPort)
WS-SERVICE({http://j2ee.tests.ejb.impl/}JaxwsWithHandlerChainBeanService#JaxwsWithHandlerChainBeanPort)
 
Select any of the subject name to proceed.

When the assembly name is not known

If you do not know the name of the assembly, enter the name of the application only as an argument to selectWSMPolicySubject. WLST responds with the names of all assemblies known to the system. In the following example, jaxwsejb30ws is entered as the name of the application as an argument in selectWSMPolicySubject command. WLST responds with the names of all assemblies known to the system.

wls:/base_domain/serverConfig> selectWSMPolicySubject('jaxwsejb30ws') 
 
#jaxwsejb

Select any of the assembly name to proceed.

Selecting the Subject

You can select a specific policy subject for modification if an application name, assembly name, and policy subject name is provided.

If you know only a part of the policy subject name, the argument can be a pattern containing wildcard characters. In this case, all of the policy subjects matching that pattern will be listed. You can then select a policy subject to proceed further. If no argument is provided then all policy subject names will be listed.

When the policy subject name is known

If you know the name of the policy subject, enter it with the application name and the assembly name as arguments to the selectWSMPolicySubject command. WLST selects the specified policy subject. In the following example, jaxwsejb30ws is entered as the name of the application, #jaxwsejb is entered as the name of the assembly, and WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort) is entered as the name of the policy subject. WLST responds that the policy subject has been selected for modification.

wls:/base_domain/serverConfig> selectWSMPolicySubject ('jaxwsejb30ws','#jaxwsejb','WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort)')
 
The policy subject is selected for modification.

When only a part of the policy subject name is known

If you know only a part of the policy subject name, you can enter a pattern with wildcard characters. In the following example, jaxwsejb30ws is entered as the name of the application, #jaxwsejb is entered as the name of the assembly, and ws-service(*) is entered as the name of the policy subject in the selectWSMPolicySubject command. WLST responds with the name of the policy subjects contained in the assembly.

wls:/base_domain/serverConfig>  selectWSMPolicySubject ('jaxwsejb30ws','#jaxwsejb', 'ws-service(*)')
 
WS-SERVICE({http://mycompany.com/targetNamespace}EchoEJBService#EchoEJBServicePort)
WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort)
WS-SERVICE({http://mycompany.com/jaxws/tests}CalculatorService#CalculatorPort)
WS-SERVICE({http://soapinterop.org/DoclitWrapperWTJ}DoclitWrapperWTJService#DoclitWrapperWTJPort)
WS-SERVICE({http://j2ee.tests.ejb.impl/}JaxwsWithHandlerChainBeanService#JaxwsWithHandlerChainBeanPort)
 
Select any of the subject name to proceed.

When the policy subject name is not known

If you do not know the name of the policy subject, enter the name of the application, the name of the assembly as arguments to the selectWSMPolicySubject command. WLST responds with the names of all policy subjects contained in the assembly. In the following example, jaxwsejb30ws is entered as the name of the application, #jaxwsejb as the name of the assembly, and None as the policy subject argument in selectWSMPolicySubject command. WLST responds with the names of all policy subjects contained in the assembly.

wls:/base_domain/serverConfig> selectWSMPolicySubject ('jaxwsejb30ws','#jaxwsejb')
 
WS-SERVICE({http://mycompany.com/targetNamespace}EchoEJBService#EchoEJBServicePort)
WS-SERVICE({http://mycompany.com/jaxws/tests/concrete}WsdlConcreteService#WsdlConcretePort)
WS-SERVICE({http://mycompany.com/jaxws/tests}CalculatorService#CalculatorPort)
WS-SERVICE({http://soapinterop.org/DoclitWrapperWTJ}DoclitWrapperWTJService#DoclitWrapperWTJPort)
WS-SERVICE({http://j2ee.tests.ejb.impl/}JaxwsWithHandlerChainBeanService#JaxwsWithHandlerChainBeanPort)
 
Select any of the subject name to proceed.

3.1.3 Web Services WLST Command Categories

Web services WLST commands are divided into the categories described in Table 3-1.


Table 3-1 Web Services WLST Command Categories

Command Category Definition

Session Commands

Manage a session, which is required by some web service WLST commands, such as those that modify repository documents and policy subject commands, need to be executed in the context of a session.

Policy Subject Commands

View and manage web service and web service client policy subjects.

Configuration Commands

View and manage OWSM domain configuration information.

Diagnostic Commands

Check the status of the WSM components that are required for proper functioning of the product.

Web Service and Client Management Commands

View and manage web services for the service and client.

Policy Management Commands

View and manage policy attachment for the service and client. These commands manage both direct policy attachments and global policy attachments in policy sets.

Policy Set Management Commands

View and manage globally available policy sets within sessions.

OWSM Repository Management Commands

Manage the OWSM repository with new predefined policies provided in the latest installation of the software, as well as import and export documents into and from the repository.

Token Issuer Trust Configuration Commands

View and define trusted issuers, trusted distinguished name (DN) lists, and token attribute rule filters for SAML signing certificates.

JKS Keystore Configuration Commands

View and manage JKS keystore credentials and certificates.