Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Pull in the NuSOAP code
- require_once('../nusoap/lib/nusoap.php');
- // Create the client instance
- // Server Location
- $location = 'http://epl.di.uminho.pt/jcrbin/WebServices/nusoap-0.9.5/Soma2nums/serv-arit.php';
- $client = new nusoap_client($location, false);
- // Call the SOAP method
- $n1 = $_REQUEST['n1'];
- $n2 = $_REQUEST['n2'];
- $op = $_REQUEST['op'];
- $result = $client->call($op, array('n1' => $n1, 'n2' => $n2 ));
- // Display the result
- print_r($result);
- // 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>';
- // Display the debug messages
- echo '<h2>Debug</h2>';
- echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment