Query the configuration for the service providers, endpoints,
and operations from each deployed asset. The listServices
command provides generic query functions. Use the following command
to display information about service providers, endpoints, and operations
for enterprise applications and Web Services Notification (WSN) clients.
Each parameter is optional. If you do not specify the queryProps parameter,
the command returns each service provider in your configuration. If
you do not specify the expandResources parameter, the command does
not return the logical endpoints or operations for each service.
The
following command example returns each service provider and the corresponding
endpoints for the
myApplication application:
AdminTask.listServices('-queryProps "[[CompositionUnit=myApplication][client=false]" -expandResources endpoint']
The
following command example returns each JAX-WS service provider and
the corresponding endpoints and operations within a cell:
AdminTask.listServices('[-queryProps "[[serviceType JAX-WS][client false]]"]')
This
command returns the service providers that match the search query.
Sample
output:
'[ [service {http://www.ibm.com}EchoService] [assetType [J2EE Application]] [client false]
[application WSSampleServicesSei]
[module SampleServicesSei.war] [serviceType JAX-WS] ]
[ [service {http://www.ibm.com}EchoService12] [assetType [J2EE Application]] [client false]
[application WSSampleServicesSei]
[module SampleServicesSei.war] [serviceType JAX-WS] ]
[service {http://www.ibm.com}PingService] [assetType [J2EE Application]] [client false]
[application WSSampleServicesSei]
[module SampleServicesSei.war] [serviceType JAX-WS] ]
[ [service {http://www.ibm.com}PingService12] [assetType [J2EE Application]] [client false]
[application WSSampleServicesSei]
[module SampleServicesSei.war] [serviceType JAX-WS]]'
New feature: Use the listServices command to learn about service
references. You can use the
serviceRef property with
the queryProps parameter with the listServices command to query all
service references or a specific service reference. This parameter
is only applicable for service clients. If you specify an asterisk
(
*) as a wildcard as the name of the service reference,
all of the service references for the matching service client are
returned. You can also query a specific service reference name by
specifying the name of the service reference that you want. To return
detailed service reference information for endpoints and operations,
specify the expandResource property.
newfeat
The
following command example lists all service clients and service references
in a cell:
AdminTask.listServices('[-queryProps [[client true] [serviceRef *]]]')
This
command returns the service references that match the search query.
In the following sample output, the EchoService
and Echoservice12 service clients are listed and these clients do
not have service references in the cell. However, TestService and
TestService2 service clients do have service references. There is
one properties object for each service reference in the service client.
The component name is only available for an EJB module.
'[ [service {http://www.ibm.com}EchoService] [assetType [J2EE Application]] [client true]
[application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [service {http://www.ibm.com}EchoService12] [assetType [J2EE Application]] [client true]
[application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [service {http://www.ibm.com}TestService] [assetType [J2EE Application]] [client true]
[application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [serviceRef testRef] [assetType [J2EE Application]] [service {http://www.ibm.com}TestService]
[client true] [application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [service {http://www.ibm.com}TestService2] [assetType [J2EE Application]] [client true]
[application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [serviceRef testRef2] [assetType [J2EE Application]] [service {http://www.ibm.com}TestService2]
[client true] [application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
The following command example lists a specific
service reference by expanding endpoints and operations:
AdminTask.listServices('[-queryProps [[client true] [application JaxWSServicesSamples]
[module SampleClientSei.war] [serviceRef testRef] -expandResource logicalEndpoint]')
This
command returns the specified service references for
testRef and
the serviceRef property is included in each properties object; for
example:
'[ [serviceRef testRef] [service {http://www.ibm.com}TestService] [assetType [J2EE Application]]
[client true] [application JaxWSServicesSamples] [module SampleClientSei.war] [serviceType JAX-WS] ]
[ [serviceRef testRef] [module SampleClientSei.war] [serviceType JAX-WS] [client true]
[service {http://www.ibm.com}TestService] [assetType [J2EE Application]] [logicalEndpoint portA] [application JaxWSServicesSamples] ]
[ [serviceRef testRef] [module SampleClientSei.war] [serviceType JAX-WS] [client true]
[service {http://www.ibm.com}TestService] [assetType [J2EE Application]]
[logicalEndpoint portB] [application JaxWSServicesSamples] ]'
The
following command example returns each WSN service client and the
corresponding endpoints and operations within a cell:
AdminTask.listServices('[-queryProps "[[serviceType [JAX-WS (WSN)]][clie
nt true]]" -expandResource logicalEndpoint]')
This command returns the service providers that match
the search query.
Sample output:
'[ [service {http://www.ibm.com/websphere/wsn/out/remote-publisher}OutboundRemotePublisherService] [assetType [WSN Service]] [client true]
[bus bus1] [WSNService wsn1] [serviceType [JAX-WS (WSN)]] ]
[ [assetType [WSN Service]] [service {http://www.ibm.com/websphere/wsn/out/remote-publisher}OutboundRemotePublisherService]
[bus bus1] [client true] [WSNService wsn1] [serviceType [JAX-WS (WSN)]] [logicalEndpoint OutboundRemotePublisherPort] ]
[ [service {http://www.ibm.com/websphere/wsn/out/notification}OutboundNotificationService] [assetType [WSN Service]] [client true]
[bus bus1] [WSNService wsn1] [serviceType [JAX-WS (WSN)]] ]
[ [assetType [WSN Service]] [service {http://www.ibm.com/websphere/wsn/out/notification}OutboundNotificationService]
[bus bus1] [client true] [WSNService wsn1] [serviceType [JAX-WS (WSN)]] [logicalEndpoint OutboundNotificationPort] ]'