diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SoapClient.php index 5e34385..5c6f2a2 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SoapClient.php @@ -125,9 +125,11 @@ class SoapClient extends \SoapClient 'SOAPAction: "' . $soapRequest->getAction() . '"', ); // execute HTTP request with cURL - $responseSuccessfull = $this->curl->exec($soapRequest->getLocation(), + $responseSuccessfull = $this->curl->exec( + $soapRequest->getLocation(), $soapRequest->getContent(), - $headers); + $headers + ); // tracing enabled: store last request header and body if ($this->tracingEnabled === true) { $this->lastRequestHeaders = $this->curl->getRequestHeaders(); @@ -252,38 +254,6 @@ class SoapClient extends \SoapClient return $this->soapKernel; } - // TODO finish - protected function isValidSoapResponse() - { - //check if we do have a proper soap status code (if not soapfault) - $responseStatusCode = $this->curl->getResponseStatusCode(); - $response = $this->curl->getResponseBody(); - if ($responseStatusCode >= 400) { - $isError = 0; - $response = trim($response); - if (strlen($response) == 0) { - $isError = 1; - } else { - $contentType = $this->curl->getResponseContentType(); - if ($contentType != 'application/soap+xml' - && $contentType != 'application/soap+xml') { - if (strncmp($response, "curl->getResponseStatusMessage()); - } - } elseif ($responseStatusCode != 200 && $responseStatusCode != 202) { - $dom = new \DOMDocument('1.0'); - $dom->loadXML($response); - if ($dom->getElementsByTagNameNS($dom->documentElement->namespaceURI, 'Fault')->length == 0) { - throw new \SoapFault('HTTP', 'HTTP response status must be 200 or 202'); - } - } - } - /** * Downloads WSDL files with cURL. Uses all SoapClient options for * authentication. Uses the WSDL_CACHE_* constants and the 'soap.wsdl_*'