In some instances, there might be a need to control the state of the endpoint manually. Using the
start-endpoint commands, we can shut down and start up a published endpoint from the command line. This is useful when testing client code to make sure that you are handling unavailable endpoints correctly.
Let's look at how to use the
start-endpoint commands. Both commands require parameters for the bus and endpoint in order to know what to start or stop. The syntax for these commands looks like the following:
cxf:stop-endpoint <bus> <endpoint name> cxf:start-endpoint <bus> <endpoint name>
To stop an endpoint, follow these steps:
list-endpointscommand to get the bus ID and the name of our published endpoint. The following will be the output:
Name State Address BusID ...