
April 15th, 2008, 10:57 AM
|
|
Registered User
|
|
Join Date: Apr 2008
Posts: 1
Time spent in forums: 2 m 44 sec
Reputation Power: 0
|
|
|
Problems with SOAP
Hi,
I am trying to use SOAP to get stock information from a website, I was using NuSOAP but it is so slow. I have now started using PEAR::SOAP but I can't get it to work, here is my code:
Code:
Code:
require 'SOAP/Client.php';
$wsdl_url = 'http://xmlservice.vip-computers.co.uk/productinformationdetails/AuthenticationDetails.asmx?WSDL';
$WSDL = new SOAP_Client($wsdl_url);
$params = array(
'username' => '*****',
'password' => '*****'
);
$options = array('namespace' => 'urn:VipWS/AuthenticationDetails', 'trace' => true);
$result = $WSDL->Call('Login',$params,$options);
if (PEAR::isError($ret))
{
print("<br>An error #" . $ret->getCode() . " occurred!<br>");
print(" Error: " . $ret->getMessage() . "<br>\n");
return false;
}
foreach($result as $key => $value) {
echo "key: $key , value: $value <br>";
}
Problem is the server doesn't log me in, although this worked with NuSOAP, has anyone got any ideas? I get no errors returned, and if I dont supply the params it then displays an error ststing I must include username and password, and when I do it doesn't log me in.
Also, once working I need to access the parts of the results, for example <SessionKey> but when I use $result['SessionKey'] I get an error stating I can't use an object of type stdClass as array, yet the foreach loop does?
Please help
Kind Regards,
outasync
|