xref: /php-src/ext/soap/tests/server020.phpt (revision 7f2f0c00)
1--TEST--
2SOAP Server 20: compressed request (deflate)
3--EXTENSIONS--
4soap
5zlib
6--SKIPIF--
7<?php
8    if (php_sapi_name()=='cli') echo 'skip';
9?>
10--INI--
11precision=14
12--DEFLATE_POST--
13<?xml version="1.0" encoding="ISO-8859-1"?>
14<SOAP-ENV:Envelope
15  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
16  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
17  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
18  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19  xmlns:si="http://soapinterop.org/xsd">
20  <SOAP-ENV:Body>
21    <ns1:test xmlns:ns1="http://testuri.org" />
22  </SOAP-ENV:Body>
23</SOAP-ENV:Envelope>
24--FILE--
25<?php
26function test() {
27  return "Hello World";
28}
29
30$server = new soapserver(null,array('uri'=>"http://testuri.org"));
31$server->addfunction("test");
32$server->handle();
33echo "ok\n";
34?>
35--EXPECT--
36<?xml version="1.0" encoding="UTF-8"?>
37<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>
38ok
39