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
https://forums.phpfreaks.com/topic/265849-soap-n00b-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.