WAS v8.5 > Script the application serving environment (wsadmin) > Welcome to scripting for web services > Configure web services applications using wsadmin.sh

Enable WSDM using wsadmin.sh

Use wsadmin with the AdminConfig object to enable Web Services Distributed Management (WSDM) in the environment. WSDM is an OASIS approved standard that supports managing resources through a standardized web service interface.

The WSDM application is installed as a system application and is disabled by default. To use the WSDM functionality, use the script in this topic to enable WSDM.

In a stand-alone application server environment, the system deploys one WSDM application for each application server instance. Enable the WSDM application to act as an administrative client to the management code running inside the single Java virtual machine for that instance.

  1. Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.

  2. Determine the configuration ID of the WSDM application.

    Use the getid option for the AdminConfig object to retrieve the configuration ID and set the value to the deployment variable, as the following example demonstrates:

      deployment = AdminConfig.getid('/Deployment:WebSphereWSDM/')

  3. Determine the deployed object of the WSDM configuration ID.

    Use the showAttribute option for the AdminConfig object to retrieve the deployedObject attribute and set the value to the deployedObject variable, as the following example demonstrates:

      deployedObject = AdminConfig.showAttribute(deployment, 'deployedObject')

  4. Determine the target mappings for the WSDM deployed object.

    Use the showAttribute option for the AdminConfig object to retrieve the targetMappings attribute and set the value to the targetMappings variable, as the following example demonstrates:

      targetMappings = AdminConfig.showAttribute(deployedObject, "targetMappings")

  5. Enable WSDM.

    Assign each mapping to the target variable, then set the enable attribute to true in the target mapping, as the following example demonstrates:

    mappings = targetMappings[1:len(targetMappings)-1].split(" ")
    AdminConfig.modify(target, '[[enable true]]')

  6. Save the configuration changes.

    Use the following command example to save your configuration changes:

      AdminConfig.save()


Example

The following samples provide Jython and Jacl scripts that enable WSDM in the environment:


Related


Start the wsadmin scripting client using wsadmin.sh
Make deployed web services applications available to clients


Reference:

Commands for the AdminConfig object using wsadmin.sh


+

Search Tips   |   Advanced Search