/** * Factory function for SoapRequest. * * @param string $content Content * @param string $location Location * @param string $action SOAP action * @param string $version SOAP version * * @return BeSimple\SoapClient\SoapRequest */ public static function create($content, $location, $action, $version) { $request = new SoapRequest(); // $content is if unmodified from SoapClient not a php string type! $request->setContent((string) $content); $request->setLocation($location); $request->setAction($action); $request->setVersion($version); $contentType = SoapMessage::getContentTypeForVersion($version); $request->setContentType($contentType); return $request; }
/** * Custom request method to be able to modify the SOAP messages. * $oneWay parameter is not used at the moment. * * @param string $request Request string * @param string $location Location * @param string $action SOAP action * @param int $version SOAP version * @param int $oneWay 0|1 * * @return string */ public function __doRequest($request, $location, $action, $version, $oneWay = 0) { // wrap request data in SoapRequest object $soapRequest = SoapRequest::create($request, $location, $action, $version); // do actual SOAP request $soapResponse = $this->__doRequest2($soapRequest); // return SOAP response to ext/soap return $soapResponse->getContent(); }