IBM Support

Using the TCP/IP Monitor in IIB Toolkit with SOAP and HTTP nodes

Question & Answer


Question

Using the TCP/IP Monitor in IIB Toolkit with SOAP and HTTP nodes

Answer

On Demand Consulting
Author: Phil Bareham

Introduction

Sometimes when using the IIB SOAP or HTTP nodes it is useful to be able to see what is being sent or received 'over the wire' either between a client application accessing an IIB message flow implementing a web service via SOAP/HTTP Input and Reply nodes, or a message flow accessing another web service via SOAP or HTTPRequest nodes.

We had an On Demand Consulting ticket where a SOAP Request node was being used to call a web service, but when the SOAP Request node was invoked a BIP3602 error was raised:
 
BIP3602E: ( IB10NODE.default ) The Web service payload {urn:examples:helloservice}sayHelloResponse2'' does not match an operation described by WSDL binding ''Hello_Binding'' in file ''sample.wsdl''.

Because the SOAP Request node could not parse the response from the web service using the definitions we could not see the message tree that was sent back. The customer didn't want to change to SOAP Request node's operation mode to 'invoke a generic web service' which would have allowed us to see what was being sent back from the IIB Toolkit Flow Exerciser or the debugger we decided to use the TCP/IP Monitor provided in the IIB Toolkit instead.

This article describes how to configure the TCP/IP Monitor to view the traffic between IIB and a web web service invoked by IIB.

An example message flow

As an example we have a message flow that takes an incoming XML message from an MQ Queue and forwards it onto a web service it would looks like this:

User-added image
The SOAP Request node's basic properties are:

User-added image

And the HTTP Transport properties currently look like this:

User-added image

Note the current settings for the 'web service URL' property the target web service is running on localhost and port 8088. In this example we use a SOAPUI mockservice.

The TCP/IP Monitor in IIB Toolkit

The TCP/IP Monitor in IIB Toolkit is provided as part of the Eclipse framework it is not a feature provided by IIB. To open the TCP/IP Monitor in IIB Toolkit click on: Window -> Show view:

User-added image

Expand the 'Debug' category - or type 'TCP' in the 'type filter text box - and select 'TCP/IP Monitor' and click OK the TCP/IP Monitor view is opened alongside the 'Properties' and 'Problems' views in the lower right hand quarter of the Toolkit:
User-added image


Configuring a TCP/IP Monitor

To create and start a TCP/IP Monitor instance we need to access the TCP/IP Monitor properties these can be opened by right clicking in the - currently - blank area at the top left/middle of the TCP/IP Monitor view and selecting 'properties' this opens the TCP/IP Monitor properties dialog:

User-added image

To create a new monitor click on 'Add...'

User-added image

By default the 'Local monitoring port' is set to port 80 in this example we won't change this but this value needs to be set to a free port on the machine running IIB Toolkit. 'Host name' is blank initially but needs to set to the host name of the machine hosting the target web service in our case this was localhost because our web service is a SOAPUI mock service running on the same machine as out IIB toolkit and runtime. The 'Port' property needs to set to the port used by the target web service. Both the 'host name' and the 'Port' values can be determined from the hostname and port values in the 'Web service URL' SOAP Request node property noted earlier which was:
 
http://localhost:8088/mockHello_Binding
Click on 'OK' to create the monitor which will now been shown in stopped state in the 'TCP/IP Monitors:' list:

User-added image

Select the newly created TCP/IP Monitor and click on 'Start' the status value will change to 'Started'.


Redirecting the web service call via the TCP/IP Monitor

We now need to change the SOAP Request node so that it send the web service request and response via the TCP/IP Monitor.

On the 'HTTP Transport' tab in the SOAP Request node properties change the 'Web service URL' property to point to the TCP/IP Monitor in our example this property will now be set to:
 
http://localhost:80/mockHello_Binding

Port 80 is the port that the newly created and stated TCP/IP Monitor is listening on. Redeploy the message flow.


Testing the a web service call with TCP/IP Monitor

Once the message flow is redeployed test it by sending a message through it. In the TCP/IP Monitor view we will see the request going from the SOAP Request node to the web service on the left and the response coming back from the web service on the right:

User-added image

To 'nicely' format the output in the 'request' and 'response' windows we clicked on the drop down and selected 'XML'.

In the response message we can see that the SOAP body includes the element sayHelloResponse2 whereas the wsdl expects sayHelloResponse this is the cause of the BIP3602 error. If the SOAPUI mockservice is amended to send back sayHelloResponse then the warning is not encountered.

To stop the TCP/IP Monitor open the TCP/IP Monitor properties dialog select the TCP/IP Monitor and click on stop.

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

More support for:
IBM On Demand Consulting for Hybrid Cloud

Software version:
All Versions

Document number:
771819

Modified date:
16 March 2019

UID

ibm10771819

Manage My Notification Subscriptions