Hi mates!

I'm developing a module that calls an external webservice. The webservice consists in a searcher that will returns to me a XML file once It has realized the query. First I began to investigate XML-RPC but this is used to create webservices INTO MY drupal site and what I want to do IS CALL AN EXTERNAL webservice that will returns to me an xml. After that, I've downloaded the SOAP client module and I've tried to test the webservice with the demo, but it doesn't work. This is the way I call the webservice:

$options = array();
$options['use'] = 'encoded';
$options['style'] = 'rpc';

$result = soapclient_init_client('http://intime.dlsi.ua.es:8080/intime/InTiMe?wsdl', 1, $options);
$params = array(
'input' => $queryIntime,
'runName' => 'OvttSearcherFenix',
);
$result = $result['#return']->call(run, $params);

Does anyone has an example of use?? OR Can anyone tell me another way of consuming EXTERNAL WEB SERVICES from our Drupal site?

cheers and thanks!

Comments

planet4sale’s picture

Feeds module

http://drupal.org/project/feeds has documentation on how to import content

There is an example of how to import feeds from Twitter at http://www.brainheist.com/node/5

scottm316’s picture

Good point. I've installed the module, runs the test/demo fine, now I need to use it to actually do something. I'm wondering, do I hack the SOAP Client module or do I need to write a sub-module or my own module that will call functions from that module.

Your code above, is that hacked into the module or did you make your own module?

Scott
http://morrisonmultimedia.ca/
Edmonton, AB

planet4sale’s picture

I just thought that if you tested your XML file with these modules it might help.

I don't know if it's easy to parse of SOAP or WSDL feeds however, I noticed in issues queue for Feeds module http://drupal.org/node/833558

I am trying at the moment to write a module to parse JSON and that's enough work for me.

Knn0N’s picture

Hi ppl!

Now I'm trying with the SOAP extension og PHP 5. This is the code:

$soapclient = new SoapClient("http://intime.dlsi.ua.es:8080/intime4/wsdl/intime.xml");
$input = '0;10;;;patentes';
$runName = 'OvttSearcherFenix';
$params = array(NULL,NULL);
$result = $soapclient->__soapCall('run', array($input, $runName, $params));

The problem is that input and runName variables became NULL when I send the request to the webservice. Can Anyone help me?