Pear::soap

liunx

Guest
PHPInfo tells me that the PEAR module is installed, and the TCH help desk me that they've installed the SOAP package. My question now is: how do I use it?<br /><br />I'm looking for a simple example that creates a SOAP client object. Here's sample code I was provided:<br />==============================<br /><br />// Load the PEAR::SOAP client class<br />require_once 'SOAP/Client.php';<br /><br />// Read the GlobalWeather WSDL document<br /><br />$wsdl = new PEAR::SOAP_WSDL('http://live.capescience.com/wsdl/GlobalWeather.wsdl');<br /><br />==============================<br /><br />I was also supplied this HTML:<br /><br /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br /> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><br />When I comment out the PHP code, the page displays. When I only remove/comment the require_once() code, PHP spits out an error at the line that tries to create the new object. Obviously, the folder I've specified is incorrect, because I haven't installed anything myself - but where is the SOAP package really, and how do I access it? Or, is the class automatically known, and I'm doing something else wrong?<br /><br />Thanks, all.<br />Dorsey<!--content-->
That's odd, PEAR's directory should be in PHP's include paths (and it is), so you shouldn't need to specify anything more than you did... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /><br />Maybe one of the tech guys can take a look at the PEAR directory and make sure SOAP is installed... though I'm pretty sure it is <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
OK, I must have had a problem of some sort of error between the actual executing code and what I provided above, as it's now creating the SOAP_WSDL object correctly.<br /><br />Thanks for confirming that the sample I provided should work. I needed an independent opinion.<br /><br />Dorsey<!--content-->
No problem. If you need anything else, just ask <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
 
Back
Top