Re: WSDL error can someone help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have a similar problem on my first test of webservice..the problem is that
there are no errors but it seems like if the the server.php page doesn't
work...here is the code..if you could help me :)

Server.php
<?php 
function getStockQuote($nome) { 
    mysql_connect('localhost','root'); 
    mysql_select_db('mio'); 
    $query = "SELECT * FROM nomi WHERE nome = '$nome' "; 
    $result = mysql_query($query); 

    while ($row = mysql_fetch_assoc($result)){ 

    } 
} 

require('nusoap.php'); 

$server = new nusoap_server(); 

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

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

				if ( !isset( $HTTP_RAW_POST_DATA ) ) $HTTP_RAW_POST_DATA
=file_get_contents( 'php://input' );
	$server->service($HTTP_RAW_POST_DATA); 

?> 


client.php
<html> 
<body> 

<form method="get" action="client.php"> 
  ID: <input name="symbol" type="text" value=""> 
  <br> 
  <br> 
  <input type="submit"> 
</form> 

<?php 

$symbol = $_GET['symbol']; 

if ($symbol) { 

require_once('nusoap.php'); 

//we create an array with the element name that has the form value of name 
//now we must create a soapclient object 
$c = new nusoap_client('serv.wsdl',true); 
//now we call the server. 

$stockprice = $c->call('getStockQuote', 
              array('symbol' => $symbol)); 

echo "Information for $symbol is $stockprice."; 


} 

?> 

Thank you so much!
-- 
View this message in context: http://old.nabble.com/WSDL-error-can-someone-help-tp14985983p34746594.html
Sent from the Php - Soap mailing list archive at Nabble.com.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux