コード例 #1
0
<?php

// include_once 'lib/nusoap.php';
include "lib/nusoap.php";
$name = 'Hassan ITANI';
$parameters = array($name);
$soap_cl = new soapclient2('http://127.0.0.1/SoapServer/index.php');
$response = $soap_cl->call('getEmail', $parameters);
//echo"<pre>";
//print_r($soap_cl);
//die("</pre>");
if (!($error = $soap_cl->getError())) {
    echo 'Email: ' . $response;
} else {
    echo 'Error: ' . $error;
}
//echo '<xmp>'.$soapClient->request.'</xmp>';
//echo '<xmp>'.$soapClient->response.'</xmp>';
コード例 #2
0
ファイル: wsdlclient9.php プロジェクト: kractos26/orfeo
 *	Service: WSDL
 *	Payload: document/literal
 *	Transport: http
 *	Authentication: digest
 */
require_once '../lib/nusoap.php';
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
echo 'You must set your username and password in the source';
exit;
$username = '******';
$password = '******';
$client = new soapclient2("http://staging.mappoint.net/standard-30/mappoint.wsdl", true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->setCredentials($username, $password, 'digest');
$view = array('Height' => 200, 'Width' => 300, 'CenterPoint' => array('Latitude' => 40, 'Longitude' => -120));
$myViews[] = new soapval('MapView', 'ViewByHeightWidth', $view, false, 'http://s.mappoint.net/mappoint-30/');
$mapSpec = array('DataSourceName' => "MapPoint.NA", 'Views' => array('MapView' => $myViews));
$map = array('specification' => $mapSpec);
$result = $client->call('GetMap', array('parameters' => $map));
// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
} else {