cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP socket client to PI: How to make PI a socket server listener

Former Member
0 Kudos

So I was able to complete the POC related to PI connecting to a socket server (https://answers.sap.com/questions/28330/sap-pi-731-dual-stack-to-tcpip-socket.html?)

and now the next step is make PI as TCP/IP socket server. I am assuming that we will need to create a custom adapter module to be incorporated in the sender adapter.

Any ideas or directions are welcome.

Thanks,

Ashish

0 Kudos

Hi Ashish,

Did you happen to implement this? I am required to implement this scenario. If you have already done it, any pointers will be very helpful.

Many thanks,
Anand Patil

Accepted Solutions (0)

Answers (8)

Answers (8)

stefan_grube
Active Contributor

I have read some stuff about this topic and noticed, that you cannot create a socket listener within an EJB, so using a Java Proxy is not an option. So you really need to create a whole adapter, not only an adapter module.

I have read your example of calling a socket out of mapping. I cannot imagine that there is any practical use case for this. I think you want to send the whole payload to a socket server. So you should create a TCP/IP adapter for sender and receiver.
This is not an easy task.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Minal,

Can you please kindly open a new thread with all details to get more response.

Regards

Anupam

former_member75745
Discoverer
0 Kudos

Hi all,

Any further inputs for this connectivity?

External -- > (TCP/IP )PI --> SAP . We have the same requirement , I tried using java mapping but

1) After fetching data once, server socket gets closed automatically.( tried in infinite loop as well as single execution loop )

2) is there any way to trigger java mapping directly from ESR ?

arjunb21
Member
0 Kudos

Did you find any solution for it?

Former Member
0 Kudos

To send the whole payload I was thinking of using DOM parser in UDF and then calling the socket connection. I can have a dummy channel in the receiver end. Cause all we need is to send the message to socket server.

As for PI acting as a Socket server, so are we saying there is no way other than creating a new adapter? Is this something SAP is working on in near future?

Thanks,

Ashish

0 Kudos

Hi Ashish,

Did you happen to implement this? I am required to implement this scenario. If you have already done it, any pointers will be very helpful.

Many thanks,
Anand Patil

minal_vaidya2
Explorer
0 Kudos

Hi Ashish

Were you able to implement Socket server on PI? I have a same requirement in my project. I referred your blog for outbound scenario where PI is socket client. That helped a lot in understanding the process, thanks.

Can you provide more details on the inbound approach as well ?

We are on PO7.5 and its a inbound synchronous interface requirement where PO will act as a TCP/IP socket server.

Thanks,

Minal

Former Member
0 Kudos

Any input gurus?

Former Member
0 Kudos

Stefan,

We are on PI 7.31 dual stack.

Can the Java proxy be in listener mode all the time. And what would be the sender and the receiver adapter in this case?

My scenario is Socket client (3rd Party) > PI > SAP (Proxy)

stefan_grube
Active Contributor
0 Kudos

Maybe you can go for Java Proxy. This is easier to develop. You can deploy your Java Proxy implementation on your PO installation.