Question

I need to comunicate with a SOAP web service in order to do a SPARQL query using PHP. What I have is the link and the name of method to use, unfortunately I've no documentation about it. I tried to use an online SOAP client and the service web responses fine. After I'd entered the url the web site showed me all the methods and I simple insert the SQARQL's query.

After that I tried to use the PHP's class SoapClient

 $client = new SoapClient("http://X.X.X.X:XXXX/somenthing/nameSparql?wsdl");
 $serviceName='methodName';
 $query='SQARLquery'
 $result = $client->__soapCall($serviceName,$query);

but the this code doesn't work. I think there is a problem with the second parameter of the __soapCall but I don't know what I have to insert! Or maybe I don't use the class in the proper way. Does anyone know a solution? Are there any PHP libs or classes that work fine for my problem?

Thanks

Was it helpful?

Solution

try to use this guide: http://www.php.net/manual/en/class.soapclient.php

it is simple and well documented.

In alternative, there is this one (hosted on GitHub): https://github.com/phpforce/soap-client

In my experience, the second works fine.

;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top