function parse_request($data='') {
		$this->debug('entering parse_request()');
		$this->parse_http_headers();
		$this->debug('got character encoding: '.$this->xml_encoding);
		// uncompress if necessary
		if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') {
			$this->debug('got content encoding: ' . $this->headers['content-encoding']);
			if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') {
		    	// if decoding works, use it. else assume data wasn't gzencoded
				if (function_exists('gzuncompress')) {
					if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) {
						$data = $degzdata;
					} elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) {
						$data = $degzdata;
					} else {
						$this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data');
						return;
					}
				} else {
					$this->fault('SOAP-ENV:Client', 'This Server does not support compressed data');
					return;
				}
			}
		}
		$this->request .= "\r\n".$data;
		$data = $this->parseRequest($this->headers, $data);
		$this->requestSOAP = $data;
		$this->debug('leaving parse_request');
	}
function parse_request($data='') {
		$this->debug('entering parse_request()');
		$this->parse_http_headers();
		$this->debug('got character encoding: '.$this->xml_encoding);
		// uncompress if necessary
		if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') {
			$this->debug('got content encoding: ' . $this->headers['content-encoding']);
			if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') {
		    	// if decoding works, use it. else assume data wasn't gzencoded
				if (function_exists('gzuncompress')) {
					if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) {
						$data = $degzdata;
					} elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) {
						$data = $degzdata;
					} else {
						$this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data');
						return;
					}
				} else {
					$this->fault('SOAP-ENV:Client', 'This Server does not support compressed data');
					return;
				}
			}
		}
		$this->request .= "\r\n".$data;
		$data = $this->parseRequest($this->headers, $data);
		$this->requestSOAP = $data;
		$this->debug('leaving parse_request');
	}
function parse_request ( $ data = '' ) { $ this -> debug ( 'entering parse_request()' ) ; $ this -> parse_http_headers ( ) ; $ this -> debug ( 'got character encoding: ' . $ this -> xml_encoding ) ; // uncompress if necessary
 if ( isset ( $ this -> headers [ 'content-encoding' ] ) && $ this -> headers [ 'content-encoding' ] != '' ) { $ this -> debug ( 'got content encoding: ' . $ this -> headers [ 'content-encoding' ] ) ; if ( $ this -> headers [ 'content-encoding' ] == 'deflate' || $ this -> headers [ 'content-encoding' ] == 'gzip' ) { // if decoding works, use it. else assume data wasn't gzencoded
 if ( function_exists ( 'gzuncompress' ) ) { if ( $ this -> headers [ 'content-encoding' ] == 'deflate' && $ degzdata = @ gzuncompress ( $ data ) ) { $ data = $ degzdata ; } elseif ( $ this -> headers [ 'content-encoding' ] == 'gzip' && $ degzdata = gzinflate ( substr ( $ data , 10 ) ) ) { $ data = $ degzdata ; } else { $ this -> fault ( 'SOAP-ENV:Client' , 'Errors occurred when trying to decode the data' ) ; return ; } } else { $ this -> fault ( 'SOAP-ENV:Client' , 'This Server does not support compressed data' ) ; return ; } } } $ this -> request .= "\r\n" . $ data ; $ data = $ this -> parseRequest ( $ this -> headers , $ data ) ; $ this -> requestSOAP = $ data ; $ this -> debug ( 'leaving parse_request' ) ; }
parses a request

The following fields are set by this function (when successful)

headers
request
xml_encoding
SOAPAction
request
requestSOAP
methodURI
methodname
methodparams
requestHeaders
document

This sets the fault field on error

@param    string $data XML string
@access   private
parses a request