root/docs/usc/nautilus/usr2/prod/buoys/perl/xml/nusoap/samples/getfile1client.php

Revision 113 (checked in by jcothran, 5 years ago)

example php/perl script to process nerrs cdmo web service data to Xenia database.

Line 
1 <?php
2 /*
3  *    $Id: getfile1client.php,v 1.1 2005/05/18 14:38:53 snichol Exp $
4  *
5  *    Get file client sample.
6  *
7  *    Service: SOAP endpoint
8  *    Payload: rpc/encoded
9  *    Transport: http
10  *    Authentication: none
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 $client = new soapclient('http://www.scottnichol.com/samples/getfile1.php?wsdl', true,
18                         $proxyhost, $proxyport, $proxyusername, $proxypassword);
19 $err = $client->getError();
20 if ($err) {
21     echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
22 }
23 $result = $client->call('getFile', array('filename' => 'getfile1.php'));
24 if ($client->fault) {
25     echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';
26 } else {
27     $err = $client->getError();
28     if ($err) {
29         echo '<h2>Error</h2><pre>' . $err . '</pre>';
30     } else {
31         echo '<h2>Result</h2><pre>' . htmlspecialchars($result, ENT_QUOTES) . '</pre>';
32     }
33 }
34 echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
35 echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
36 echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
37 ?>
38
Note: See TracBrowser for help on using the browser.