Merge branch 'wsse' of https://github.com/aschamberger/BeSimpleSoap into aschamberger-wsse

Conflicts:
	.travis.yml
	src/BeSimple/SoapServer/SoapRequest.php
This commit is contained in:
Francis Besset
2013-10-30 17:00:44 +01:00
83 changed files with 3132 additions and 1236 deletions

View File

@ -32,10 +32,21 @@ class SoapRequest extends CommonSoapRequest
*/
public static function create($content, $version)
{
$content = is_null($content) ? file_get_contents("php://input") : $content;
$location = self::getCurrentUrl();
$action = isset($_SERVER[SoapMessage::SOAP_ACTION_HEADER]) ? $_SERVER[SoapMessage::SOAP_ACTION_HEADER] : null;
$contentType = $_SERVER[SoapMessage::CONTENT_TYPE_HEADER];
/*
* Work around missing header/php://input access in PHP cli webserver by
* setting headers additionally as GET parameters and SOAP request body
* explicitly as POST variable
*/
if (php_sapi_name() == "cli-server") {
$content = is_null($content) ? $_POST['request'] : $content;
$action = $_GET[SoapMessage::SOAP_ACTION_HEADER];
$contentType = $_GET[SoapMessage::CONTENT_TYPE_HEADER];
} else {
$content = is_null($content) ? file_get_contents("php://input") : $content;
$action = isset($_SERVER[SoapMessage::SOAP_ACTION_HEADER]) ? $_SERVER[SoapMessage::SOAP_ACTION_HEADER] : null];
$contentType = $_SERVER[SoapMessage::CONTENT_TYPE_HEADER];
}
$request = new SoapRequest();
// $content is if unmodified from SoapClient not a php string type!