ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
wsdlclient10.php
Go to the documentation of this file.
1 <?php
2 /*
3  * $Id: wsdlclient10.php,v 1.2 2007/04/13 14:22:09 snichol Exp $
4  *
5  * WSDL client sample.
6  * Demonstrates de-serialization of a document/literal array (added nusoap.php 1.73).
7  *
8  * Service: WSDL
9  * Payload: document/literal
10  * Transport: http
11  * Authentication: none
12  */
13 require_once('../lib/nusoap.php');
14 $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
15 $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
16 $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
17 $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
18 $useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';
19 $client = new soapclient('http://www.abundanttech.com/WebServices/Population/population.asmx?WSDL', true,
21 $err = $client->getError();
22 if ($err) {
23  echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
24 }
25 $client->setUseCurl($useCURL);
26 $result = $client->call('getCountries', array(), '', '', false, true);
27 if ($client->fault) {
28  echo '<h2>Fault</h2><pre>';
29  print_r($result);
30  echo '</pre>';
31 } else {
32  $err = $client->getError();
33  if ($err) {
34  echo '<h2>Error</h2><pre>' . $err . '</pre>';
35  } else {
36  echo '<h2>Result</h2><pre>';
37  print_r($result);
38  echo '</pre>';
39  }
40 }
41 echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
42 echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
43 echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
44 ?>