By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,885 Members | 745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,885 IT Pros & Developers. It's quick & easy.

problem in passing variable from soap client to soap server

P: 26
hi All,

I got problem in passing data (more than one) from soap client to the soap server. but if i only passing one data at a time, it works successfully..
The following is the error message i get when i pass more than one data:
"SoapFault exception: [Client] looks like we got no XML document in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\p hpviewersample\clienttry2.php:24 Stack trace: #0 [internal function]: SoapClient->__call('getMap', Array) #1 C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\p hpviewersample\clienttry2.php(24): SoapClient->getMap(37563, '369499') #2 {main}"

I have trying to find out the solution but gave me no luck..I hope somebody can help me out...
thank you very much


The following is my Soap Client code in PHP:
$road="dunearn road";

$client = new SoapClient("http://localhost/stockquote3.wsdl");

$results= $client->getQuote($symbol,$road);
echo "Your search result(s):";
echo "<br><br>";

foreach ($results as $names)
echo $addres . "," . $postal;
echo "<br>";

catch (SoapFault $exception)

echo $exception;

the following is my soap server code in PHP:

class QuoteService

function getQuote($symbol,$road){

$courses = array();
mssql_connect ("localhost","user","password");
mssql_select_db ("roaddata");
$query = "SELECT Road_name,Postal_code from ADDRPT WHERE Postal_code LIKE '$symbol%' AND Road_name LIKE '$road%'";
$result = mssql_query($query);

while($course = mssql_fetch_array($result))
$courses[]= array('Road' => $course["Road_name"],'Postal'=>$course["Postal_code"]);
return $courses;

ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("http://localhost/stockquote3.wsdl");



the following is my wsdl file in XML:
<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name='StockQuote'
xmlns:tns=' '

<message name='getQuoteRequest'>
<part name='symbol'/>
<message name='getQuoteResponse'>
<part name='Result'/>

<portType name='StockQuotePortType'>
<operation name='getQuote'>
<input message='tns:getQuoteRequest'/>
<output message='tns:getQuoteResponse'/>


<binding name='StockQuoteBinding' type='tns:StockQuotePortType'>
<soap:binding style='rpc'
<operation name='getQuote'>
<soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'


<service name='StockQuoteService'>
<port name='StockQuotePort' binding='StockQuoteBinding'>
<soap:address location='http://localhost/servertry2.php'/>
Nov 20 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.