xref: /php-src/ext/soap/tests/server003.phpt (revision 42497c1e)
1--TEST--
2SOAP Server 3: all functions
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7$server = new soapserver(null,array('uri'=>"http://testuri.org"));
8$server->addfunction(SOAP_FUNCTIONS_ALL);
9
10$HTTP_RAW_POST_DATA = <<<EOF
11<?xml version="1.0" encoding="ISO-8859-1"?>
12<SOAP-ENV:Envelope
13  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
14  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
15  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
16  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17  xmlns:si="http://soapinterop.org/xsd">
18  <SOAP-ENV:Body>
19    <ns1:strlen xmlns:ns1="http://testuri.org">
20      <x xsi:type="xsd:string">Hello World</x>
21    </ns1:strlen>
22  </SOAP-ENV:Body>
23</SOAP-ENV:Envelope>
24EOF;
25
26$server->handle($HTTP_RAW_POST_DATA);
27echo "ok\n";
28?>
29--EXPECTF--
30Deprecated: Constant SOAP_FUNCTIONS_ALL is deprecated in %s on line %d
31
32Deprecated: SoapServer::addFunction(): Enabling all functions via SOAP_FUNCTIONS_ALL is deprecated since 8.4, due to possible security concerns. If all PHP functions should be enabled, the flattened return value of get_defined_functions() can be used in %s on line %d
33<?xml version="1.0" encoding="UTF-8"?>
34<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:strlenResponse><return xsi:type="xsd:int">11</return></ns1:strlenResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
35ok
36