+

Search Tips   |   Advanced Search

WebServicesAdmin

Use the Jython or Jacl scripting languages to configure security with the wsadmin tool. Use the commands in the WebServicesAdmin group to list all web services, service references and attributes, find attributes of a specific web service, determine the web service endpoint, and determine the operation name of a Web service.

Use the commands in the WebServicesAdmin group to query information for installed web services. For more information about the AdminTask object, see the Commands for the AdminTask object information.

The following commands are available for the WebServicesAdmin group of the AdminTask object:


getWebService

The getWebService command retrieves the attributes for a web service. This command applies to enterprise applications only.

Target object: None.

Required parameters:

-application

Name of the deployed enterprise application. (String, required)

-module

Name of the module. (String, required)

-service

Name of the web service. (String, required)

Optional parameters:

-client

Specifies whether the web service is a provider or a client. The default is false (service provider). When set to true, the command only returns web service clients. (Boolean, optional)

Return value.

Returns a list of attributes, including service name, whether the service is a provider or client, and service type. The service type attribute is only applicable for service providers.

Batch mode example usage

Use Jython string:

Sample output:

Interactive mode example usage

Use Jython:


listServices

The listServices command queries the configuration for services, endpoints, and operations. This command provides more generic query functions than the rest of commands in this command group. It is applicable to Java applications as well as other assets such as Web Services Notification (WSN) clients.

Target object: None.

Optional parameters:

-queryProps

Specifies properties used to locate the service provider or client of interest. For example, if we specify [[type=JAX-WS][client=true]], the command returns each JAX-WS client reference in the enterprise applications. (Properties, optional)

The -queryProps parameter accepts several properties. Use one or multiple properties to specify your query criteria. Do not mix the query properties between different asset types. For example, if we specify application and bus, the command reports an error.

  • Specify the following properties with the -queryProps parameter to query enterprise applications:

    Property and value Description
    assetType=J2EE Application Queries each Java EE application.
    application=application_name Queries a specific Java EE application.
    module=module_name Queries a specific Java EE application module. Specify the application and module properties to query for application modules.

  • Specify the following properties with the -queryProps parameter to query for WSN clients:

    Property and value Description
    assetType=WSN Service Queries each WSN service client.
    bus=bus_name Queries a specific bus.
    WSNService=WSN_service_name Queries a specific WSN service. Specify the bus and WSNService properties to query for a specific WSN service.

  • Specify the following properties with the -queryProps parameter to query all assets:

    Property and value Description
    serviceType=service_type Queries by service type. Specify JAX-WS to query for Java API for XML-Based Web Services assets. Specify JAX-WS (WSN) to query for Web Services Notification assets.
    client=Boolean Queries for clients or providers. Specify true to query for clients. Specify false to query for providers.
    service=service_name Queries for the logical endpoints and operations for a specific service.

  • Specify the following properties with the -queryProps parameter to query all service references or a specific service reference when client=true:

    Property and value Description
    serviceRef=serviceref_name Queries for a specific service reference.

    We can also use an asterisk (*) as a wildcard character to specify to return all the service references under the matching service client.

-expandResource

Return service names only or services and detailed resource information. Specify logicalEndpoint or operation. If we specify the logicalEndpoint value, the command returns the matching services and each endpoint in the services. If we specify the operation value, the command returns the matching services and the corresponding endpoints and operations. (String, optional)

Use the expandResource parameter to return detailed resource information for the endpoints and operations under the service reference.

Return value.

The command returns a list of properties for each service, as well as detailed endpoint and operation information if you query for endpoints and operations.

Batch mode example usage

The following examples query each service provider in the myApplication application. The examples return the logical endpoints for each service because the -expandResources parameter is set as logicalEndpoint, as the following example output demonstrates:

Use Jython string:

Use Jython list:

The following examples query each service client under the myBus bus. The examples do not return logical endpoints or operations for each service client because it does not specify the -expandResource parameter.

Use Jython string:

Use Jython list:

The following examples query service references with the name testRef for each service client for the JaxWSServicesSamples application. The examples return detailed resource information for the logical endpoints or operations for each service reference because the -expandResource parameter is specified.

Use Jython string:

Use Jython list:

Sample output:

Interactive mode example usage

Use Jython:


listWebServices

The listWebServices command retrieves a list of available web services for one or all applications. If an application name is not supplied, the command lists all of the web services. This command applies to enterprise applications only.

Target object: None.

Required parameters: None.

Optional parameters:

-application

Name of the deployed enterprise application. If not specified, the command returns all web services in the cell. (String, optional)

-client

Specifies whether the web service is a provider or a client. The default is false (service provider). When set to true, the command only returns web service clients. (Boolean, optional)

Return value.

All web services for the application specified. For each web service, the command returns the following attributes and corresponding values: application name, module name, service name, whether the web service is a service provider or client, and service type. The service type is only specified if the web service is a service provider.

Batch mode example usage

Use Jython string:

Use Jython list:

Sample output:

Interactive mode example usage

Use Jython:


listWebServiceEndpoints

The listWebServiceEndpoints command returns a list of logical endpoints for a web service. The logical endpoint name is the port name in the Web Services Description Language (WSDL) document. This command applies to enterprise applications only.

Target object: None.

Required parameters:

-application

Name of the deployed enterprise application. (String, required)

-module

Name of the module. (String, required)

-service

Name of the web service. (String, required)

Optional parameters:

-client

Specifies whether the web service is a provider or a client. The default is false (service provider). When set to true, the command only returns web service clients. (Boolean, optional)

Return value.

Returns the logical endpoint name for the web service specified.

Batch mode example usage

Use Jython string:

Use Jython list:

Sample output:

Interactive mode example usage

Use Jython:


listWebServiceOperations

The listWebServiceOperations command returns a list of web service operations. This command applies to enterprise applications only.

Target object: None.

Required parameters:

-application

Name of the deployed enterprise application. (String, required)

-module

Name of the module. (String, required)

-service

Name of the web service. (String, required)

-logicalEndpoint

The port name in the Web Services Description Language (WSDL) document. (String, required)

Optional parameters:

-client

Whether the web service is a provider or a client. The default is false (service provider). When set to true, the command only returns web service clients. (Boolean, optional)

Return value.

Returns the operation name for the web service specified.

Batch mode example usage

Use Jython string:

Use Jython list:

Sample output:

Interactive mode example usage

Use Jython:

  • wsadmin AdminTask
  • Query web services
  • Commands for the AdminTask object