- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
SOA Socket problem: Creative Ideas needed
I have a requirement that has been driving me insane for months; My SOA Composite Application needs to start with the receival of a TCP/IP message with a flow that goes like this:
1- Receive message over TCP/IP.
2- Immediately reply with a fixed Acknowledgment message.
3- Do some logic and Call some other systems to formulate the response message in BPEL.
4- Reply with the response message over the same TCP/IP connection (without closing it) .
5- await an Acknowledgment message to mark the end of the transaction.
I'm using the socket adapter to implement this requirement, I need to define this handshake protocol, to which I have 2 options:
- XSL: only problem is that the acknowledge message contains some special characters that are not permitted in xml1.0 (permitted in xml1.1 though)
- Java: In another project with the same requirement but where I was the sender not the receiver, I was able to implement the iCustomParser class and use the executeOutbound method where I have an input and output stream so I have full control over the protocol and it was done successfully. The problem with the requirement I have now is that I'm the receiver and there are 2 separate java methods for the inbound request:
executeInboundRequest: which takes the inputStream as a param, and executeInboundReply:which takes the payload and the output stream as param
So now when I receive the request, I won't have any way of writing back and replying with the acknowledgment(I do not have an outputstream object); so the only way to reply AFAIK(as far as I know) is to invoke the reply from BPEL which calls the "executeInboundReply" method that can also only write to the output stream so I won't even be able to read the acknowledge message(step 5) from the sender.
The only solution left is to write my own java application for receiving the TCP/IP requests without using the socket adapter and I will have to do thread management and stuff that Oracle SOA Suite should already provide out of the box.
Any ideas or help is greatly appreciated as all the solutions I tried have failed thus far.
P.S.: I don't know if this is the proper place to post such a problem and reach an audience of professional SOA developers, if there are other places, kindly tell me.