fix soap header handling

This commit is contained in:
Andreas Schamberger 2013-08-30 22:07:44 +02:00
parent 1f1d513ea3
commit 461675042a
1 changed files with 12 additions and 4 deletions

View File

@ -138,10 +138,18 @@ class SoapClient extends \SoapClient
private function __doHttpRequest(SoapRequest $soapRequest)
{
// HTTP headers
$soapVersion = $soapRequest->getVersion();
$soapAction = $soapRequest->getAction();
if (SOAP_1_1 == $soapVersion) {
$headers = array(
'Content-Type:' . $soapRequest->getContentType(),
'SOAPAction: "' . $soapRequest->getAction() . '"',
'SOAPAction: "' . $soapAction . '"',
);
} else {
$headers = array(
'Content-Type:' . $soapRequest->getContentType() . '; action="' . $soapAction . '"',
);
}
$location = $soapRequest->getLocation();
$content = $soapRequest->getContent();