|
@@ 1544-1567 (lines=24) @@
|
| 1541 |
|
function get_request($data="") { |
| 1542 |
|
$this->debug("entering parseRequest() on ".date("H:i Y-m-d")); |
| 1543 |
|
// get headers |
| 1544 |
|
if(function_exists("getallheaders")){ |
| 1545 |
|
$this->headers = getallheaders(); |
| 1546 |
|
foreach($this->headers as $k=>$v){ |
| 1547 |
|
$dump .= "$k: $v\r\n"; |
| 1548 |
|
$this->debug("$k: $v"); |
| 1549 |
|
} |
| 1550 |
|
// get SOAPAction header |
| 1551 |
|
if($this->headers['SOAPAction']){ |
| 1552 |
|
$this->SOAPAction = str_replace('"','',$this->headers['SOAPAction']); |
| 1553 |
|
} |
| 1554 |
|
// get the character encoding of the incoming request |
| 1555 |
|
if(strpos($headers_array['Content-Type'],"=")){ |
| 1556 |
|
$enc = str_replace("\"","",substr(strstr($headers_array["Content-Type"],"="),1)); |
| 1557 |
|
if(preg_match("/^(ISO-8859-1|US-ASCII|UTF-8)$/i",$enc)){ |
| 1558 |
|
$this->xml_encoding = $enc; |
| 1559 |
|
} else { |
| 1560 |
|
$this->xml_encoding = 'us-ascii'; |
| 1561 |
|
} |
| 1562 |
|
} |
| 1563 |
|
$this->debug("got encoding: $this->xml_encoding"); |
| 1564 |
|
} elseif(is_array($_SERVER)){ |
| 1565 |
|
$this->headers['User-Agent'] = $_SERVER['HTTP_USER_AGENT']; |
| 1566 |
|
$this->SOAPAction = $_SERVER['SOAPAction']; |
| 1567 |
|
} |
| 1568 |
|
$this->request = $dump."\r\n\r\n".$data; |
| 1569 |
|
// parse response, get soap parser obj |
| 1570 |
|
$parser = new soap_parser($data,$this->xml_encoding); |
|
@@ 1673-1696 (lines=24) @@
|
| 1670 |
|
function parse_request($data="") { |
| 1671 |
|
$this->debug("entering parseRequest() on ".date("H:i Y-m-d")); |
| 1672 |
|
// get headers |
| 1673 |
|
if(function_exists("getallheaders")){ |
| 1674 |
|
$this->headers = getallheaders(); |
| 1675 |
|
foreach($this->headers as $k=>$v){ |
| 1676 |
|
$dump .= "$k: $v\r\n"; |
| 1677 |
|
$this->debug("$k: $v"); |
| 1678 |
|
} |
| 1679 |
|
// get SOAPAction header |
| 1680 |
|
if($this->headers['SOAPAction']){ |
| 1681 |
|
$this->SOAPAction = str_replace('"','',$this->headers['SOAPAction']); |
| 1682 |
|
} |
| 1683 |
|
// get the character encoding of the incoming request |
| 1684 |
|
if(strpos($headers_array['Content-Type'],"=")){ |
| 1685 |
|
$enc = str_replace("\"","",substr(strstr($headers_array["Content-Type"],"="),1)); |
| 1686 |
|
if(preg_match("/^(ISO-8859-1|US-ASCII|UTF-8)$/i",$enc)){ |
| 1687 |
|
$this->xml_encoding = $enc; |
| 1688 |
|
} else { |
| 1689 |
|
$this->xml_encoding = 'us-ascii'; |
| 1690 |
|
} |
| 1691 |
|
} |
| 1692 |
|
$this->debug("got encoding: $this->xml_encoding"); |
| 1693 |
|
} elseif(is_array($_SERVER)){ |
| 1694 |
|
$this->headers['User-Agent'] = $_SERVER['HTTP_USER_AGENT']; |
| 1695 |
|
$this->SOAPAction = $_SERVER['SOAPAction']; |
| 1696 |
|
} |
| 1697 |
|
$this->request = $dump."\r\n\r\n".$data; |
| 1698 |
|
// parse response, get soap parser obj |
| 1699 |
|
$parser = new soap_parser($data,$this->xml_encoding); |