+

Search Tips   |   Advanced Search

WebServicesAdmin


Use this topic as a reference for the commands for the WebServicesAdmin group of AdminTask. Use these commands with the admin scripts to list available Web services, list web services attributes, determine the endpoint configuration for a Web service, and determine a specific operation name.

Use the commands in the WebServicesAdmin group to query information for installed web services.

See about AdminTask, see the Commands for the AdminTask object article.

The following commands are available for the WebServicesAdmin group of AdminTask.

 

getWebService

The getWebService command retrieves the attributes for a Web service. This command applies to enterprise apps 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 value 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 Using Jython string:

AdminTask.getWebService('[–application myapp -module module_name -service webservice_name -client false]')

Sample output:

'[[service {http://www.ibm.com}service1][type JAX-WS][client false]]'

Interactive mode example usage

Jython...

AdminTask.getWebService ('-interactive')

 

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 reference in the enterprise apps. (Properties, optional)The -queryProps parameter accepts the several properties. Use one or multiple properties to specify the 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 apps:


    Table 1. Properties to query enterprise apps

    Property and value Description
    assetType=J2EE Application Queries each Java EE application.
    application=myapp 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:


    Table 2. Properties to query 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:


    Table 3. Properties 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.

-expandResource

Specifies whether to return service names only or services and detailed resource information. Specify logicalEndpoint or operation. If 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)

Return value

The command returns a list of properties for each service, as well as detailed endpoint and operation information if we 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:

[ [service {http://com/ibm/was/wssample/sei/echo/}EchoService] [assetType [J2EE Application]]
 [client false] [application MyWSApplication] [module ServicesModule.war] [serviceType JAX-WS] ]
[ [assetType [J2EE Application]] [service {http://com/ibm/was/wssample/sei/echo/}EchoService]
 [client false] [application MyWSApplication] [module ServicesModule.war] [serviceType JAX-WS] [logicalEndpoint EchoServicePort] ]

[ [service {http://com/ibm/was/wssample/sei/ping/}PingService] [assetType [J2EE Application]]
 [client false] [application MyWSApplication] [module ServicesModule.war] [serviceType JAX-WS] ]
[ [assetType [J2EE Application]] [service {http://com/ibm/was/wssample/sei/ping/}PingService]
 [client false] [application MyWSApplication] [module ServicesModule.war] [serviceType JAX-WS]
 [logicalEndpoint PingServicePort] ]

Using Jython string:

AdminTask.listServices('[-queryProps [[application MyWSApplication][client false]] -expandResource logicalEndpoint]')

Using Jython list:

AdminTask.listServices(['–queryProps', '[[application myApplication][client false]]', '-expandResource', 'logicalEndpoint'])

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. Using Jython string:

AdminTask.listServices('[–queryProps [[bus myBus][client true]] ]')

Using Jython list:

AdminTask.listServices(['–queryProps', '[[bus myBus][client true]]'])

Interactive mode example usage

Jython...

AdminTask.listServices('-interactive')

 

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 we do not specify this parameter, 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 value 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 Using Jython string:

AdminTask.listWebServices('[–application application1 -client false]')

Using Jython list:

AdminTask.listWebServices(['–application', 'application1', '-client', 'false'])

Sample output:

'[[service {http://www.ibm.com}service1][application application1][module webapp1.war][type JAX-WS][client false]]'

Interactive mode example usage

Jython...

AdminTask.listWebServices('-interactive')

 

listWebServicesEndpoints

The listWebServicesEndpoints 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 apps 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 value 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 Using Jython string:

AdminTask.listWebServiceEndpoints('[–application myapp -module module_name -service webservice_name -client false]')

Using Jython list:

AdminTask.listWebServiceEndpoints(['–application', 'myapp', '-module', 'module_name', '-service', 'webservice_name', '-client', 'false'])

Sample output:

'[[logicalEndpoint QuotePort01]]'

Interactive mode example usage

Jython...

AdminTask.listWebServicesEndpoints('-interactive')

 

listWebServicesOperations

The listWebServicesOperations command returns a list of Web service operations. This command applies to enterprise apps 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 WSDL document. (String, required)

Optional parameters

-client

Whether the Web service is a provider or a client. The default value 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 Using Jython string:

AdminTask.listWebServiceOperations('[–application myapp -module module_name -service webservice_name -client false
 -logicalEndpoint endpoint_name]')

Using Jython list:

AdminTask.listWebServiceOperations(['–application', 'myapp', '-module', 'module_name', '-service', 'webservice_name', '-client',  'false', '-logicalEndpoint', 'endpoint_name'])

Sample output:

'[[operation ivt_app_op1][operation ivt_app_op2]]'

Interactive mode example usage

Jython...

AdminTask.listWebServicesOperations('-interactive')




 

Related tasks


Use AdminTask for scripted administration
Querying Web services with wsadmin