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 
problem running client code in webservice

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



Joined: 21 Aug 2007
Posts: 3

PostPosted: Fri Aug 31, 2007 1:54 pm    Post subject: problem running client code in webservice Reply with quote

hey guys can any body help me in this code and please tell me where am i going wrong. i hav created a webservice which gives me a wsdl file as http://localhost/PhpPrograms/server.php?wsdl but cannot run the client code why? please do tell me as soon as possible. thanks in advance


<?php
require_once 'SOAP/Client.php';

// Modify the URL here - note the "?wsdl" at the end
$wsdl = new SOAP_WSDL ('http://localhost/PhpPrograms/server.php?wsdl');

$helloClient = $wsdl->getProxy();

echo ($helloClient->sayHello('Bill'));
?>

it gives me the following error

Catchable fatal error: Object of class SOAP_Fault could not be converted to string in C:\xampp\eclipse\workspace\PhpPrograms\client.php on line 9
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Fri Aug 31, 2007 4:54 pm    Post subject: Reply with quote

sayHello() seems to return a Soap_Fault object and not a string. The docs should tell you how you can check properly for errors.
Back to top
View user's profile Send private message
rav_nan



Joined: 21 Aug 2007
Posts: 3

PostPosted: Sat Sep 01, 2007 9:24 am    Post subject: Reply with quote

mark wrote:
sayHello() seems to return a Soap_Fault object and not a string. The docs should tell you how you can check properly for errors.



yes i have solved the problem, the problem was my Fault file in soap directory was corrupt. i changed it with a new soap directory. it started working
Back to top
View user's profile Send private message
ely_pear



Joined: 02 Oct 2007
Posts: 3

PostPosted: Tue Oct 02, 2007 5:27 pm    Post subject: Reply with quote

Hi,
where did you get the "safe" Fault.php from? I'm experiencing problems with PEAR :

SOAP_Fault Object

but my parameters are correct - from an on-line web service client passing the same parameter the service answers correctly.

thanks in advance
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