I need to POST a XML document to a web server and then read the XML response.
Previously I've successfully used X-DOCUMENT:LOAD with URL's to import XML but then the input has been a GET command string rather than a POSTed XML-document.
Is there any other way of doing this than creating a socket and read/writing it like it was the 90s?
What platform ?
If you're using 10.2 or higher on windows, then the .net stuff helps a lot
Otherwise, you can use some of the sample socket code that's out there.
Only roll your own socket code if absolutely necessary.
Another idea you could consider is to get something like Apache Camel or NodeJs to listen for events, and do the xml publishing for you (they have many many libraries for this sort of stuff)
You can then just use simple stomp messages to send and receive (see the free open source stomp adapter from dot.r)
10.2B, planning to go to 11.1, on Linux.
In this case we have the option of doing an xml-load via a GET as well so I will stick to that. Works very well, the only problematic thing is that there is no way of doing an asynchronous LOAD. So our application might hang if the server dont provide a response (or is very slow to do so).
Works very well, the only problematic thing is that there is no way of doing an asynchronous LOAD.
Can't you spawn another client session for that purpose? Or use an async AppServer call?
Yes I can. I meant that there is no LOAD-specific way (like for instance an async web service call).