public function __construct($username, $password) { $wsseNs = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; $auth = new stdClass(); $auth->Username = new SOAPVar($username, XSD_STRING, null, null, null, $wsseNs); $auth->Password = new SOAPVar($password, XSD_STRING, null, null, null, $wsseNs); $token = new stdClass(); $token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, null, null, null, $wsseNs); parent::__construct($wsseNs, 'Security', $token, true); }
public function __construct($username, $password) { $wsseNamespace = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; $wssePasswordNS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'; $wsseUserVar = new SoapVar($username, XSD_STRING, null, null, 'Username', $wsseNamespace); $wssePassVar = new SoapVar($password, XSD_STRING, type, $wssePasswordNS, 'Password', $wsseNamespace); $wsseUserPassVar = new SoapVar(array($wsseUserVar, $wssePassVar), SOAP_ENC_OBJECT, null, null, 'UsernameToken', $wsseNamespace); $security = new SoapVar(array($wsseUserPassVar), SOAP_ENC_OBJECT); parent::SoapHeader($wsseNamespace, 'Security', $security, 1); }
function __construct($user, $pass, $ns = null) { if ($ns) { $this->wss_ns = $ns; } $auth = new stdClass(); $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $username_token = new stdClass(); $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns); $security_sv = new SoapVar(new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns), SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns); parent::__construct($this->wss_ns, 'Security', $security_sv, true); }
public function __construct($a_user, $a_pass) { $auth = new stdClass(); $auth->Username = new SoapVar($a_user, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $auth->Password = new SoapVar($a_pass, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $auth->Nonce = new SoapVar(base64_encode(sha1($a_pass . $a_user . microtime(true))), XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $current_date = new ilDateTime(time(), IL_CAL_UNIX); $current_time = $current_date->get(IL_CAL_FKT_DATE, 'Y-m-d\\TH:i:s\\Z', ilTimeZone::UTC); $auth->Created = new SoapVar($current_time, XSD_STRING, NULL, self::WSU_NS, NULL, self::WSU_NS); $un_token = new stdClass(); $un_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'UsernameToken', self::WSS_NS); $security = new SoapVar(new SoapVar($un_token, SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'UsernameToken', self::WSS_NS), SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'Security', self::WSS_NS); parent::__construct(self::WSS_NS, 'Security', $security, TRUE); }
function __construct($sessionid, $ns = null) { '<soapenv:Session xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <SessionId>' . $sessionid . '</SessionId> </soapenv:Session>'; if ($ns) { $this->wss_ns = $ns; } $session = new stdClass(); $session->SessionId = new SoapVar("<SessionId>" . $sessionid . "</SessionId>", XSD_ANYXML, NULL, $this->wss_ns, 'SessionId', $this->wss_ns); //$session_token = new stdClass(); //$session_token->Session = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns); $session_sv = new SoapVar(new SoapVar($session, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'SessionId', $this->wss_ns), SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Session', $this->wss_ns); parent::__construct($this->wss_ns, 'Session', $session_sv, true); }
function __construct($user, $pass) { $created = gmdate('Y-m-d\\TH:i:s\\Z'); $nonce = mt_rand(); $passdigest = base64_encode(pack('H*', sha1(pack('H*', $nonce) . pack('a*', $created) . pack('a*', $pass)))); $auth = new \stdClass(); $auth->Username = new SoapVar($user, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $auth->Password = new SoapVar($pass, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $auth->Nonce = new SoapVar($passdigest, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSS_NS); $auth->Created = new SoapVar($created, XSD_STRING, NULL, self::WSS_NS, NULL, self::WSU_NS); $username_token = new \stdClass(); $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'UsernameToken', self::WSS_NS); $security_sv = new SoapVar(new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'UsernameToken', self::WSS_NS), SOAP_ENC_OBJECT, NULL, self::WSS_NS, 'Security', self::WSS_NS); parent::__construct(self::WSS_NS, 'Security', $security_sv, true); }
function __construct($serviceid = null, $service = null, $subtype = null, $channel = null, $originating_party = null, $charging_mode = null) { /* '<xparams> <param key="Service-Id" value="008"/> <param key="Service" value="UseeTV_'.$service.'" /> <param key="Subtype" value="1" /> <param key="Channel" value="2" /> <param key="Originating_Party" value="tel:1441" /> <param key="charging_mode" value="A2M" /> </xparams>';*/ $session = new stdClass(); $session->SessionId = new SoapVar('<param key="Service-Id" value="008"/><param key="Service" value="UseeTV_' . $service . '" /><param key="Subtype" value="1" /><param key="Channel" value="2" /><param key="Originating_Party" value="tel:2524" /><param key="charging_mode" value="A2M" /><param key="password" value="4474" />', XSD_ANYXML, NULL, $this->wss_ns, 'xparams', $this->wss_ns); $session_sv = new SoapVar($session, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'xparams', $this->wss_ns); parent::__construct($this->wss_ns, 'xparams', $session_sv, true); }
function __construct($user, $pass, $ns = null) { '<wsse:Security soapenv:mustUnderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>int_cia_ott_api</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">int_cia_ott_api</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; if ($ns) { $this->wss_ns = $ns; } $auth = new stdClass(); $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns); $username_token = new stdClass(); $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns); $security_sv = new SoapVar(new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns), SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns); parent::__construct($this->wss_ns, 'Security', $security_sv, true); }
function __construct($data) { parent::__construct("http://testuri.org", "Test2", $data); }
public function __construct($username, $password, $ns = null) { if ($ns) { $this->wsseNamespace = $ns; } $auth = new \stdClass(); $auth->Username = new \SoapVar($username, XSD_STRING, null, $this->wsseNamespace, null, $this->wsseNamespace); $auth->Password = new \SoapVar($password, XSD_STRING, null, $this->wsseNamespace, null, $this->wsseNamespace); $usernameToken = new \stdClass(); $usernameToken->UsernameToken = new \SoapVar($auth, SOAP_ENC_OBJECT, null, $this->wsseNamespace, 'UsernameToken', $this->wsseNamespace); $token = new \SoapVar($usernameToken, SOAP_ENC_OBJECT, null, $this->wsseNamespace, 'UsernameToken', $this->wsseNamespace); $security = new \SoapVar($token, SOAP_ENC_OBJECT, null, $this->wsseNamespace, 'Security', $this->wsseNamespace); parent::__construct($this->wsseNamespace, 'Security', $security, true); }