Webservice not return variables sent to it.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rrhandle
Forum Newbie
Posts: 10
Joined: Thu Jan 01, 2004 1:51 pm
Location: Wisconsin

Webservice not return variables sent to it.

Post by rrhandle »

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_ ... .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);


?>
Post Reply