PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
problems with SOAP

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Web Services
View previous topic :: View next topic  
Author Message
outasync



Joined: 15 Apr 2008
Posts: 3

PostPosted: Tue Apr 15, 2008 5:00 pm    Post subject: problems with SOAP Reply with quote

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
View user's profile Send private message
outasync



Joined: 15 Apr 2008
Posts: 3

PostPosted: Tue Apr 15, 2008 10:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Web Services All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software