Chapter 7. Web Service consumer 163
We are back to the window where the input parameters can be specified and the service
endpoint be selected as shown in Figure 7-63. The list of service endpoints now contains the
one we just added and we select that one and continue to invoke the service.
Figure 7-63 Invoking service with alternative endpoint
Specifying alternative service endpoints can be very useful for a number of reasons. One of
the reasons it is often done is to send the connection through a TCP/IP monitor for
7.4.5 TCP/IP Monitor
The IBM Rational Application Developer IDE, as well as other IBM development IDEs, comes
with a nice troubleshooting tool called
TCP/IP Monitor. This tool acts as a proxy between two
TCP/IP endpoints and records the messages being exchanged. While the Web Service
Explorer allows you to see the SOAP messages as well, the TCP/IP monitor allows you to do
the same with any application so you can troubleshoot your own applications instead of
simulating a service client in the Web Service Explorer.
When we put these examples together we wanted to make sure that the exchanged
messages were correct and the namespaces were used properly. To accomplish this, we
utilized the TCP/IP Monitor to check the exchanged messages and verified that they indeed
164 z/TPF and WebSphere Application Server in a Service Oriented Architecture
The TCP/IP Monitor is rather well hidden. To start it, you have to select Other from the
Window menu, to bring up a list of all available IDE views, as shown in Figure 7-64.
Figure 7-64 Opening the list of all available IDE windows
Chapter 7. Web Service consumer 165
In the list of available views you have to expand the Debug section, which reveals the TCP/IP
Monitor item. Select it to open it as shown in Figure 7-65.
Figure 7-65 Selecting the TCP/IP Monitor view
The first time the TCP/IP Monitor view opens, it is most likely in a rather useless area of the
IDE, the narrow area to the right of the main editing window as shown in Figure 7-66.
If you are somewhat familiar with the Eclipse based development IDEs, you know that you
can drag any view from one area to another. Because of the horizontal layout of the TCP/IP
Monitor view, it makes most sense to place its view on the stack of views below the main
166 z/TPF and WebSphere Application Server in a Service Oriented Architecture
Figure 7-66 The TCP/IP Monitor view
The TCP/IP Monitor must be set up before it can be used. The way it works is that the TCP/IP
Monitor listens on a specified local port and then forwards the received data to the configured
IP address and port. The first step therefore is to select the Properties configuration window
from the TCP/IP Monitor view as shown in Figure 7-67.
Figure 7-67 Opening the configuration window
Chapter 7. Web Service consumer 167
The configuration window lists all the currently configured and activated port configurations.
Initially the list is empty so we add a new port definition as shown in Figure 7-68.
Figure 7-68 Current port configuration
For this exercise we specify the local listening port to be 80 and the forwarding destination to
be our z/TPF host on port 80 as well, as shown in Figure 7-69.
Figure 7-69 Adding a new port definition
The list now contains our new port definition but it is not active until we start it, as shown in
Figure 7-70 Starting a port definition