Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Pull in the NuSOAP code
- require_once('nusoap.php');
- // Create the client instance
- // Create object
- $client = new nusoap_client('<slettet>server.php');
- // Check for an error
- $err = $client->getError();
- if ($err) {
- // Display the error
- echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
- // At this point, you know the call that follows will fail
- }
- // Call the SOAP method
- $medlemsnummer = array('142319', '142617',"7","1003");
- $result = $client->call('HentStamdata',array('medlemsnummer' => $medlemsnummer),'',"http://tempuri.org/hello");
- // Check for a fault
- if ($client->fault) {
- echo '<h2>Fault</h2><pre>';
- print_r($result);
- echo '</pre>';
- } else {
- // Check for errors
- $err = $client->getError();
- if ($err) {
- // Display the error
- echo '<h2>Error</h2><pre>' . $err . '</pre>';
- } else {
- // Display the result
- echo '<h2>Result</h2><pre>';
- print_r($result);
- echo '</pre>';
- }
- }
- ?>
- <?php
- // Display the request and response
- echo '<h2>Request</h2>';
- echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
- echo '<h2>Response</h2>';
- echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement