CaptainChainsaw Posted July 17, 2012 Share Posted July 17, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/265849-soap-n00b-question/ Share on other sites More sharing options...
silkfire Posted July 17, 2012 Share Posted July 17, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265849-soap-n00b-question/#findComment-1362251 Share on other sites More sharing options...
Adam Posted July 17, 2012 Share Posted July 17, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/265849-soap-n00b-question/#findComment-1362254 Share on other sites More sharing options...
CaptainChainsaw Posted July 17, 2012 Author Share Posted July 17, 2012 That was it thanks. I thought the nusoap was something installed on the server, downloaded and installed - working fine now thank you. Quote Link to comment https://forums.phpfreaks.com/topic/265849-soap-n00b-question/#findComment-1362258 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.