 |
 | Problem receiving result from Microsoft Soap toolkit server |  |
Joined: 30 Jun 2006 |
Posts: 10 |
|
|
 |
Posted: Thu Jun 29, 2006 1:07 pm |
|
 |
 |
 |
 |
Hey all,
I am having a problem receiving the correct data from a server running Microsoft Soap toolkit
while i send request using the nusoap client service. It seems to not be understanding the parameters
that I am sending the other side. I continously receive and INvalid User error on there end
which just means it does not understand the parameters I am sending.
below is the nusoap client call I am using:
$parameters = array(
'name' => 'alex',
'state' => 'NJ',
'zip' => '03948',
);
// Define new object and specify location of wsdl file.
$soapclient = new soapclient('http://www.somsiete.com0?WSDL',true);
$err = $soapclient->getError();
if ($err) {
// Display the error
$answer = 'Constructor error ' . $err;
} else {
// call the method and get the result.
$result = $soapclient->call('GetPPDData',$parameters);
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($proxy->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($proxy->response, ENT_QUOTES) . '</pre>';
// Check for a fault
if ($soapclient->fault) {
$answer = 'Fault';
} else {
// Check for errors
$err = $soapclient->getError();
if ($err) {
// Display the error
$answer = 'Error ' . $err;
} else {
//concatenate all array elements into a variable to send out
while (list(,$item)=each($result)) {
$answer .= $item;
}
}
}
}
Again, is there an issue of sending nusoap messages to a server that is running the Microsoft Toolkit for soap? Any help
would be greatly appreciated. Thanks.
|
|
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
 |
 | |  |
Joined: 30 Jun 2006 |
Posts: 10 |
|
|
 |
Posted: Tue Jul 04, 2006 2:16 pm |
|
 |
 |
 |
 |
I have resolved the issue on this thread by just using the getProxy function.
I have listed the code below.
// Define needed parameters and put them in an array..
$parameters = array(
'v_state' => 'NJ',
'v_city' => 'Haledon',
);
// Define new object and specify location of wsdl file.
$soapclient = new soapclient('http://myserver',true);
$proxy = $soapclient->getProxy();
$err = $soapclient->getError();
if ($err) {
// Display the error
$answer = 'Constructor error ' . $err;
} else {
// call the method and get the result.
/* $result = $soapclient->call('GetData',$parameters,'http://myserver');*/
$result = $proxy->GetData($parameters);
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($proxy->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($proxy->response, ENT_QUOTES) . '</pre>';
Using getProxy solved my issue, however this caused another issue. The above code works fine when I am running it from my home server. However, when I try to use the same code on my work machine server I am getting some weird error:
Parse error: parse error, unexpected T_STRING in /home/oracle/infr/lib/php/nusoap.php(6983) : eval()'d code on line 1
Fatal error: Cannot instantiate non-existent class: soap_proxy_484983192 in /home/oracle/infr/lib/php/nusoap.php(6985) : eval()'d code on line 1
im not sure why this error is occuring since i am using the same php classes as my server machine at home. I will repost this in a new thread. Has anyone run into any issues using the getProxy function?
|
|
 |
 | |  |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 2
|
|
|
|  |