NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Nusoap, php and proxy


Joined: 05 Mar 2010
Posts: 1
Reply with quote
Hi all,

The following code is working great in one server but it does not show results in another (blank page).
The different with the servers is that the one that don't show results has a proxy connection.
How do I have to modify the code for the second server to show results?, or where do I have to look for the problem? I'm clueless Sad

Thanks a lot!



Code:

<?php


require_once('lib/nusoap.php');
require_once('lib/class.wsdlcache.php');
   $clientID = 38;
   $channelID = 51;
   $playlistID = 77;

   $webservice_username = "user";
   $webservice_password = "pass";
   $webServiceURL ="http://www.server.net/2.1/server.asmx?WSDL";

   $client = new nusoap_client($webServiceURL, 'wsdl');

        /* create the proxy object */
        $proxy = $client->getProxy();

   $err = $proxy->getError();
   if ($err) {
      echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
   }
   $session_header = "<UserCredentials xmlns='http://vidzapper.net/Webservice/'><Userid>".$webservice_username."</Userid><Password>".$webservice_password."</Password></UserCredentials>";
   $proxy->setHeaders($session_header);

   $params = array('clientID'=> $clientID, 'channelID'=> $channelID, 'playlistID'=>$playlistID);
   $results = $proxy->call('SelectContentByPlaylistID', $params);


try{

   // Check for a fault
   if ($soapCall->fault) {
      echo '<h2>Fault</h2><pre>';
         print_r($results);
      echo '</pre>';
      die;
   }
   
      echo '<h2>Result</h2><pre>';
         print_r($results);
      echo '</pre>';
      die;



} catch (SoapFault $exception) {
    echo '<h2>Exception</h2><pre>';
      print_r($exception);
   echo '</pre>';
   die;
}    



?>
View user's profileFind all posts by lleounSend private message
Nusoap, php and proxy
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