 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
outasync
Joined: 15 Apr 2008 Posts: 3
|
Posted: Tue Apr 15, 2008 5:00 pm Post subject: 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: |
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 |
|
| Back to top |
|
 |
outasync
Joined: 15 Apr 2008 Posts: 3
|
Posted: Tue Apr 15, 2008 10:55 pm Post subject: |
|
|
| just an update, I have tried the above with the new php5 soap extension and it works, only trouble is like NuSoap it is really slow, I really need this to work so please if you can help I would really appreciate it |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|