We are implementing support for punchout/oci which follows this basic flow:
Our procurment system opens a new tab/window to an external webshop and in our request we append a parameter called HOOK_URL. When the user finishes the external site will redirect to the hook_url and perform a post. example here:
http://help.sap.com/saphelp_crm20c/helpdata/en/30/67483936dd7607e10000000a11402f/content.htm
That system is a black box for us and we are basically just supposed to retrieve the post then process the form data into whatever information we need and send it on its way through our business logic.
So I need to build a simple Test application that can play the role of an external webshop and I need our system to send and receive.
We are using servlet 2.5, JSF 2.0, and CDI. But I’m guessing that I’ll be needing a good old servlet or two for this purpose.
So far what I’ve got is:
- procurment system perform window.open and send to test system
-
Test system presents a very basic html page and posts to a simple servlet that redirects to hook_url
-
procurment system get’s the response
But what I can’t figure out how to do nicely is to actually perform the post? When I recieve the response from the test system it’s a totally new request. And must I use servlets?
I have tried to follow some guides but the examples map to poorly. It must be a Post by specification.
cheers
Solved by using apache http and url connections