Jump to content

SOAP N00b question


CaptainChainsaw

Recommended Posts

Hey all,

 

I'm trying to get started with SOAP, I'm following this tutorial:

http://www.codewalkers.com/c/a/Miscellaneous/Using-SOAP-with-PHP/3/

 

As far as I can tell I've got everything I need installed.

 

soap

Soap Client enabled

Soap Server enabled

 

Directive Local Value Master Value

soap.wsdl_cache 1 1

soap.wsdl_cache_dir /tmp /tmp

soap.wsdl_cache_enabled 1 1

soap.wsdl_cache_limit 5 5

soap.wsdl_cache_ttl 86400 86400

 

 

When I try to run the following code I get the errors below

 

<?php


function getStockQuote($symbol) {

    mysql_connect("localhost", "captainc_blade42", "tr38KM00NI66uher56");
    mysql_select_db('captainc_general');
    $query = "SELECT stock_price FROM stockprices "
           . "WHERE stock_symbol = '$symbol'";
    $result = mysql_query($query);

    $row = mysql_fetch_assoc($result);
    return $row['stock_price'];
}


require_once('nusoap.php'); //use the nusoap library 

$server = new soap_server();

$server->configureWSDL('stockserver', 'urn:stockquote');

$server->register("getStockQuote",
                array('symbol' => 'xsd:string'),
                array('return' => 'xsd:decimal'),
                'urn:stockquote',
                'urn:stockquote#getStockQuote');

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA)
                      ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);

?>

 

 

Warning: require_once(nusoap.php) [function.require-once]: failed to open stream: No such file or directory in /home/captainc/public_html/soap/soaptest.php on line 17

 

Fatal error: require_once() [function.require]: Failed opening required 'nusoap.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/captainc/public_html/soap/soaptest.php on line 17

 

 

Anyone got any ideas what I need to do to sort this?

 

 

Cheers,

 

CaptainChainsaw :)

Link to comment
Share on other sites

The endless horde of noobs on these forums never cease to amaze me.

Your problem has nada to do with SOAP. Most likely the nusoap.php file is not in the same directory as your main file.

 

Bit harsh that, don't you think?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.