¿Cuál es la sintaxis de oop nusoap_client call?

I don't find the syntax for an object oriented nusoap_client call:

What's the correct syntax if I registered a class method to the server. I know the code for the server but fail to implement the correct client.

I have this server:


require_once "lib/nusoap.php"; 
require_once 'SampleData.php';

class SoapServer {

    protected $server;

    public function __construct() {

        $this->server = new soap_server();


How do I call this from my SoapClient?

    $result = $this->client->call("SampleData.getSampleData", array("category" => "sample"));

Seems not to work.

preguntado el 10 de marzo de 12 a las 09:03

2 Respuestas

I would avoid using SoapServer as a class name, may conflict with the standard extension (PHP Manual SoapServer).

Why are you wrapping soap_server with SoapServer anyway? Instead try:

$server = new soap_server();

Client call should be like this:

$client = new soapclient('URL');
$result = $client->call("SampleData.getSampleData", array("category" => "sample"));

Respondido el 11 de junio de 16 a las 14:06

//Define the client

$client = new soapclient('http:webservice.com');

//call the method

respondido 12 mar '12, 04:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.