@ 2015-10-08T16:17:24Z <?php
//Username and password.
$username = 'phillip.morris@gbgplc.com';
$password = 'Sp1der031!';
$wsdl = 'https://idmp.gb.co.uk/idm-globalservices-ws/GlobalServices15b.wsdl';
$soapClient = new SoapClient($wsdl, array('compression' => SOAP_COMPRESSION_ACCEPT, 'trace' => 1, 'cache_wsdl' => WSDL_CACHE_NONE,));
//Authenticate user account and return authenticationToken
$clientIP = $_SERVER['REMOTE_ADDR'];
$authUserArray = array('username' => $username, 'userIdentity' => '', 'password' => $password, 'ipAddress' => $clientIP);
try {
$soapAuthUser = $soapClient->AuthenticateUser($authUserArray);
$authToken = $soapAuthUser->authenticationToken;
}
catch (Exception $e) {
echo '<h3>soapAuthenticateUser Exception</h3><br />';
echo '<pre>';
print_r($e);
echo '</pre>';
}
//Security Header
$objParam = new stdClass();
$objParam ->securityHeader = new stdClass();
$objParam ->securityHeader->ipAddress = $clientIP;
$objParam ->securityHeader->authenticationToken = $authToken;
$objParam ->securityHeader->username = $username;
//Configuration
$objParam ->profileRequest = new stdClass();
$objParam ->profileRequest->customerReference = 'DR-Address-PHP';
$objParam ->profileRequest->profileGuid= '6C49BC44-C104-41b2-BB62-2AE45A09DD54';
$objParam ->profileRequest->configurationId = '1';
//Address Data
$objParam ->profileRequest->requestData = new stdClass();
$objParam ->profileRequest->requestData->address = new stdClass();
$objParam ->profileRequest->requestData->address->organisation = '';
$objParam ->profileRequest->requestData->address->street = '';
$objParam ->profileRequest->requestData->address->town = '';
$objParam ->profileRequest->requestData->address->postCode = 'CH4 9GB';
$objParam ->profileRequest->requestData->address->locality = '';
$objParam ->profileRequest->requestData->address->subBuilding = '';
$objParam ->profileRequest->requestData->address->building = '';
$objParam ->profileRequest->requestData->address->subLocality = '';
$objParam ->profileRequest->requestData->address->stateRegion = '';
$objParam ->profileRequest->requestData->address->countryCode = 'GBR';
$objParam ->profileRequest->requestData->address->poBox = '';
$objParam ->profileRequest->requestData->address->freeFormatAddress = '';
//Options
$objParam ->profileRequest->requestData->options = new stdClass();
$objParam ->profileRequest->requestData->options->addressEnvelopeFormat = 'A4P';
$objParam ->profileRequest->requestData->options->offset = '0';
$objParam ->profileRequest->requestData->options->maxReturn = '0';
$objParam ->profileRequest->requestData->options->addressSearchLevel = 'PREMISE';
try
{
$objRet = $soapClient->ExecuteCapture($objParam);
echo '<h3>soapExecuteCapture Results</h3><br />';
echo '<pre>';
print_r($objRet);
echo '</pre>';}
catch (Exception $e) {
echo '<h3>soapExecuteCapture Exception</h3><br />';
echo '<pre>';
print_r($e);
echo '</pre>';
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Fatal error: Uncaught Error: Class "SoapClient" not found in /in/HXKQU:7
Stack trace:
#0 {main}
thrown in /in/HXKQU on line 7
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
35.32 ms | 401 KiB | 8 Q