Jump to content

Web service


silversurfer5150
 Share

Recommended Posts

Hey folks,

I have to Post again on this topic because no-one seems to know or want to reply. I have been through the entire webservicerequest class, trying to reverse engineer it to discover the correct parameters for the fetch() command. The below command gives me http ok 200 headers but no content:

$wr     = WebserviceRequest::getInstance(); // get instance
$result  = $wr->fetch("PP7UND76LHE7D2TPZVH0MFY1J67F6IRQ", "GET", "countries/48" , "" , ""); 



The fifth parameter will be NULL for a GET request but the fourth, I presume is another request parameter for a more specific detail in countries/48. Does anyone know what the fourth parameter is and the correct format it should be in?

thanks

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hey,

I think that what you are looking for is in webservice/dispatcher.php:

$params = $_GET;
unset($params['url']);

$class_name = WebserviceKey::getClassFromKey($key);
$bad_class_name = false;
if (!class_exists($class_name))
{
   $class_name = 'WebserviceRequest';
   $bad_class_name = true;
}
// fetch the request
$result = $class_name::getInstance()->fetch($key, $method, $_GET['url'], $params, $bad_class_name, $input_xml);



It appears that "$params" for the GET method it's an empty array.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More