Although this may not be the best way, an alternative approach to circumvent the need for J / Link would be to create an intermediate CGI script to translate the request from GET to POST for you.
This script file will be hosted on an accessible server, it will execute the given GET request, make a POST request on the target page, and then output / return the XML result in the usual way.
For example, using curl in PHP, which will work well - although, obviously, you could achieve the same functionality in almost any CGI language.
<?php $c = curl_init(); // set the various options, Url, POST,etc curl_setopt($c, CURLOPT_URL, "http://www. ... .com/login.jsp"); // Target page curl_setopt($c, CURLOPT_HEADER, false); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_RETURNTRANSFER, false); // POST the incomming query to the Target Page curl_setopt($c, CURLOPT_POSTFIELDS, $_SERVER['QUERY_STRING']); curl_exec($c); curl_close($c); // Output the XML response using header/echo/etc... // You might need to also send some of the POST request response headers // use CURLOPT_HEADER to access these... ?>
From the point of view of Mathmatica, this is much simpler, because you simply use the built-in import method to create a standard GET request on the proxy page, but get the XML result from the POST request on the login page.
Fraser Feb 21 '12 at 15:00 2012-02-21 15:00
source share