<?php
$wsdl = 'https://api.ipex.cz/soap/ProviderManagement/v1?wsdl';
try {
$soapClient = new SoapClient($wsdl, array('encoding' => 'UTF-8', 'trace' => 1,
'exceptions' => 1));
} catch (Exception $exc) {
echo $exc->getMessage();
}
// ziskani overovaciho tokenu
$credentials = array(
'userName' => 'prihlasovaci_jmeno',
'password' => 'heslo'
);
$out = $soapClient->__soapCall("getAccessToken", $credentials);
$accessToken = $out['accessToken'];
// nastaveni hlavicky pro overeni
$tokenHeader = new StdClass;
$tokenHeader->accessToken = $accessToken;
$soapClient->__setSoapHeaders(new SoapHeader('urn:api-ipex:providermanagement',
'verifyAccess', $tokenHeader));
// provedeni dotazu
$params = array(
'filter' => array('msisdn'=>123456789),
'detail' => 'basic'
);
$out = $soapClient->__soapCall("getMobileService", $params);
header("Content-Type:text/xml");
echo '',
$soapClient->__getLastResponse(),
'';
Obecné
Obsah
Integrace