diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-05-07 18:45:03 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-05-07 18:45:03 +0000 |
commit | 9b661ea62e6a0b16b26604060288a6d68ca5db00 (patch) | |
tree | a37c734517dfcd7d2f4b14ebb6dd22eb021ff387 /ext/soap/tests/server029.phpt | |
parent | 146a60071192cff25737d4d360f5118b8cf90882 (diff) | |
download | php-git-9b661ea62e6a0b16b26604060288a6d68ca5db00.tar.gz |
Fixed SOAP tests and added additional tests to ensure processing POST data
works based on server001.phpt
Diffstat (limited to 'ext/soap/tests/server029.phpt')
-rw-r--r-- | ext/soap/tests/server029.phpt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/ext/soap/tests/server029.phpt b/ext/soap/tests/server029.phpt new file mode 100644 index 0000000000..26db9fd9cc --- /dev/null +++ b/ext/soap/tests/server029.phpt @@ -0,0 +1,55 @@ +--TEST-- +SOAP Server 29-CGI: new/addfunction/handle +--POST-- +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +--SKIPIF-- +<?php + if (php_sapi_name()=='cli') echo 'skip'; + require_once('skipif.inc'); +?> +--FILE-- +<?php + +echo "INPUT: \n"; +echo file_get_contents("php://input") . "\n"; +echo "\n\n-----------\n\n"; + +function test() { + return "Hello World"; +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction("test"); +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +INPUT: +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> + + +----------- + +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok
\ No newline at end of file |