You can update the properties of a created local mapping
service to change where requests are routed to, or how requests are
transformed.
About this task
You can update a local mapping service by using wsadmin
commands, or by using the administrative console as described in Updating a local mapping service by using the administrative console.
Procedure
- Launch wsadmin by starting the wsadmin scripting tool.
- Use the updateLMService command to update
any of the properties of a local mapping service by adding new parameters.
In the following example, the name of the StockQuoteService local
mapping service is changed to StockQuoteServiceV2:
AdminTask.updateLMService('StockQuoteService', ['-name StockQuoteServiceV2 -description "Stock Quote JAX-WS service version 2" -attachSMName Route -consumedService [-targetEndpoint http://localhost:9080/StockQuote/sqservice2 -namespace http://test2 -serviceName sqservice2 -portName sqport2 -portType sqType2I ]]')
The system has updated the local mapping service and the
command returns the local mapping service name that has been updated.
- Optional: You can use the showLMService command
to display all the parameters of the updated single local mapping
service, as shown:
AdminTask.showLMService('StockQuoteServiceV2')
- Save your configuration changes by using the following
command:
AdminConfig.save()
Messages are now intercepted, and can be either rerouted
or transformed.
- If you are in a clustered environment, you must synchronize
the nodes. Use the syncActiveNodes script in the AdminNodeManagement
script library to synchronize each active node in your environment,
as the following example demonstrates:
AdminNodeManagement.syncActiveNodes()
Results
The local mapping service has been updated.