Created
June 27, 2011 13:51
-
-
Save umpirsky/1048888 to your computer and use it in GitHub Desktop.
PHP SOAP client for .NET SOAP server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SoapClient extends \SoapClient { | |
function __doRequest($request, $location, $action, $version, $one_way = null) { | |
$headers = array( | |
'Method: POST', | |
'Connection: Close', | |
'User-Agent: PHP Soap Client', | |
'Content-Type: text/xml', | |
'SOAPAction: "' . $action . '"', | |
); | |
$ch = curl_init($location); | |
curl_setopt_array($ch, array( | |
CURLOPT_VERBOSE => false, | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_POST => true, | |
CURLOPT_POSTFIELDS => $request, | |
CURLOPT_HEADER => false, | |
CURLOPT_HTTPHEADER => $headers | |
)); | |
$response = curl_exec($ch); | |
return $response; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment