Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client = new SoapClient($wsdl);
- $client->__setSoapHeaders(
- new SoapHeader(
- $nameSpace,
- 'Security',
- $secHeaderValue,
- true
- )
- );
- // The actual call
- $response = $client->Complete($paramswebservice)
- $responseHeaders = $client->__getLastResponseHeaders();
- var_dump($responseHeaders);
- /**
- * Returns the HTTP Status code of $response
- * @param string $response
- * @return string
- */
- function extract_response_http_code($response) {
- $tmp = explode('n', $response);
- $array = explode(' ', $tmp[0]);
- return $array[1];
- }
- print_r($response)
- <?php
- $result="HTTP/1.1 200 OK
- Cache-Control: private, max-age=0
- Content-Length: 1315
- Content-Type: text/xml; charset=utf-8
- Server: Microsoft-IIS/8.5
- X-Powered-By: ASP.NET
- Date: Thu, 30 Mar 2017 08:52:15 GMT";
- preg_match("/HTTP/d.ds*K[d]+/", $result,$matches);
- print_r($matches);
- Array
- (
- [0] => 200
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement