When I started to work with the SOAP adapter, I find out that for troubleshooting it is necessary to trace the HTTP or SMTP stream. This is useful to see the settings of the HTTP/SMTP header fields like Content-Type.
When you look at SAP Note 856597 (User required) and scroll down until you see the attachments, you find a file with name tcpgw.zip.
Download the file, extract the file using Winzip and then you find following files and folders:
The index.htm provides you information for use cases for SOAP and IMAP protocol.
To start the TCPGateway, you start program aiitcpgw.bat. You need a JRE (Java Runtime Environment) installed on the computer.
Example with SOAP adapter
I want to show how to trace a web service call. I use the receiver SOAP adapter. In my example the URL of the web service is ‘http://pwdf2153:54000/XISOAPAdapter/MessageServlet?channel=:File_SOAP_SOAP_File:SOAP_Sender‘. In fact the target is just a sender SOAP adapter, which is good enough to do first tests.
First I configure the TCPGateway in a way that it points to the web service address. So I put the server name to Target Hostname and the port number to Target Port. I can add any free port number as listen Port, for my convenience I use the same port number as target port, but this is not required. After filling these entries I click on Add
Now I set redirect the URL in the SOAP adapter receiver channel. I only change the server and port, but the rest of the URL, namely the path and the query string, I leave untouched. As server name I use the IP address of my local PC, where the TCPGateway is running. Sometimes you cannot access a local PC from the XI server, in this case the TCPGateway has to be installed on XI server directly.
When I send a message now, then I see the HTTP stream for the request and the response message in the TCPGateway after clicking on the tab with the port number.
You can see the HTTP header fields, the message and all attachments. In the response you can see the status code and the fault messages.
Example with Internet Proxy
You can trace connections routed through an internet proxy as well. The only difference from the above example is, that you redirect the proxy server settings with to the TCPGateway. In this example I use my proxy server proxy on port 8080.
In the receiver channel I have to change the proxy settings. Here I use on HTTP adapter channel
Example with Mail adapter
The TCPGateway can as well be used for SMTP, POP3 und IMAP4 protocol. For this example I add my mail server address and the standard port 25 (for SMTP) as the target.
In the receiver mail adapter channel I put the IP address of my local PC to the mail server URL.
After sending a message I see the SMTP stream in the TCPGateway.