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) private function __doHttpRequest(SoapRequest $soapRequest)
{ {
// HTTP headers // HTTP headers
$headers = array( $soapVersion = $soapRequest->getVersion();
'Content-Type:' . $soapRequest->getContentType(), $soapAction = $soapRequest->getAction();
'SOAPAction: "' . $soapRequest->getAction() . '"', if (SOAP_1_1 == $soapVersion) {
); $headers = array(
'Content-Type:' . $soapRequest->getContentType(),
'SOAPAction: "' . $soapAction . '"',
);
} else {
$headers = array(
'Content-Type:' . $soapRequest->getContentType() . '; action="' . $soapAction . '"',
);
}
$location = $soapRequest->getLocation(); $location = $soapRequest->getLocation();
$content = $soapRequest->getContent(); $content = $soapRequest->getContent();