I have a working Curl to consume a web service with xml, but at the moment I am also required to create something with Nusoap to invoke a web service with xml(serve as a backup). And this is where the problem starts:
At the moment, I have this:
function execute_nusoap($xml,$url)
{
require_once 'nusoap/nusoap.php';
$client = new nusoap_client($url,false);
$msg = $client->serializeEnvelope($xml);
$result = $client->send($msg ,$url);
return $result;
}
I am having an error in nusoap.php line 7677:
<p>Severity: Notice</p>
<p>Message: Undefined property: nusoap_client::$operation</p>
<p>Filename: nusoap/nusoap.php</p>
<p>Line Number: 7678</p>
which is this line:
$parser = new nusoap_parser(
$data, $this->xml_encoding, $this->operation, $this->decode_utf8
);
So, I tried editing it to
$parser = new nusoap_parser(
$data, $this->xml_encoding, $this->decode_utf8
);
And now I am getting this reponse instead from the webservice I am trying to invoke:
var_dump($result);
array(1)
{
["Result"]=>
string(0) ""
}
Which is not listed in any of the possible web service response list.
I have been reading this tutorial: