src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php
protected function _setRequest($request)
    {
        if ($request instanceof DOMDocument) {
            $xml = $request->saveXML();
        } elseif ($request instanceof DOMNode) {
            $xml = $request->ownerDocument->saveXML();
        } elseif ($request instanceof SimpleXMLElement) {
            $xml = $request->asXML();
        } elseif (is_object($request) || is_string($request)) {
            if (is_object($request)) {
                $xml = $request->__toString();
            } else {
                $xml = $request;
            }

            $dom = new DOMDocument();
            if (strlen($xml) == 0 || !$dom->loadXML($xml)) {
                require_once 'Zend/Soap/Server/Exception.php';
                throw new Zend_Soap_Server_Exception('Invalid XML');
            }
        }
        $this->_request = $xml;
        return $this;
    }
protected function _setRequest($request)
    {
        if ($request instanceof DOMDocument) {
            $xml = $request->saveXML();
        } elseif ($request instanceof DOMNode) {
            $xml = $request->ownerDocument->saveXML();
        } elseif ($request instanceof SimpleXMLElement) {
            $xml = $request->asXML();
        } elseif (is_object($request) || is_string($request)) {
            if (is_object($request)) {
                $xml = $request->__toString();
            } else {
                $xml = $request;
            }

            $dom = new DOMDocument();
            if (strlen($xml) == 0 || !$dom->loadXML($xml)) {
                require_once 'Zend/Soap/Server/Exception.php';
                throw new Zend_Soap_Server_Exception('Invalid XML');
            }
        }
        $this->_request = $xml;
        return $this;
    }
Set request

$request may be any of:
- DOMDocument; if so, then cast to XML
- DOMNode; if so, then grab owner document and cast to XML
- SimpleXMLElement; if so, then cast to XML
- stdClass; if so, calls __toString() and verifies XML
- string; if so, verifies XML

@param DOMDocument|DOMNode|SimpleXMLElement|stdClass|string $request
@return Zend_Soap_Server