Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SoapClientNG extends \SoapClient{
- public function __doRequest($req, $location, $action, $version = SOAP_1_1){
- $xml = explode("\r\n", parent::__doRequest($req, $location, $action, $version));
- $response = preg_replace( '/^(\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/', "", $xml[5] );
- return $response;
- }
- }
- try{
- $opts = array(
- 'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer' => false, 'verify_peer_name' => false)
- );
- $client = new SoapClientNG(
- 'https://sassrvc.benefitsystems.pl/SASBIWS/services/WS/ks_status?wsdl',
- array ( "encoding"=>"UTF-8",
- 'stream_context' => stream_context_create($opts),
- "trace"=>1,
- "exceptions"=>0,
- "connection_timeout"=>2000 ));
- $client->__setLocation("https://sassrvc.benefitsystems.pl/SASBIWS/services/WS/ks_status");
- $test = new \stdClass;
- $test->parameters = new \stdClass;
- $test->parameters->nr_karta = '307403677135';
- $client->ks_status($test);
- $result = $client->__getLastResponse();
- var_dump($result);
- $resultXml = simplexml_load_string($result);
- $posts = $xml->children('soapenv', true)->Body->children('n', true)->ks_statusResponse->ks_statusResult->Streams->_WEBOUT->Value;
- var_dump($posts);
- var_dump(base64_decode($result));
- } catch(SoapFault $e){
- var_dump($e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement