I have a .NET webservice. I have successfully written pages to consume it using ASP, ASP.NET, and an HTML page using JaveScript, but I cannot get a PHP page to do so.
I am using NuSOAP, and I know the code is successfully contacting the webservice and returning information, but it does not return the variables I am sending it?!
The webservice is available to the public, so by using the code below, you should get the same results I do.
<?php
require_once('NuSOAP/nusoap-0.6.1/nusoap.php');
$client = new soapclient('http://www.astro-matchmaker.com/aspnet_sample/Simple_Test.asmx?wsdl', 'wsdl');
$param = array('strFirstName'=>'Dana','strLastName'=>'Williams');
$namespace = "urn:ns_www.astromatchmaker.com";
$response = $client->call("test", $param, $namespace);
// Display the request and response
echo '<h2>Request</h2>';
echo '' . htmlspecialchars($client->request, ENT_QUOTES) . '';
echo '<h2>Response</h2>';
echo '' . htmlspecialchars($client->response, ENT_QUOTES) . '';
// if a fault occurred, output error info
if (isset($fault)) {
print "Error: ". $fault;
}
else {
print "no errors";
}
print "<BR>";
print 'The response is:<pre>';
print "</pre><br>";
print(htmlentities($response));
// kill object
unset($client);
?>