ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
wsdlclient7.php
Go to the documentation of this file.
1 <?php
2 /*
3  * $Id: wsdlclient7.php,v 1.2 2007/11/06 14:49:10 snichol Exp $
4  *
5  * WSDL client sample.
6  *
7  * Service: WSDL
8  * Payload: document/literal
9  * Transport: http
10  * Authentication: digest
11  */
12 require_once('../lib/nusoap.php');
13 $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
14 $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
15 $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
16 $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
17 $useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';
18 echo 'You must set your username and password in the source';
19 exit();
20 $client = new nusoap_client("http://staging.mappoint.net/standard-30/mappoint.wsdl", 'wsdl',
22 $err = $client->getError();
23 if ($err) {
24  echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
25 }
26 $client->setUseCurl($useCURL);
27 $client->loadWSDL();
28 $client->setCredentials($username, $password, 'digest');
29 $result = $client->call('GetVersionInfo', array());
30 // Check for a fault
31 if ($client->fault) {
32  echo '<h2>Fault</h2><pre>';
33  print_r($result);
34  echo '</pre>';
35 } else {
36  // Check for errors
37  $err = $client->getError();
38  if ($err) {
39  // Display the error
40  echo '<h2>Error</h2><pre>' . $err . '</pre>';
41  } else {
42  // Display the result
43  echo '<h2>Result</h2><pre>';
44  print_r($result);
45  echo '</pre>';
46  }
47 }
48 echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
49 echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
50 echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
51 ?>