NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
help with WSDL Error


Joined: 24 Nov 2009
Posts: 1
Location: Philippines
Reply with quote
Hi everyone,

I'm writing a NuSOAP client for a webservice whose wsdl is located at: http://mywebserver/eggsms/egg_sms.wsdl

I don't know what I'm doing wrong but I always get a wsdl error saying that the types are not supported

here is my code for the client:
Code:
require_once('lib/nusoap/NuSOAP.php');
include_once('lib/config.php');
$thisClient = new nusoapclient('http://mywebserver/eggsms/egg_sms.wsdl', true);
$thisClient->soap_defencoding = 'UTF-8';               

$err = $thisClient->getError();

if($err) {
   echo '<h2>Constructor Error: </h2><pre>'.$err.'</pre>';
}

$name = implode(' ', array($firstName, $lastName));
$proxy = $thisClient->getProxy();

$params = array( 'regName' => $name, 'regMSISDN' => $msisdn, 'regKey' => $EGG_API_key );
$result = $proxy->EGG_Offers_Reg($params);
//$result = $thisClient->call('EGG_Offers_Reg'

if ($proxy->fault) {
   echo '<h2>Fault</h2><pre>';
   print_r($result);
   echo '</pre>';
} else {
   // Check for errors
   $err = $proxy->getError();
   if ($err) {
      // Display the error
      echo '<h2>Error</h2><pre>' . $err . '</pre>';
}    else {
      // Display the result
      echo '<h2>Result</h2>';
      echo 'Result: SOAP Transaction completed!<br>';
      print_r($result);
   }
}
// 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>';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($proxy->debug_str, ENT_QUOTES) . '</pre>';

return $result['regReturn'];


Any help is greatky appreciated...

Thank you.
View user's profileFind all posts by revimaruSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
try to call using

$thisClient->call('EGG_Offers_Reg', array($params))

instead of

$proxy = $thisClient->getProxy();
$result = $proxy->EGG_Offers_Reg($params);

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
help with WSDL Error
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 1  

  
  
 Reply to topic