cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.31 Dual Stack to TCP/IP Socket

Former Member
0 Kudos

All,

I have created a socket listener on NWDI on my laptop and a socket client on PI. How do I send a message from PI to NWDI socket server on my laptop.

Or is there any other way you would suggest to test PI socket client by standing a dummy socket server as the vendor does not have a test server.

Thanks,

Ashish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Anupam. I was able to figure this out last week and wrote a blog on this topic.

sap-pi-client-socket-connection-tcpip-socket-server

I posted this question a week back or so. Not sure why the question was approved by the moderator after so many days.

Answers (1)

Answers (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Ashish,

You need to ensure following points

1. The Server or listener should be in the same network as that of PI server.

2. There is no receiver adapter for TCP/IP communication

3. You need to embed the Client code in java mapping within the scenario.

4. The java mapping sends request, receives response and writes that response to receiver adapter in the scenario.

5. Sample java code : https://www.tutorialspoint.com/java/java_networking.htm

6. The server code will have a port number as per following sample code.

publicGreetingServer(int port)throwsIOException{
      serverSocket =newServerSocket(200000);
      serverSocket.setSoTimeout(10000);

}

7. IP address will be the vendor servers IP address or the IP of your local system in the same client network. If the network is different then you need help of network team.

Regards

Anupam

0 Kudos

How to writes that response to receiver adapter in the scenario?