Example: Configuring HTTP transport using wsadmin
This example configures the Web container HTTP transport.
- Identify the application server and assign it to the server variable.
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)- Identify the Web container belonging to the server and assign it to the wc variable.
set wc [$AdminConfig list WebContainer $server]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#WebContainer_1)- List all the transports belonging to the Web Container and assign it to the transports variable.
set transportsAttr [$AdminConfig showAttribute $wc transports] set transports [lindex $transportsAttr 0]These commands return the transport objects from the transports attribute in a list format.
Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#HTTPTransport_1) (cells/mycell/nodes/mynode/servers/server1:server.xml#HTTPTransport_2)- Identify the transport to be modified and assign it to the transport variable.
set transport [lindex $transports 0]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#HTTPTransport_1)- Modify the address attribute to change the host and port.
$AdminConfig modify $transport {{address {{host {myHost}} {port 9081}}}}- Save the changes with the following command:
$AdminConfig save