Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • 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

  • Get RSS Feed

8 Answers

  • Oct 28, 2016 at 10:36 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 24, 2016 at 05:23 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2016 at 02:10 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 09:41 AM

    Any input gurus?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 12:59 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Oct 12, 2017 at 03:19 PM

    Did you find any solution for it?

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08, 2018 at 10:25 AM

    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 ?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 01 at 07:24 AM

    Hi Minal,

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

    Regards

    Anupam

    Add comment
    10|10000 characters needed characters exceeded