Jump to content

Pear::soap


Dorsey
 Share

Recommended Posts

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?

 

I'm looking for a simple example that creates a SOAP client object. Here's sample code I was provided:

==============================

 

// Load the PEAR::SOAP client class

require_once 'SOAP/Client.php';

 

// Read the GlobalWeather WSDL document

 

$wsdl = new PEAR::SOAP_WSDL('http://live.capescience.com/wsdl/GlobalWeather.wsdl');

 

==============================

 

I was also supplied this HTML:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 

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?

 

Thanks, all.

Dorsey

Link to comment
Share on other sites

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... :)

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 :)

Edited by TCH-Raul
Link to comment
Share on other sites

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.

 

Thanks for confirming that the sample I provided should work. I needed an independent opinion.

 

Dorsey

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...