Browse Source
PHP5 support, better encoding and WSDL support, interop round 2 base and groupB
PEAR_1_4DEV
PHP5 support, better encoding and WSDL support, interop round 2 base and groupB
PEAR_1_4DEV
56 changed files with 2918 additions and 2075 deletions
-
115ext/soap/TODO
-
39ext/soap/TODO.old
-
25ext/soap/interop/base.php
-
39ext/soap/interop/client_round2.php
-
234ext/soap/interop/client_round2_interop.php
-
365ext/soap/interop/client_round2_params.php
-
2ext/soap/interop/client_round2_results.php
-
10ext/soap/interop/client_round2_run.php
-
4ext/soap/interop/config.php.dist
-
1ext/soap/interop/database_round2.sql
-
8ext/soap/interop/echoheadersvc.wsdl.php
-
85ext/soap/interop/endpointdata.sql
-
8ext/soap/interop/index.php
-
1ext/soap/interop/info.php
-
18ext/soap/interop/interop.wsdl
-
335ext/soap/interop/interop.wsdl.php
-
13ext/soap/interop/interopB.wsdl
-
35ext/soap/interop/server_round2.php
-
79ext/soap/interop/server_round2_base.php
-
59ext/soap/interop/server_round2_groupB.php
-
10ext/soap/interop/server_round2_groupC.php
-
258ext/soap/interop/server_round2_test.php
-
68ext/soap/interop/test.utility.php
-
17ext/soap/interop/testclient.php
-
17ext/soap/interop/testserver.php
-
7ext/soap/package.xml
-
519ext/soap/php_encoding.c
-
19ext/soap/php_encoding.h
-
150ext/soap/php_http.c
-
8ext/soap/php_http.h
-
288ext/soap/php_packet_soap.c
-
4ext/soap/php_packet_soap.h
-
106ext/soap/php_schema.c
-
22ext/soap/php_schema.h
-
326ext/soap/php_sdl.c
-
14ext/soap/php_sdl.h
-
81ext/soap/php_soap.h
-
41ext/soap/php_xml.c
-
2ext/soap/php_xml.h
-
981ext/soap/soap.c
-
33ext/soap/tests/server001.phpt
-
37ext/soap/tests/server002.phpt
-
32ext/soap/tests/server003.phpt
-
40ext/soap/tests/server004.phpt
-
36ext/soap/tests/server005.phpt
-
42ext/soap/tests/server006.phpt
-
26ext/soap/tests/server007.phpt
-
29ext/soap/tests/server008.phpt
-
61ext/soap/tests/server009.phpt
-
61ext/soap/tests/server010.phpt
-
26ext/soap/tests/server011.phpt
-
18ext/soap/tests/server012.phpt
-
44ext/soap/tests/server013.phpt
-
37ext/soap/tests/server014.phpt
-
3ext/soap/tests/skipif.inc
-
55ext/soap/tests/test.wsdl
@ -1,39 +1,82 @@ |
|||
TODO: |
|||
make sure soap 1.1 and 1.2 is supported fully |
|||
Better WSDL support Client and server (how much validation is needed here?) |
|||
UDDI?? |
|||
make internal refrences for soap encoding (use seralization logic) |
|||
add ini option for always soap_error_handler |
|||
provide user space overriding of serialization certin objects and types |
|||
serialization in general needs to be polished/finished... all xsd types |
|||
make perstistant objects and work with or without register_globals on |
|||
look to see if php-soap will work with out always_populate_raw_post_data on |
|||
see if client will work with ssl.. should be eaiser with php_streams |
|||
work on soap seralizer (php serialization) |
|||
work on a soap-service 'regiestry' and 'proxy' (apache soap style) |
|||
convert all string mainpulation to use smart_str |
|||
make the 'soap' packet abstract.. maybe incorperate xml-rpc |
|||
make the transport layer abstract.. what other transport layers are needed?... who uses smtp? what about jabber? |
|||
make $soap_object->data = 'text'; maybe invoke a set_*() and/or get_*() method |
|||
when using wsdls and function names are similar find the best match |
|||
void test(int); |
|||
void test(string); |
|||
maybe use the same alogrithim as ext/java. |
|||
investigate further http keep_alive... inital testing proved slower.. maybe php_streams will speed things up.. |
|||
provide schema 1999/2001 support.... |
|||
through memory leak testing |
|||
possible using shared memory for sdl caching... |
|||
api for clearing/checking sdl caching... |
|||
make php-soap work as a standalone server using php_streams and the new socket extension |
|||
http authication |
|||
proxy support |
|||
wsdl generation static and auto (.net style (http://server.com/soapserver.php?WSDL)) using phpdoc parsing engine |
|||
interpo testing... |
|||
BENCHMARKING...... lets prove how fast it is. |
|||
do some more work on website |
|||
General |
|||
------- |
|||
- rename soapobject to soapclient |
|||
- make sure soapvar and soapparam are really need |
|||
- make sure soapserver.map(), soap_encode_to_xml() and soap_encode_to_zval() are really need |
|||
|
|||
does this list stop... what exactly have i done? |
|||
im sure im forgetting 20 thousand more things.... |
|||
SOAP |
|||
---- |
|||
- support for SOAP headers |
|||
- mustUnderstend attribute |
|||
- make sure soap 1.1 and 1.2 are supported fully |
|||
|
|||
Encoding |
|||
-------- |
|||
- full support for standard simple types ( |
|||
- duration, |
|||
- anyURI, |
|||
- QName, |
|||
- NOTATION, |
|||
- normalizedString, |
|||
- token, |
|||
- language, |
|||
- NMTOKEN, |
|||
- Name, |
|||
- NCName, |
|||
- ID, |
|||
- IDREF, |
|||
- IDREFS, |
|||
- ENTITY, |
|||
- ENTITIES, |
|||
- unsignedLong) |
|||
- full support for standard date/time types ( |
|||
? dateTime, |
|||
? time, |
|||
? date, |
|||
? gYearMonth, |
|||
? gYear, |
|||
? gMonthDay, |
|||
? gDay, |
|||
? gMonth) |
|||
? proper encoding of standard hexBinary type |
|||
? proper encoding of standard base64Binary type |
|||
- full support for arrays |
|||
? arrayType attribute |
|||
- offset attribute |
|||
- position attribute |
|||
? multidimensional arrays |
|||
? arrays of arrays |
|||
? provide schema 1999/2001 support??? |
|||
? make internal refrences for soap encoding (use seralization logic)??? |
|||
? provide user space overriding of serialization certin objects and types??? |
|||
|
|||
- brad |
|||
WSDL |
|||
---- |
|||
? support for style "rpc"/"document" encoding |
|||
? support for "encoded"/"literal" encoding |
|||
? support for "nillable" and "nil" |
|||
- function/method overloading (test(int); test(string)) |
|||
- wsdl caching |
|||
- wsdl auto generation |
|||
|
|||
Error Handling |
|||
-------------- |
|||
- ??? |
|||
|
|||
Transport |
|||
--------- |
|||
? support for https:// |
|||
- support for persistent HTTP connections (keep_alive) |
|||
- support for HTTP compression (gzip,x-gzip,defalte) |
|||
- support for HTTP athentication |
|||
- support for HTTP proxies |
|||
- transport abstraction layer |
|||
|
|||
UDDI |
|||
---- |
|||
- ??? |
|||
|
|||
Interop Testing |
|||
--------------- |
|||
- more rounds/groups |
|||
- ??? |
|||
@ -0,0 +1,39 @@ |
|||
TODO: |
|||
make sure soap 1.1 and 1.2 is supported fully |
|||
Better WSDL support Client and server (how much validation is needed here?) |
|||
UDDI?? |
|||
make internal refrences for soap encoding (use seralization logic) |
|||
add ini option for always soap_error_handler |
|||
provide user space overriding of serialization certin objects and types |
|||
serialization in general needs to be polished/finished... all xsd types |
|||
make perstistant objects and work with or without register_globals on |
|||
look to see if php-soap will work with out always_populate_raw_post_data on |
|||
see if client will work with ssl.. should be eaiser with php_streams |
|||
work on soap seralizer (php serialization) |
|||
-work on a soap-service 'regiestry' and 'proxy' (apache soap style) |
|||
-convert all string mainpulation to use smart_str |
|||
make the 'soap' packet abstract.. maybe incorperate xml-rpc |
|||
make the transport layer abstract.. what other transport layers are needed?... who uses smtp? what about jabber? |
|||
make $soap_object->data = 'text'; maybe invoke a set_*() and/or get_*() method |
|||
when using wsdls and function names are similar find the best match |
|||
void test(int); |
|||
void test(string); |
|||
maybe use the same alogrithim as ext/java. |
|||
investigate further http keep_alive... inital testing proved slower.. maybe php_streams will speed things up.. |
|||
provide schema 1999/2001 support.... |
|||
through memory leak testing |
|||
possible using shared memory for sdl caching... |
|||
api for clearing/checking sdl caching... |
|||
make php-soap work as a standalone server using php_streams and the new socket extension |
|||
http authication |
|||
proxy support |
|||
wsdl generation static and auto (.net style (http://server.com/soapserver.php?WSDL)) using phpdoc parsing engine |
|||
interpo testing... |
|||
BENCHMARKING...... lets prove how fast it is. |
|||
do some more work on website |
|||
|
|||
does this list stop... what exactly have i done? |
|||
im sure im forgetting 20 thousand more things.... |
|||
|
|||
|
|||
- brad |
|||
@ -1,25 +0,0 @@ |
|||
<?php |
|||
//
|
|||
// +----------------------------------------------------------------------+
|
|||
// | PHP Version 4 |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Copyright (c) 1997-2003 The PHP Group |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | This source file is subject to version 2.02 of the PHP license, |
|
|||
// | that is bundled with this package in the file LICENSE, and is |
|
|||
// | available at through the world-wide-web at |
|
|||
// | http://www.php.net/license/2_02.txt. |
|
|||
// | If you did not receive a copy of the PHP license and are unable to |
|
|||
// | obtain it through the world-wide-web, please send a note to |
|
|||
// | license@php.net so we can mail you a copy immediately. |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
|||
// +----------------------------------------------------------------------+
|
|||
//
|
|||
// $Id$
|
|||
//
|
|||
class Interop_Base |
|||
{ |
|||
} |
|||
|
|||
?>
|
|||
@ -0,0 +1,4 @@ |
|||
<?php |
|||
// configuration items |
|||
$interopConfig['DSN'] = 'mysql://root@localhost/soapinterop'; |
|||
?> |
|||
@ -1,85 +0,0 @@ |
|||
# phpMyAdmin MySQL-Dump |
|||
# version 2.2.5 |
|||
# http://phpwizard.net/phpMyAdmin/ |
|||
# http://phpmyadmin.sourceforge.net/ (download page) |
|||
# |
|||
# Host: localhost |
|||
# Generation Time: Jul 14, 2002 at 03:13 PM |
|||
# Server version: 3.23.49 |
|||
# PHP Version: 4.2.1 |
|||
# Database : `interop2` |
|||
|
|||
# |
|||
# Dumping data for table `endpoints` |
|||
# |
|||
|
|||
INSERT INTO endpoints VALUES (1, '4s4c', 'http://soap.4s4c.com/ilab/soap.asp', 'http://www.pocketsoap.com/services/ilab.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (2, '4s4c v2.0', 'http://soap.4s4c.com/ilab2/soap.asp', 'http://soap.4s4c.com/ilab2/ilab.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (3, 'Apache Axis', 'http://nagoya.apache.org:5049/axis/services/echo', 'http://nagoya.apache.org:5049/axis/services/echo?wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (4, 'Apache SOAP 2.2', 'http://nagoya.apache.org:5049/soap/servlet/rpcrouter', 'http://www.apache.org/~rubys/ApacheSoap.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (5, 'ASP.NET Web Services', 'http://www.mssoapinterop.org/asmx/simple.asmx', 'http://www.mssoapinterop.org/asmx/simple.asmx?wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (6, 'CapeConnect', 'http://interop.capeclear.com/ccx/soapbuilders-round2', 'http://interop.capeclear.com/wsdl/soapbuilders-round2.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (7, 'Delphi SOAP', 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropService.exe/soap/InteropTestPortType', 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropService.exe/wsdl/InteropTestPortType', 'base', 1); |
|||
INSERT INTO endpoints VALUES (8, 'EasySoap++', 'http://easysoap.sourceforge.net/cgi-bin/interopserver', 'http://easysoap.sourceforge.net/interopA.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (9, 'eSOAP', 'http://www.quakersoft.net/cgi-bin/interop2_server.cgi', 'http://www.quakersoft.net/wsdl/interop2.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (10, 'gSOAP', 'http://websrv.cs.fsu.edu/~engelen/interop2.cgi', 'http://www.cs.fsu.edu/~engelen/interop2.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (11, 'Frontier', 'http://www.soapware.org/xmethodsInterop', '', 'base', 1); |
|||
INSERT INTO endpoints VALUES (12, 'GLUE', 'http://www.themindelectric.net:8005/glue/round2', 'http://www.themindelectric.net:8005/glue/round2.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (13, 'HP SOAP', 'http://soap.bluestone.com/hpws/soap/EchoService', 'http://soap.bluestone.com/hpws/soap/EchoService.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (14, 'IONA XMLBus', 'http://interop.xmlbus.com:7002/xmlbus/container/InteropTest/BaseService/BasePort', 'http://interop.xmlbus.com:7002/xmlbus/container/InteropTest/BaseService/BasePort', 'base', 1); |
|||
INSERT INTO endpoints VALUES (15, 'IONA XMLBus (CORBA)', 'http://interop.xmlbus.com:7002/xmlbus/container/CORBAInterop/BaseService/BasePort', 'http://interop.xmlbus.com:7002/xmlbus/container/CORBAInterop/BaseService/BasePort', 'base', 1); |
|||
INSERT INTO endpoints VALUES (16, 'kSOAP', 'http://kissen.cs.uni-dortmund.de:8080/ksoapinterop', 'http://www.whitemesa.com/interop/kSOAP.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (17, 'MS .NET Remoting', 'http://www.mssoapinterop.org/remoting/ServiceA.soap', 'http://www.mssoapinterop.org/remoting/ServiceA.soap?wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (18, 'MS SOAP ToolKit 2.0', 'http://mssoapinterop.org/stk/Interop.wsdl', 'http://mssoapinterop.org/stk/Interop.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (19, 'MS SOAP ToolKit 3.0', 'http://mssoapinterop.org/stkV3/Interop.wsdl', 'http://mssoapinterop.org/stkV3/Interop.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (20, 'NuSOAP', 'http://dietrich.ganx4.com/nusoap/testbed/round2_base_server.php', 'http://dietrich.ganx4.com/nusoap/testbed/round2_base.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (21, 'OpenLink', 'http://demo.openlinksw.com:8890/Interop', 'http://demo.openlinksw.com:8890/Interop/services.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (24, 'SIM', 'http://soapinterop.simdb.com/round2', 'http://soapinterop.simdb.com/round2?WSDL', 'base', 1); |
|||
INSERT INTO endpoints VALUES (25, 'SOAP4R', 'http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/', 'http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/SOAP4R_SOAPBuildersInteropTest_R2base.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (26, 'SOAP:Lite', 'http://services.soaplite.com/interop.cgi', 'http://services.soaplite.com/interop2.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (27, 'Spheon JSOAP', 'http://213.23.125.181:8081/RPC', 'http://213.23.125.181:8081/interop.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (28, 'Spray 2001', 'http://www.dolphinharbor.org/services/interop2001', 'http://www.dolphinharbor.org/services/interop2001/service.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (29, 'SQLData SOAP Server', 'http://soapclient.com/interop/sqldatainterop.wsdl', 'http://soapclient.com/interop/sqldatainterop.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (30, 'WASP Advanced 3.0', 'http://soap.systinet.net:6060/InteropService/', 'http://soap.systinet.net:6060/InteropService/', 'base', 1); |
|||
INSERT INTO endpoints VALUES (32, 'White Mesa SOAP Server', 'http://www.whitemesa.net/interop/std', 'http://www.whitemesa.net/wsdl/std/interop.wsdl', 'base', 1); |
|||
INSERT INTO endpoints VALUES (33, 'PEAR SOAP', 'http://localhost/soap_interop/server_round2.php', 'http://localhost/soap_interop/interop.wsdl.php', 'base', 1); |
|||
INSERT INTO endpoints VALUES (34, '4s4c', 'http://soap.4s4c.com/ilab/soap.asp', 'http://www.pocketsoap.com/services/ilab_b.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (35, '4s4c v2.0', 'http://soap.4s4c.com/ilab2/soap.asp', 'http://soap.4s4c.com/ilab2/ilab_b.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (36, 'Apache Axis', 'http://nagoya.apache.org:5049/axis/services/echo', 'http://nagoya.apache.org:5049/axis/services/echo?wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (37, 'ASP.NET Web Services', 'http://www.mssoapinterop.org/asmx/simpleB.asmx', 'http://www.mssoapinterop.org/asmx/simpleb.asmx?wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (38, 'Delphi SOAP', 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropGroupB.exe/soap/InteropTestPortTypeB', 'http://soap-server.borland.com/WebServices/Interop/cgi-bin/InteropGroupB.exe/wsdl/InteropTestPortTypeB', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (39, 'EasySoap++', 'http://easysoap.sourceforge.net/cgi-bin/interopserver', 'http://easysoap.sourceforge.net/interopB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (40, 'GLUE', 'http://www.themindelectric.net:8005/glue/round2B', 'http://www.themindelectric.net:8005/glue/round2B.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (41, 'gSOAP', 'http://websrv.cs.fsu.edu/~engelen/interop2B.cgi', 'http://www.cs.fsu.edu/~engelen/interop2B.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (42, 'HP SOAP', 'http://soap.bluestone.com/hpws/soap/EchoService', 'http://soap.bluestone.com/hpws/soap/EchoService.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (43, 'IONA XMLBus', 'http://interop.xmlbus.com:7002/xmlbus/container/InteropTest/GroupBService/GroupBPort', 'http://interop.xmlbus.com:7002/xmlbus/container/InteropTest/GroupBService/GroupBPort', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (44, 'MS .NET Remoting', 'http://www.mssoapinterop.org/remoting/ServiceB.soap', 'http://www.mssoapinterop.org/remoting/ServiceB.soap?wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (45, 'MS SOAP ToolKit 2.0', 'http://mssoapinterop.org/stk/InteropBtyped.wsdl', 'http://mssoapinterop.org/stk/InteropBtyped.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (46, 'MS SOAP ToolKit 3.0', 'http://mssoapinterop.org/stkV3/InteropB.wsdl', 'http://mssoapinterop.org/stkV3/InteropB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (47, 'NuSOAP', 'http://dietrich.ganx4.com/nusoap/testbed/round2_groupb_server.php', 'http://dietrich.ganx4.com/nusoap/testbed/round2_groupb.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (48, 'OpenLink', 'http://demo.openlinksw.com:8890/Interop', 'http://demo.openlinksw.com:8890/Interop/services.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (50, 'SIM', 'http://soapinterop.simdb.com/round2B', 'http://soapinterop.simdb.com/round2B?WSDL', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (51, 'SOAP4R', 'http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/', 'http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/SOAP4R_SOAPBuildersInteropTest_R2GroupB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (52, 'SOAP:Lite', 'http://services.soaplite.com/interop.cgi', 'http://services.soaplite.com/InteropTestB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (53, 'Spheon JSOAP', 'http://213.23.125.181:8081/RPC', 'http://213.23.125.181:8081/interopb.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (54, 'Spray 2001', 'http://www.dolphinharbor.org/services/interopB2001', 'http://www.dolphinharbor.org/services/interopB2001/service.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (55, 'SQLData SOAP Server', 'http://soapclient.com/interop/InteropB.wsdl', 'http://soapclient.com/interop/InteropB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (56, 'WASP Advanced 3.0', 'http://soap.systinet.net:6060/InteropBService/', 'http://soap.systinet.net:6060/InteropBService/', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (58, 'White Mesa SOAP Server', 'http://www.whitemesa.net/interop/std/groupB', 'http://www.whitemesa.net/wsdl/std/interopB.wsdl', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (59, 'PEAR SOAP', 'http://localhost/soap_interop/server_round2.php', 'http://localhost/soap_interop/interopB.wsdl.php', 'GroupB', 1); |
|||
INSERT INTO endpoints VALUES (60, '4s4c v2.0', 'http://soap.4s4c.com/ilab2/soap.asp', 'http://soap.4s4c.com/ilab2/ilab_c.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (61, 'Apache Axis', 'http://nagoya.apache.org:5049/axis/services/echo', 'http://nagoya.apache.org:5049/axis/services/echo?wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (62, 'ASP.NET Web Services', 'http://mssoapinterop.org/asmx/header.asmx', 'http://mssoapinterop.org/asmx/header.asmx?wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (63, 'EasySoap++', 'http://easysoap.sourceforge.net/cgi-bin/interopserver', 'http://easysoap.sourceforge.net/interopC.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (64, 'MS SOAP ToolKit 2.0', 'http://mssoapinterop.org/stk/InteropC.wsdl', 'http://mssoapinterop.org/stk/InteropC.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (65, 'MS SOAP ToolKit 3.0', 'http://mssoapinterop.org/stkV3/InteropC.wsdl', 'http://mssoapinterop.org/stkV3/InteropC.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (66, 'OpenLink', 'http://demo.openlinksw.com:8890/Interop', 'http://demo.openlinksw.com:8890/Interop/services.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (67, 'SOAP:Lite', 'http://services.soaplite.com/interopC.cgi', 'http://services.soaplite.com/InteropTestC.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (68, 'Spray 2001', 'http://www.dolphinharbor.org/services/interopC', 'http://www.dolphinharbor.org/services/interopC/service.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (69, 'SQLData SOAP Server', 'http://soapclient.com/interop/interopC.wsdl', 'http://soapclient.com/interop/interopC.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (70, 'WASP Advanced 3.0', 'http://soap.systinet.net:6060/InteropCService/', 'http://soap.systinet.net:6060/InteropCService/', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (71, 'White Mesa SOAP Server', 'http://www.whitemesa.net/interop/std/echohdr', 'http://www.whitemesa.net/wsdl/std/echoheadersvc.wsdl', 'GroupC', 1); |
|||
INSERT INTO endpoints VALUES (72, 'PEAR SOAP', 'http://localhost/soap_interop/server_round2.php', 'http://localhost/soap_interop/echoheadersvc.wsdl.php', 'GroupC', 1); |
|||
|
|||
|
|||
|
|||
@ -1 +0,0 @@ |
|||
<?php phpinfo(); ?>
|
|||
@ -1,18 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" |
|||
xmlns="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:tns="http://soapinterop.org/"> |
|||
|
|||
<import location="http://www.whitemesa.com/wsdl/wmmsgrouter.xsd" namespace="http://whitemesa.com/headers/soapmsgrouter.xsd"/> |
|||
<import location="http://www.whitemesa.com/interop/InteropTest.wsdl" namespace="http://soapinterop.org/"/> |
|||
<import location="http://www.whitemesa.com/interop/InteropTest.wsdl" namespace="http://soapinterop.org/xsd"/> |
|||
|
|||
<service name="interopLab"> |
|||
<port name="interopTestPort" binding="tns:InteropTestSoapBinding"> |
|||
<soap:address location="http://localhost/soap_interop/server_round2.php"/> |
|||
</port> |
|||
</service> |
|||
|
|||
</definitions> |
|||
@ -0,0 +1,335 @@ |
|||
<?php |
|||
header("Content-Type: text/xml"); |
|||
echo '<?xml version="1.0"?>'; |
|||
echo "\n"; |
|||
?>
|
|||
<definitions name="InteropTest" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:tns="http://soapinterop.org/" |
|||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns="http://schemas.xmlsoap.org/wsdl/" |
|||
targetNamespace="http://soapinterop.org/"> |
|||
|
|||
<types> |
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/"> |
|||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> |
|||
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> |
|||
<xsd:complexType name="ArrayOfstring"> |
|||
<xsd:complexContent> |
|||
<xsd:restriction base="SOAP-ENC:Array"> |
|||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/> |
|||
</xsd:restriction> |
|||
</xsd:complexContent> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="ArrayOfint"> |
|||
<xsd:complexContent> |
|||
<xsd:restriction base="SOAP-ENC:Array"> |
|||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/> |
|||
</xsd:restriction> |
|||
</xsd:complexContent> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="ArrayOffloat"> |
|||
<xsd:complexContent> |
|||
<xsd:restriction base="SOAP-ENC:Array"> |
|||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/> |
|||
</xsd:restriction> |
|||
</xsd:complexContent> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="SOAPStruct"> |
|||
<xsd:all> |
|||
<xsd:element name="varString" type="string"/> |
|||
<xsd:element name="varInt" type="int"/> |
|||
<xsd:element name="varFloat" type="float"/> |
|||
</xsd:all> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="ArrayOfSOAPStruct"> |
|||
<xsd:complexContent> |
|||
<xsd:restriction base="SOAP-ENC:Array"> |
|||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:SOAPStruct[]"/> |
|||
</xsd:restriction> |
|||
</xsd:complexContent> |
|||
</xsd:complexType> |
|||
</schema> |
|||
</types> |
|||
|
|||
<message name="echoStringRequest"> |
|||
<part name="inputString" type="xsd:string" /> |
|||
</message> |
|||
<message name="echoStringResponse"> |
|||
<part name="outputString" type="xsd:string" /> |
|||
</message> |
|||
<message name="echoStringArrayRequest"> |
|||
<part name="inputStringArray" type="tns:ArrayOfstring" /> |
|||
</message> |
|||
<message name="echoStringArrayResponse"> |
|||
<part name="outputStringArray" type="tns:ArrayOfstring" /> |
|||
</message> |
|||
<message name="echoIntegerRequest"> |
|||
<part name="inputInteger" type="xsd:int" /> |
|||
</message> |
|||
<message name="echoIntegerResponse"> |
|||
<part name="outputInteger" type="xsd:int" /> |
|||
</message> |
|||
<message name="echoIntegerArrayRequest"> |
|||
<part name="inputIntegerArray" type="tns:ArrayOfint" /> |
|||
</message> |
|||
<message name="echoIntegerArrayResponse"> |
|||
<part name="outputIntegerArray" type="tns:ArrayOfint" /> |
|||
</message> |
|||
<message name="echoFloatRequest"> |
|||
<part name="inputFloat" type="xsd:float" /> |
|||
</message> |
|||
<message name="echoFloatResponse"> |
|||
<part name="outputFloat" type="xsd:float" /> |
|||
</message> |
|||
<message name="echoFloatArrayRequest"> |
|||
<part name="inputFloatArray" type="tns:ArrayOffloat" /> |
|||
</message> |
|||
<message name="echoFloatArrayResponse"> |
|||
<part name="outputFloatArray" type="tns:ArrayOffloat" /> |
|||
</message> |
|||
<message name="echoStructRequest"> |
|||
<part name="inputStruct" type="tns:SOAPStruct" /> |
|||
</message> |
|||
<message name="echoStructResponse"> |
|||
<part name="outputStruct" type="tns:SOAPStruct" /> |
|||
</message> |
|||
<message name="echoStructArrayRequest"> |
|||
<part name="inputStructArray" type="tns:ArrayOfSOAPStruct" /> |
|||
</message> |
|||
<message name="echoStructArrayResponse"> |
|||
<part name="outputStructArray" type="tns:ArrayOfSOAPStruct" /> |
|||
</message> |
|||
<message name="echoVoidRequest"> |
|||
</message> |
|||
<message name="echoVoidResponse"> |
|||
</message> |
|||
<message name="echoBase64Request"> |
|||
<part name="inputBase64" type="xsd:base64Binary" /> |
|||
</message> |
|||
<message name="echoBase64Response"> |
|||
<part name="outputBase64" type="xsd:base64Binary" /> |
|||
</message> |
|||
<message name="echoDateRequest"> |
|||
<part name="inputDate" type="xsd:dateTime" /> |
|||
</message> |
|||
<message name="echoDateResponse"> |
|||
<part name="outputDate" type="xsd:dateTime" /> |
|||
</message> |
|||
<message name="echoHexBinaryRequest"> |
|||
<part name="inputHexBinary" type="xsd:hexBinary" /> |
|||
</message> |
|||
<message name="echoHexBinaryResponse"> |
|||
<part name="outputHexBinary" type="xsd:hexBinary" /> |
|||
</message> |
|||
<message name="echoDecimalRequest"> |
|||
<part name="inputDecimal" type="xsd:decimal" /> |
|||
</message> |
|||
<message name="echoDecimalResponse"> |
|||
<part name="outputDecimal" type="xsd:decimal" /> |
|||
</message> |
|||
<message name="echoBooleanRequest"> |
|||
<part name="inputBoolean" type="xsd:boolean" /> |
|||
</message> |
|||
<message name="echoBooleanResponse"> |
|||
<part name="outputBoolean" type="xsd:boolean" /> |
|||
</message> |
|||
|
|||
<portType name="InteropTestPortType"> |
|||
<operation name="echoString"> |
|||
<input message="tns:echoStringRequest"/> |
|||
<output message="tns:echoStringResponse"/> |
|||
</operation> |
|||
<operation name="echoStringArray"> |
|||
<input message="tns:echoStringArrayRequest"/> |
|||
<output message="tns:echoStringArrayResponse"/> |
|||
</operation> |
|||
<operation name="echoInteger"> |
|||
<input message="tns:echoIntegerRequest"/> |
|||
<output message="tns:echoIntegerResponse"/> |
|||
</operation> |
|||
<operation name="echoIntegerArray"> |
|||
<input message="tns:echoIntegerArrayRequest"/> |
|||
<output message="tns:echoIntegerArrayResponse"/> |
|||
</operation> |
|||
<operation name="echoFloat"> |
|||
<input message="tns:echoFloatRequest"/> |
|||
<output message="tns:echoFloatResponse"/> |
|||
</operation> |
|||
<operation name="echoFloatArray"> |
|||
<input message="tns:echoFloatArrayRequest"/> |
|||
<output message="tns:echoFloatArrayResponse"/> |
|||
</operation> |
|||
<operation name="echoStruct"> |
|||
<input message="tns:echoStructRequest"/> |
|||
<output message="tns:echoStructResponse"/> |
|||
</operation> |
|||
<operation name="echoStructArray"> |
|||
<input message="tns:echoStructArrayRequest"/> |
|||
<output message="tns:echoStructArrayResponse"/> |
|||
</operation> |
|||
<operation name="echoVoid"> |
|||
<input message="tns:echoVoidRequest"/> |
|||
<output message="tns:echoVoidResponse"/> |
|||
</operation> |
|||
<operation name="echoBase64"> |
|||
<input message="tns:echoBase64Request"/> |
|||
<output message="tns:echoBase64Response"/> |
|||
</operation> |
|||
<operation name="echoDate"> |
|||
<input message="tns:echoDateRequest"/> |
|||
<output message="tns:echoDateResponse"/> |
|||
</operation> |
|||
<operation name="echoHexBinary"> |
|||
<input message="tns:echoHexBinaryRequest"/> |
|||
<output message="tns:echoHexBinaryResponse"/> |
|||
</operation> |
|||
<operation name="echoDecimal"> |
|||
<input message="tns:echoDecimalRequest"/> |
|||
<output message="tns:echoDecimalResponse"/> |
|||
</operation> |
|||
<operation name="echoBoolean"> |
|||
<input message="tns:echoBooleanRequest"/> |
|||
<output message="tns:echoBooleanResponse"/> |
|||
</operation> |
|||
</portType> |
|||
|
|||
<binding name="InteropTestBinding" type="tns:InteropTestPortType"> |
|||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> |
|||
<operation name="echoString"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoStringArray"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoInteger"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoIntegerArray"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoFloat"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoFloatArray"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoStruct"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoStructArray"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoVoid"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoBase64"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoDate"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoHexBinary"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoDecimal"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
<operation name="echoBoolean"> |
|||
<soap:operation soapAction="http://" style="rpc"/> |
|||
<input> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
|||
</output> |
|||
</operation> |
|||
</binding> |
|||
|
|||
<service name="InteropTest"> |
|||
<port name="InteropTestPort" binding="tns:InteropTestBinding"> |
|||
<soap:address location="http://<?php echo ($_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']));?>/server_round2_base.php"/> |
|||
</port> |
|||
</service> |
|||
|
|||
</definitions> |
|||
@ -1,13 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:s="http://soapinterop.org/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> |
|||
|
|||
<import location="http://www.whitemesa.com/interop/InteropTestB.wsdl" namespace="http://soapinterop.org/"/> |
|||
<import location="http://www.whitemesa.com/interop/InteropTestB.wsdl" namespace="http://soapinterop.org/xsd"/> |
|||
|
|||
<service name="interopLabB"> |
|||
<port name="interopTestPortB" binding="tns:InteropTestSoapBindingB"> |
|||
<soap:address location="http://localhost/soap_interop/server_round2.php"/> |
|||
</port> |
|||
</service> |
|||
|
|||
</definitions> |
|||
@ -1,35 +0,0 @@ |
|||
<?php |
|||
//
|
|||
// +----------------------------------------------------------------------+
|
|||
// | PHP Version 4 |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Copyright (c) 1997-2003 The PHP Group |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | This source file is subject to version 2.02 of the PHP license, |
|
|||
// | that is bundled with this package in the file LICENSE, and is |
|
|||
// | available at through the world-wide-web at |
|
|||
// | http://www.php.net/license/2_02.txt. |
|
|||
// | If you did not receive a copy of the PHP license and are unable to |
|
|||
// | obtain it through the world-wide-web, please send a note to |
|
|||
// | license@php.net so we can mail you a copy immediately. |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
|||
// +----------------------------------------------------------------------+
|
|||
//
|
|||
// $Id$
|
|||
//
|
|||
|
|||
require_once 'SOAP/Server.php'; |
|||
|
|||
$server = new SOAP_Server; |
|||
|
|||
require_once 'server_round2_base.php'; |
|||
require_once 'server_round2_groupB.php'; |
|||
require_once 'server_round2_groupC.php'; |
|||
|
|||
$server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL); |
|||
#echo "Content-Length is {$_SERVER['CONTENT_LENGTH']}\n\n";
|
|||
#echo "<!---\n\nlen:".strlen($HTTP_RAW_POST_DATA)."\n\n";
|
|||
#echo "[$HTTP_RAW_POST_DATA";
|
|||
#print "]\n\nend of input data-->";
|
|||
?>
|
|||
@ -1,258 +0,0 @@ |
|||
<?php |
|||
//
|
|||
// +----------------------------------------------------------------------+
|
|||
// | PHP Version 4 |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Copyright (c) 1997-2003 The PHP Group |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | This source file is subject to version 2.02 of the PHP license, |
|
|||
// | that is bundled with this package in the file LICENSE, and is |
|
|||
// | available at through the world-wide-web at |
|
|||
// | http://www.php.net/license/2_02.txt. |
|
|||
// | If you did not receive a copy of the PHP license and are unable to |
|
|||
// | obtain it through the world-wide-web, please send a note to |
|
|||
// | license@php.net so we can mail you a copy immediately. |
|
|||
// +----------------------------------------------------------------------+
|
|||
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
|
|||
// +----------------------------------------------------------------------+
|
|||
//
|
|||
// $Id$
|
|||
//
|
|||
|
|||
require_once 'SOAP/Server.php'; |
|||
|
|||
$server = new SOAP_Server; |
|||
|
|||
require_once 'server_round2_base.php'; |
|||
require_once 'server_round2_groupB.php'; |
|||
require_once 'server_round2_groupC.php'; |
|||
|
|||
$test = '<?xml version="1.0"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:ns6="http://soapinterop.org/echoheader/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Header> |
|||
|
|||
<ns6:echoMeStringRequest xsi:type="xsd:string" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="0">hello world</ns6:echoMeStringRequest> |
|||
</SOAP-ENV:Header> |
|||
<SOAP-ENV:Body> |
|||
|
|||
<echoVoid></echoVoid> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope>'; |
|||
|
|||
$test = '<?xml version="1.0"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:ns6="http://soapinterop.org/echoheader/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Header> |
|||
|
|||
<ns6:echoMeStructRequest xsi:type="si:SOAPStruct" |
|||
SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" |
|||
SOAP-ENV:mustUnderstand="1"> |
|||
<varString xsi:type="xsd:string">arg</varString> |
|||
|
|||
<varInt xsi:type="xsd:int">34</varInt> |
|||
|
|||
<varFloat xsi:type="xsd:float">325.325</varFloat> |
|||
</ns6:echoMeStructRequest> |
|||
</SOAP-ENV:Header> |
|||
<SOAP-ENV:Body> |
|||
|
|||
<echoVoid></echoVoid> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
'; |
|||
|
|||
$test = '<?xml version="1.0"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:ns6="http://soapinterop.org/echoheader/" |
|||
xmlns:ns7="http://soapinterop.org/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Body> |
|||
|
|||
<ns7:echoString> |
|||
<inputString xsi:type="xsd:string"></inputString> |
|||
</ns7:echoString> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
'; |
|||
$test = '<?xml version="1.0" encoding="US-ASCII"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:ns6="http://soapinterop.org/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Body> |
|||
<ns6:echoVoid/> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope>'; |
|||
|
|||
$test = '<?xml version="1.0" encoding="US-ASCII"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:ns6="http://soapinterop.org/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Body> |
|||
<ns6:echoIntegerArray><inputIntegerArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[3]" SOAP-ENC:offset="[0]"><item xsi:type="xsd:int">1</item> |
|||
<item xsi:type="xsd:int">234324324</item> |
|||
<item xsi:type="xsd:int">2</item> |
|||
</inputIntegerArray> |
|||
</ns6:echoIntegerArray> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope>'; |
|||
|
|||
#$test = "<S:Envelope
|
|||
#S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
|
|||
#xmlns:Enc='http://schemas.xmlsoap.org/soap/encoding/'
|
|||
#xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
|
|||
#xmlns:a='http://soapinterop.org/'
|
|||
#xmlns:b='http://soapinterop.org/xsd'
|
|||
#xmlns:XS='http://www.w3.org/2001/XMLSchema'
|
|||
#xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'>
|
|||
#<S:Body>
|
|||
#<b:SOAPStruct Enc:root='0' id='21b56c4' XI:type='b:SOAPStruct'>
|
|||
#<varInt XI:type='XS:int'>1</varInt>
|
|||
#<varFloat XI:type='XS:float'>2</varFloat>
|
|||
#<varString XI:type='XS:string'>wilma</varString>
|
|||
#</b:SOAPStruct>
|
|||
#<a:echoStructArray>
|
|||
#<inputStructArray XI:type='Enc:Array' Enc:arrayType='XS:anyType[3]'>
|
|||
#<fred href='#21b56c4'/>
|
|||
#<i href='#21b56c4'/>
|
|||
#<i href='#21b56c4'/>
|
|||
#</inputStructArray>
|
|||
#</a:echoStructArray>
|
|||
#</S:Body></S:Envelope>";
|
|||
|
|||
#$test = "<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:Enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:a='http://soapinterop.org/' xmlns:b='http://soapinterop.org/xsd' xmlns:XS='http://www.w3.org/2001/XMLSchema' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Body><a:echoStructArray><inputStructArray XI:type='Enc:Array' Enc:arrayType='b:SOAPStruct[2]'><inputStruct href='#213e654'/> <inputStruct href='#21b8c4c'/> </inputStructArray> </a:echoStructArray> <b:SOAPStruct Enc:root='0' id='21b8c4c' XI:type='b:SOAPStruct'><varInt XI:type='XS:int'>-1</varInt> <varFloat XI:type='XS:float'>-1</varFloat> <varString XI:type='XS:string'>lean on into the groove y'all</varString> </b:SOAPStruct> <b:SOAPStruct Enc:root='0' id='213e654' XI:type='b:SOAPStruct'><varInt XI:type='XS:int'>1073741824</varInt> <varFloat XI:type='XS:float'>-42.24</varFloat> <varString XI:type='XS:string'>pocketSOAP rocks!<g></varString> </b:SOAPStruct> </S:Body></S:Envelope>";
|
|||
|
|||
#$test = "<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:b='http://soapinterop.org/' xmlns:a='http://soapinterop.org/headers/' xmlns:XS='http://www.w3.org/2001/XMLSchema' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Header> <a:Transaction S:mustUnderstand='1' XI:type='XS:short'>5</a:Transaction> </S:Header> <S:Body><b:echoString><inputString XI:type='XS:string'>Opps, should never see me</inputString> </b:echoString> </S:Body></S:Envelope>";
|
|||
#$test = "<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:b='http://soapinterop.org/' xmlns:a='http://soapinterop.org/headers/' xmlns:XS='http://www.w3.org/2001/XMLSchema' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Header> <a:Transaction XI:type='XS:short'>5</a:Transaction> </S:Header> <S:Body><b:echoString><inputString XI:type='XS:string'>Opps, should never see me</inputString> </b:echoString> </S:Body></S:Envelope>";
|
|||
#$test = "<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:Enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:a='http://soapinterop.org/' xmlns:b='http://soapinterop.org/xsd' xmlns:XS='http://www.w3.org/2001/XMLSchema' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Body><a:echoStructAsSimpleTypes><inputStruct href='#213e59c'/> </a:echoStructAsSimpleTypes> <b:SOAPStruct Enc:root='0' id='213e59c' XI:type='b:SOAPStruct'><varInt XI:type='XS:int'>42</varInt> <varString XI:type='XS:string'>Orbital</varString> <varFloat XI:type='XS:float'>-42.42</varFloat> </b:SOAPStruct> </S:Body></S:Envelope>";
|
|||
|
|||
// white mesa failures
|
|||
/*$test = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><h:echoMeStringRequest SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:mustUnderstand="1" xmlns:h="http://unknown.org/">White Mesa Test Header String.</h:echoMeStringRequest></SOAP-ENV:Header><SOAP-ENV:Body><m:echoVoid SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:m="http://soapinterop.org/" /></SOAP-ENV:Body></SOAP-ENV:Envelope>'; |
|||
*/ |
|||
/* |
|||
$test = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><h:echoMeStringRequest SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:mustUnderstand="1" xmlns:h="http://unknown.org/">White Mesa Test Header String.</h:echoMeStringRequest></SOAP-ENV:Header><SOAP-ENV:Body><m:echoVoid SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:m="http://soapinterop.org/" /></SOAP-ENV:Body></SOAP-ENV:Envelope>'; |
|||
*/ |
|||
//$test = "<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:a='http://soapinterop.org/' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Body><a:echoIntegerArray><inputIntegerArray XI:nil='true'></inputIntegerArray> </a:echoIntegerArray> </S:Body></S:Envelope>";
|
|||
|
|||
$test = '<?xml version="1.0" encoding="UTF-8"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:ns4="http://soapinterop.org/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Body> |
|||
|
|||
<ns4:echo2DStringArray> |
|||
<input2DStringArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2,3]"> |
|||
<item xsi:type="xsd:string">row0col0</item> |
|||
<item xsi:type="xsd:string">row0col1</item> |
|||
<item xsi:type="xsd:string">row0col2</item> |
|||
<item xsi:type="xsd:string">row1col0</item> |
|||
<item xsi:type="xsd:string">row1col1</item> |
|||
<item xsi:type="xsd:string">row1col2</item></input2DStringArray></ns4:echo2DStringArray> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope>'; |
|||
|
|||
$_SERVER['REQUEST_METHOD'] = "POST"; |
|||
$_SERVER['CONTENT_TYPE'] = 'multipart/related; type=text/xml; boundary="=_d624611fe466a88d956a205651c74fdb"'; |
|||
|
|||
$test = '--=_d624611fe466a88d956a205651c74fdb |
|||
Content-Type: text/xml; charset="UTF-8" |
|||
Content-Transfer-Encoding: base64 |
|||
|
|||
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCg0KPFNPQVAtRU5WOkVudmVs |
|||
b3BlICB4bWxuczpTT0FQLUVOVj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZl |
|||
bG9wZS8iDQogIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiDQog |
|||
IHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiDQog |
|||
IHhtbG5zOlNPQVAtRU5DPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VuY29kaW5n |
|||
LyINCiAgU09BUC1FTlY6ZW5jb2RpbmdTdHlsZT0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcv |
|||
c29hcC9lbmNvZGluZy8iPg0KPFNPQVAtRU5WOkJvZHk+DQoNCjxlY2hvTWltZUF0dGFjaG1lbnQ+ |
|||
DQo8dGVzdCBocmVmPSJjaWQ6ZTZiOTg0M2JiYzUxY2JiMDAzOTk0MGVmN2VlNzY2MDMiLz48L2Vj |
|||
aG9NaW1lQXR0YWNobWVudD4NCjwvU09BUC1FTlY6Qm9keT4NCjwvU09BUC1FTlY6RW52ZWxvcGU+ |
|||
DQo= |
|||
--=_d624611fe466a88d956a205651c74fdb |
|||
Content-Disposition: attachment.php |
|||
Content-Type: text/plain |
|||
Content-Transfer-Encoding: base64 |
|||
Content-ID: <e6b9843bbc51cbb0039940ef7ee76603> |
|||
|
|||
PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP |
|||
QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw |
|||
Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh |
|||
Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs |
|||
dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K |
|||
DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv |
|||
cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ |
|||
X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn |
|||
KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp |
|||
Ow0KcHJpbnRfcigkcmVzcCk7DQpwcmludCAkY2xpZW50LT53aXJlOw0KPz4= |
|||
--=_d624611fe466a88d956a205651c74fdb--'; |
|||
|
|||
$_SERVER['CONTENT_TYPE'] = 'multipart/related; type=text/xml; boundary="=_a2cbb051424cc43e72d3c8c8d0b8f70e"'; |
|||
$test='--=_a2cbb051424cc43e72d3c8c8d0b8f70e |
|||
Content-Type: text/xml; charset="UTF-8" |
|||
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
|||
|
|||
<SOAP-ENV:Envelope 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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> |
|||
<SOAP-ENV:Body> |
|||
|
|||
<echoMimeAttachment> |
|||
<test href="cid:a223fea3c35b5f0e6dedf8da75efd6b3"/></echoMimeAttachment> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
|
|||
--=_a2cbb051424cc43e72d3c8c8d0b8f70e |
|||
Content-Disposition: attachment.php |
|||
Content-Type: text/plain |
|||
Content-Transfer-Encoding: base64 |
|||
Content-ID: <a223fea3c35b5f0e6dedf8da75efd6b3> |
|||
|
|||
PD9waHANCnJlcXVpcmVfb25jZSgiU09BUC9DbGllbnQucGhwIik7DQpyZXF1aXJlX29uY2UoIlNP |
|||
QVAvdGVzdC90ZXN0LnV0aWxpdHkucGhwIik7DQpyZXF1aXJlX29uY2UoIlNPQVAvVmFsdWUucGhw |
|||
Iik7DQokc29hcF9iYXNlID0gbmV3IFNPQVBfQmFzZSgpOw0KDQokdiA9ICBuZXcgU09BUF9BdHRh |
|||
Y2htZW50KCd0ZXN0JywndGV4dC9wbGFpbicsJ2F0dGFjaG1lbnQucGhwJyk7DQokbWV0aG9kVmFs |
|||
dWUgPSBuZXcgU09BUF9WYWx1ZSgndGVzdGF0dGFjaCcsICdTdHJ1Y3QnLCBhcnJheSgkdikpOw0K |
|||
DQovLyBzZWUgdGhlIG1pbWUgYXJyYXkNCi8vJHZhbCA9ICRzb2FwX2Jhc2UtPl9tYWtlRW52ZWxv |
|||
cGUoJG1ldGhvZFZhbHVlKTsNCi8vcHJpbnRfcigkdmFsKTsNCg0KJGNsaWVudCA9IG5ldyBTT0FQ |
|||
X0NsaWVudCgnaHR0cDovL2xvY2FsaG9zdC9zb2FwX2ludGVyb3Avc2VydmVyX3JvdW5kMi5waHAn |
|||
KTsNCiRyZXNwID0gJGNsaWVudC0+Y2FsbCgnZWNob01pbWVBdHRhY2htZW50JyxhcnJheSgkdikp |
|||
Ow0KI3ByaW50X3IoJHJlc3ApOw0KcHJpbnQgJGNsaWVudC0+d2lyZTsNCj8+ |
|||
--=_a2cbb051424cc43e72d3c8c8d0b8f70e-- |
|||
'; |
|||
$server->service($test, '',TRUE); |
|||
print $server->response; |
|||
?>
|
|||
@ -1,17 +0,0 @@ |
|||
<html><body> |
|||
<? |
|||
error_reporting(2039); |
|||
include("SOAP/Client.php"); |
|||
|
|||
$txt = "Bjoern"; |
|||
|
|||
$soapc = new SOAP_Client("http://localhost/soap_interop/testserver.php"); |
|||
$soapc->debug_flag = TRUE; |
|||
print_r($soapc->call("testMethod",array("txt" => $txt))); |
|||
print "<br>Debug: "; |
|||
print $soapc->wire; |
|||
print "<br><br>"; |
|||
unset($soapc); |
|||
|
|||
?>
|
|||
</html></body> |
|||
@ -1,17 +0,0 @@ |
|||
<?php |
|||
include "SOAP/Server.php"; |
|||
|
|||
function testMethod($arg) { |
|||
if ($arg != "") { |
|||
return crypt($arg); |
|||
} else { |
|||
return "Please supply a text"; |
|||
} |
|||
} |
|||
|
|||
$server = new soap_server(); |
|||
|
|||
$server->addToMap("testMethod",array("string"),array("string")); |
|||
$server->service($HTTP_RAW_POST_DATA); |
|||
echo "<!-- this is a test -->"; |
|||
?>
|
|||
@ -1,11 +1,7 @@ |
|||
#ifndef PHP_HTTP_H |
|||
#define PHP_HTTP_H |
|||
|
|||
void send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *function_name, char *soapaction TSRMLS_DC); |
|||
void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRMLS_DC); |
|||
|
|||
char *get_http_header_value(char *headers, char *type); |
|||
int get_http_body(php_stream *socketd, char *headers, char **response, int *out_size TSRMLS_DC); |
|||
int get_http_headers(php_stream *socketd,char **response, int *out_size TSRMLS_DC); |
|||
int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *soapaction TSRMLS_DC); |
|||
int get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRMLS_DC); |
|||
|
|||
#endif |
|||
@ -1,141 +1,209 @@ |
|||
#include "php_soap.h" |
|||
|
|||
int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval ***ret, int *num_params TSRMLS_DC) |
|||
/* SOAP client calls this function to parse response from SOAP server */ |
|||
int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval *return_value TSRMLS_DC) |
|||
{ |
|||
xmlDocPtr response; |
|||
xmlNodePtr trav, trav2, env, body, resp, cur, fault; |
|||
zval **tmp_ret; |
|||
xmlNodePtr trav, /*trav2,*/ env, body, resp, cur, fault; |
|||
int param_count = 0; |
|||
|
|||
ZVAL_NULL(return_value); |
|||
|
|||
/* Parse XML packet */ |
|||
response = xmlParseMemory(buffer, buffer_size); |
|||
xmlCleanupParser(); |
|||
|
|||
if (!response) { |
|||
php_error(E_ERROR, "looks like we got no XML document"); |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got no XML document", NULL, NULL TSRMLS_CC); |
|||
return FALSE; |
|||
} |
|||
|
|||
(*num_params) = 0; |
|||
|
|||
/* Get <Envelope> element */ |
|||
env = NULL; |
|||
trav = response->children; |
|||
FOREACHNODE(trav,"Envelope",env) |
|||
{ |
|||
trav2 = env->children; |
|||
FOREACHNODE(trav2,"Body",body) |
|||
{ |
|||
fault = get_node(body->children,"Fault"); |
|||
if(fault != NULL) |
|||
{ |
|||
char *faultcode = NULL, *faultstring = NULL, *faultactor = NULL; |
|||
zval *details = NULL; |
|||
xmlNodePtr tmp; |
|||
|
|||
tmp = get_node(fault->children,"faultcode"); |
|||
if(tmp != NULL && tmp->children != NULL) |
|||
faultcode = tmp->children->content; |
|||
|
|||
tmp = get_node(fault->children,"faultstring"); |
|||
if(tmp != NULL && tmp->children != NULL) |
|||
faultstring = tmp->children->content; |
|||
|
|||
tmp = get_node(fault->children,"faultactor"); |
|||
if(tmp != NULL && tmp->children != NULL) |
|||
faultactor = tmp->children->content; |
|||
|
|||
tmp = get_node(fault->children,"detail"); |
|||
if(tmp != NULL) |
|||
{ |
|||
encodePtr enc; |
|||
enc = get_conversion(UNKNOWN_TYPE); |
|||
details = enc->to_zval(enc->details, tmp); |
|||
} |
|||
while (trav != NULL) { |
|||
if (trav->type == XML_ELEMENT_NODE && |
|||
node_is_equal_ex(trav,"Envelope","http://schemas.xmlsoap.org/soap/envelope/")) { |
|||
if (env != NULL) { |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got XML with several \"Envelope\" elements\n", NULL, NULL TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
} |
|||
env = trav; |
|||
} |
|||
trav = trav->next; |
|||
} |
|||
if (env == NULL) { |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got XML without \"Envelope\" element\n", NULL, NULL TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
} |
|||
|
|||
add_soap_fault(this_ptr, faultcode, faultstring, faultactor, details TSRMLS_CC); |
|||
} |
|||
else |
|||
{ |
|||
resp = body->children; |
|||
if(fn != NULL) |
|||
{ |
|||
sdlParamPtr *h_param, param = NULL; |
|||
xmlNodePtr val = NULL; |
|||
encodePtr enc; |
|||
char *name, *ns = NULL; |
|||
/* Get <Body> element */ |
|||
body = NULL; |
|||
trav = env->children; |
|||
while (trav != NULL) { |
|||
if (trav->type == XML_ELEMENT_NODE && |
|||
node_is_equal_ex(trav,"Body","http://schemas.xmlsoap.org/soap/envelope/")) { |
|||
if (body != NULL) { |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got \"Envelope\" with several \"Body\" elements\n", NULL, NULL TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
} |
|||
body = trav; |
|||
} |
|||
trav = trav->next; |
|||
} |
|||
if (body == NULL) { |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "looks like we got \"Envelope\" without \"Body\" element\n", NULL, NULL TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
} |
|||
|
|||
if(fn->bindingType == BINDING_SOAP) |
|||
{ |
|||
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes; |
|||
/* Check if <Body> contains <Fault> element */ |
|||
fault = get_node_ex(body->children,"Fault","http://schemas.xmlsoap.org/soap/envelope/"); |
|||
if(fault != NULL) { |
|||
char *faultcode = NULL, *faultstring = NULL, *faultactor = NULL; |
|||
zval *details = NULL; |
|||
xmlNodePtr tmp; |
|||
|
|||
zend_hash_internal_pointer_reset(fn->responseParameters); |
|||
if(zend_hash_get_current_data(fn->responseParameters, (void **)&h_param) != SUCCESS) |
|||
php_error(E_ERROR, "Can't find response parameter \"%s\"", param->paramName); |
|||
tmp = get_node(fault->children,"faultcode"); |
|||
if (tmp != NULL && tmp->children != NULL) { |
|||
faultcode = tmp->children->content; |
|||
} |
|||
|
|||
param = (*h_param); |
|||
if(fnb->style == SOAP_DOCUMENT) |
|||
{ |
|||
name = (*h_param)->encode->details.type_str; |
|||
ns = (*h_param)->encode->details.ns; |
|||
} |
|||
else |
|||
{ |
|||
name = fn->responseName; |
|||
/* ns = ? */ |
|||
} |
|||
tmp = get_node(fault->children,"faultstring"); |
|||
if (tmp != NULL && tmp->children != NULL) { |
|||
faultstring = tmp->children->content; |
|||
} |
|||
|
|||
cur = get_node_ex(resp, name, ns); |
|||
/* TODO: produce warning invalid ns */ |
|||
if(!cur) |
|||
cur = get_node(resp, name); |
|||
|
|||
if(!cur) |
|||
php_error(E_ERROR, "Can't find response data"); |
|||
tmp = get_node(fault->children,"faultactor"); |
|||
if (tmp != NULL && tmp->children != NULL) { |
|||
faultactor = tmp->children->content; |
|||
} |
|||
|
|||
tmp = get_node(fault->children,"detail"); |
|||
if (tmp != NULL) { |
|||
encodePtr enc; |
|||
enc = get_conversion(UNKNOWN_TYPE); |
|||
details = enc->to_zval(enc->details, tmp); |
|||
} |
|||
|
|||
if(fnb->style == SOAP_DOCUMENT) |
|||
val = cur; |
|||
else |
|||
val = get_node(cur->children, param->paramName); |
|||
add_soap_fault(this_ptr, faultcode, faultstring, faultactor, details TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
} |
|||
|
|||
if(!val) |
|||
php_error(E_ERROR, "Can't find response data"); |
|||
/* Parse content of <Body> element */ |
|||
resp = body->children; |
|||
if (fn != NULL) { |
|||
/* Function has WSDL description */ |
|||
sdlParamPtr *h_param, param = NULL; |
|||
xmlNodePtr val = NULL; |
|||
char *name, *ns = NULL; |
|||
zval* tmp; |
|||
|
|||
if (fn->bindingType == BINDING_SOAP) { |
|||
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes; |
|||
int res_count = zend_hash_num_elements(fn->responseParameters); |
|||
|
|||
array_init(return_value); |
|||
zend_hash_internal_pointer_reset(fn->responseParameters); |
|||
while (zend_hash_get_current_data(fn->responseParameters, (void **)&h_param) == SUCCESS) { |
|||
param = (*h_param); |
|||
if (fnb->style == SOAP_DOCUMENT) { |
|||
name = param->encode->details.type_str; |
|||
ns = param->encode->details.ns; |
|||
} else { |
|||
name = fn->responseName; |
|||
/* ns = ? */ |
|||
} |
|||
|
|||
tmp_ret = emalloc(sizeof(zval **)); |
|||
if(param != NULL) |
|||
enc = param->encode; |
|||
else |
|||
enc = get_conversion(UNKNOWN_TYPE); |
|||
/* Get value of parameter */ |
|||
cur = get_node_ex(resp, name, ns); |
|||
if (!cur) { |
|||
cur = get_node(resp, name); |
|||
/* TODO: produce warning invalid ns */ |
|||
} |
|||
if (cur) { |
|||
if (fnb->style == SOAP_DOCUMENT) { |
|||
val = cur; |
|||
} else { |
|||
val = get_node(cur->children, param->paramName); |
|||
if (val == NULL && res_count == 1) { |
|||
val = get_node(cur->children, "return"); |
|||
} |
|||
} |
|||
} |
|||
|
|||
tmp_ret[0] = master_to_zval(enc, val); |
|||
(*ret) = tmp_ret; |
|||
(*num_params) = 1; |
|||
if (!val) { |
|||
/* TODO: may be "nil" is not OK? */ |
|||
MAKE_STD_ZVAL(tmp); |
|||
ZVAL_NULL(tmp); |
|||
/* |
|||
add_soap_fault(this_ptr, "SOAP-ENV:Client", "Can't find response data", NULL, NULL TSRMLS_CC); |
|||
xmlFreeDoc(response); |
|||
return FALSE; |
|||
*/ |
|||
} else { |
|||
/* Decoding value of parameter */ |
|||
if (param != NULL) { |
|||
tmp = master_to_zval(param->encode, val); |
|||
} else { |
|||
tmp = master_to_zval(get_conversion(UNKNOWN_TYPE), val); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
cur = resp; |
|||
while(cur && cur->type != XML_ELEMENT_NODE) |
|||
cur = cur->next; |
|||
if(cur != NULL) |
|||
{ |
|||
xmlNodePtr val; |
|||
val = cur->children; |
|||
while(val && val->type != XML_ELEMENT_NODE) |
|||
val = val->next; |
|||
|
|||
if(val != NULL) |
|||
{ |
|||
encodePtr enc; |
|||
enc = get_conversion(UNKNOWN_TYPE); |
|||
tmp_ret = emalloc(sizeof(zval **)); |
|||
tmp_ret[0] = master_to_zval(enc, val); |
|||
(*ret) = tmp_ret; |
|||
(*num_params) = 1; |
|||
} |
|||
add_assoc_zval(return_value, param->paramName, tmp); |
|||
/*add_assoc_zval(return_value, (char*)val->name, tmp);*/ |
|||
|
|||
param_count++; |
|||
|
|||
zend_hash_move_forward(fn->responseParameters); |
|||
} |
|||
} |
|||
} else { |
|||
/* Function hasn't WSDL description */ |
|||
cur = resp; |
|||
array_init(return_value); |
|||
while(cur && cur->type != XML_ELEMENT_NODE) { |
|||
cur = cur->next; |
|||
} |
|||
if (cur != NULL) { |
|||
xmlNodePtr val; |
|||
val = cur->children; |
|||
while (val != NULL) { |
|||
while(val && val->type != XML_ELEMENT_NODE) { |
|||
val = val->next; |
|||
} |
|||
if (val != NULL) { |
|||
encodePtr enc; |
|||
zval *tmp; |
|||
enc = get_conversion(UNKNOWN_TYPE); |
|||
tmp = master_to_zval(enc, val); |
|||
if (val->name) { |
|||
add_assoc_zval(return_value, (char*)val->name, tmp); |
|||
} else { |
|||
add_next_index_zval(return_value, tmp); |
|||
} |
|||
++param_count; |
|||
val = val->next; |
|||
} |
|||
} |
|||
} |
|||
ENDFOREACH(trav2); |
|||
} |
|||
ENDFOREACH(trav); |
|||
|
|||
if (Z_TYPE_P(return_value) == IS_ARRAY) { |
|||
if (param_count == 0) { |
|||
zval_dtor(return_value); |
|||
ZVAL_NULL(return_value); |
|||
} else if (param_count == 1) { |
|||
zval *tmp = *(zval**)Z_ARRVAL_P(return_value)->pListHead->pData; |
|||
tmp->refcount++; |
|||
zval_dtor(return_value); |
|||
*return_value = *tmp; |
|||
FREE_ZVAL(tmp); |
|||
} |
|||
} |
|||
|
|||
xmlFreeDoc(response); |
|||
return TRUE; |
|||
} |
|||
@ -1,6 +1,6 @@ |
|||
#ifndef PHP_PACKET_SOAP_H |
|||
#define PHP_PACKET_SOAP_H |
|||
|
|||
int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval ***ret, int *num_params TSRMLS_DC); |
|||
int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval *return_value TSRMLS_DC); |
|||
|
|||
#endif |
|||
#endif |
|||
981
ext/soap/soap.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,33 @@ |
|||
--TEST-- |
|||
SOAP Server 1: new/addfunction/handle |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function test() { |
|||
return "Hello World"; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction("test"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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> |
|||
EOF; |
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:testResponse xmlns="http://testuri.org"><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,37 @@ |
|||
--TEST-- |
|||
SOAP Server 2: function with parameters and result |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
return $x+$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction("Add"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Add xmlns:ns1="http://testuri.org"> |
|||
<x xsi:type="xsd:int">22</x> |
|||
<y xsi:type="xsd:int">33</y> |
|||
</ns1:Add> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:AddResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">55</return></ns1:AddResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,32 @@ |
|||
--TEST-- |
|||
SOAP Server 3: all functions |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction(SOAP_FUNCTIONS_ALL); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:strlen xmlns:ns1="http://testuri.org"> |
|||
<x xsi:type="xsd:string">Hello World</x> |
|||
</ns1:strlen> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:strlenResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">11</return></ns1:strlenResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,40 @@ |
|||
--TEST-- |
|||
SOAP Server 4: addfunctions |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
return $x+$y; |
|||
} |
|||
function Sub($x,$y) { |
|||
return $x-$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction(array("Sub","Add")); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Add xmlns:ns1="http://testuri.org"> |
|||
<x xsi:type="xsd:int">22</x> |
|||
<y xsi:type="xsd:int">33</y> |
|||
</ns1:Add> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:AddResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">55</return></ns1:AddResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,36 @@ |
|||
--TEST-- |
|||
SOAP Server 5: setclass |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
class Foo { |
|||
function test() { |
|||
return "Hello World"; |
|||
} |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->setclass("Foo"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:testResponse xmlns="http://testuri.org"><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,42 @@ |
|||
--TEST-- |
|||
SOAP Server 6: setclass with constructor |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
class Foo { |
|||
private $str = ""; |
|||
|
|||
function Foo($str) { |
|||
$this->str = $str . " World"; |
|||
} |
|||
|
|||
function test() { |
|||
return $this->str; |
|||
} |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->setclass("Foo","Hello"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:testResponse xmlns="http://testuri.org"><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,26 @@ |
|||
--TEST-- |
|||
SOAP Server 7: addfunction and getfunctions |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
return $x+$y; |
|||
} |
|||
function Sub($x,$y) { |
|||
return $x-$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction(array("Sub","Add")); |
|||
var_dump($server->getfunctions()); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
array(2) { |
|||
[0]=> |
|||
string(3) "Sub" |
|||
[1]=> |
|||
string(3) "Add" |
|||
} |
|||
ok |
|||
@ -0,0 +1,29 @@ |
|||
--TEST-- |
|||
SOAP Server 8: setclass and getfunctions |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
class Foo { |
|||
|
|||
function Foo() { |
|||
} |
|||
|
|||
function test() { |
|||
return $this->str; |
|||
} |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->setclass("Foo"); |
|||
var_dump($server->getfunctions()); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
array(2) { |
|||
[0]=> |
|||
string(3) "Foo" |
|||
[1]=> |
|||
string(4) "test" |
|||
} |
|||
ok |
|||
@ -0,0 +1,61 @@ |
|||
--TEST-- |
|||
SOAP Server 9: setclass and setpersistence(SOAP_PERSISTENCE_SESSION) |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
class foo { |
|||
private $sum = 0; |
|||
|
|||
function Sum($num) { |
|||
return $this->sum += $num; |
|||
} |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->setclass("foo"); |
|||
$server->setpersistence(SOAP_PERSISTENCE_SESSION); |
|||
|
|||
ob_start(); |
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Sum xmlns:ns1="http://testuri.org"> |
|||
<num xsi:type="xsd:int">5</num> |
|||
</ns1:Sum> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
$server->handle(); |
|||
ob_clean(); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Sum xmlns:ns1="http://testuri.org"> |
|||
<num xsi:type="xsd:int">3</num> |
|||
</ns1:Sum> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
$server->handle(); |
|||
ob_end_flush(); |
|||
|
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:SumResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">8</return></ns1:SumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,61 @@ |
|||
--TEST-- |
|||
SOAP Server 10: setclass and setpersistence(SOAP_PERSISTENCE_REQUEST) |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
class foo { |
|||
private $sum = 0; |
|||
|
|||
function Sum($num) { |
|||
return $this->sum += $num; |
|||
} |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->setclass("foo"); |
|||
$server->setpersistence(SOAP_PERSISTENCE_REQUEST); |
|||
|
|||
|
|||
ob_start(); |
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Sum xmlns:ns1="http://testuri.org"> |
|||
<num xsi:type="xsd:int">5</num> |
|||
</ns1:Sum> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
$server->handle(); |
|||
ob_clean(); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Sum xmlns:ns1="http://testuri.org"> |
|||
<num xsi:type="xsd:int">3</num> |
|||
</ns1:Sum> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
$server->handle(); |
|||
ob_end_flush(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:SumResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">3</return></ns1:SumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,26 @@ |
|||
--TEST-- |
|||
SOAP Server 11: bind |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--GET-- |
|||
wsdl |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
return $x+$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->bind("test.wsdl"); |
|||
ob_start(); |
|||
$server->handle(); |
|||
$wsdl = ob_get_contents(); |
|||
ob_end_clean(); |
|||
if ($wsdl == file_get_contents("test.wsdl")) { |
|||
echo "ok\n"; |
|||
} else { |
|||
echo "fail\n"; |
|||
} |
|||
?> |
|||
--EXPECT-- |
|||
ok |
|||
@ -0,0 +1,18 @@ |
|||
--TEST-- |
|||
SOAP Server 12: WSDL generation |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--GET-- |
|||
WSDL |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
return $x+$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction("Add"); |
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
@ -0,0 +1,44 @@ |
|||
--TEST-- |
|||
SOAP Server 13: array handling |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function Sum($a) { |
|||
$sum = 0; |
|||
if (is_array($a)) { |
|||
foreach($a as $val) { |
|||
$sum += $val; |
|||
} |
|||
} |
|||
return $sum; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction("Sum"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope |
|||
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" |
|||
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|||
<SOAP-ENV:Body xmlns:ns1="http://linuxsrv.home/~dmitry/soap/"> |
|||
<ns1:sum> |
|||
<param0 SOAP-ENC:arrayType="xsd:int[2]" xsi:type="SOAP-ENC:Array"> |
|||
<val xsi:type="xsd:int">3</val> |
|||
<val xsi:type="xsd:int">5</val> |
|||
</param0> |
|||
</ns1:sum> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><ns1:sumResponse xmlns="http://testuri.org"><return xsi:type="xsd:int">8</return></ns1:sumResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
ok |
|||
@ -0,0 +1,37 @@ |
|||
--TEST-- |
|||
SOAP Server 14: fault |
|||
--SKIPIF-- |
|||
<?php require_once('skipif.inc'); ?> |
|||
--FILE-- |
|||
<?php |
|||
function Add($x,$y) { |
|||
undefined_function_x(); |
|||
return $x+$y; |
|||
} |
|||
|
|||
$server = new soapserver("http://testuri.org"); |
|||
$server->addfunction("Add"); |
|||
|
|||
$HTTP_RAW_POST_DATA = <<<EOF |
|||
<?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:Add xmlns:ns1="http://testuri.org"> |
|||
<x xsi:type="xsd:int">22</x> |
|||
<y xsi:type="xsd:int">33</y> |
|||
</ns1:Add> |
|||
</SOAP-ENV:Body> |
|||
</SOAP-ENV:Envelope> |
|||
EOF; |
|||
|
|||
$server->handle(); |
|||
echo "ok\n"; |
|||
?> |
|||
--EXPECT-- |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apache="http://xml.apache.org/xml-soap"><SOAP-ENV:Body><SOAP-ENV:Fault xsi:type="SOAP-ENC:Struct"><faultstring xsi:type="xsd:string">Call to undefined function undefined_function_x()</faultstring><faultcode xsi:type="xsd:string">SOAP-ENV:Server</faultcode><detail xsi:nil="1"/></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> |
|||
@ -0,0 +1,3 @@ |
|||
<?php |
|||
if (!extension_loaded('soap')) die('skip soap extension not available'); |
|||
?> |
|||
@ -0,0 +1,55 @@ |
|||
<?xml version="1.0" ?> |
|||
<definitions |
|||
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:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" |
|||
xmlns:si="http://soapinterop.org/xsd" |
|||
xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" |
|||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns="http://schemas.xmlsoap.org/wsdl/" |
|||
targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> |
|||
|
|||
<types> |
|||
<xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> |
|||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> |
|||
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> |
|||
</xsd:schema> |
|||
</types> |
|||
|
|||
<message name="AddRequest"> |
|||
<part name="x" type="xsd:double" /> |
|||
<part name="y" type="xsd:double" /> |
|||
</message> |
|||
<message name="AddResponse"> |
|||
<part name="result" type="xsd:double" /> |
|||
</message> |
|||
|
|||
<portType name="TestServicePortType"> |
|||
<operation name="Add"> |
|||
<input message="tns:AddRequest" /> |
|||
<output message="tns:AddResponse" /> |
|||
</operation> |
|||
</portType> |
|||
|
|||
<binding name="TestServiceBinding" type="tns:TestServicePortType"> |
|||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> |
|||
<operation name="Add"> |
|||
<soap:operation soapAction="Add" style="rpc" /> |
|||
<input> |
|||
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> |
|||
</input> |
|||
<output> |
|||
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> |
|||
</output> |
|||
</operation> |
|||
</binding> |
|||
|
|||
<service name="TestService"> |
|||
<port name="TestServicePort" binding="tns:TestServiceBinding"> |
|||
<soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> |
|||
</port> |
|||
</service> |
|||
|
|||
</definitions> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue