xref: /PHP-8.2/ext/soap/tests/soap12/T44.phpt (revision 7f2f0c00)
1--TEST--
2SOAP 1.2: T44 echoSimpleTypesAsStruct
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7$HTTP_RAW_POST_DATA = <<<EOF
8<?xml version="1.0"?>
9<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
10              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
11              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
12  <env:Body>
13    <test:echoSimpleTypesAsStruct xmlns:test="http://example.org/ts-tests"
14          env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
15      <inputInt xsi:type="xsd:int">42</inputInt>
16      <inputFloat xsi:type="xsd:float">0.005</inputFloat>
17      <inputString xsi:type="xsd:string">hello world</inputString>
18    </test:echoSimpleTypesAsStruct>
19  </env:Body>
20</env:Envelope>
21EOF;
22include "soap12-test.inc";
23?>
24--EXPECT--
25<?xml version="1.0" encoding="UTF-8"?>
26<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://example.org/ts-tests" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://example.org/ts-tests/xsd" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:echoSimpleTypesAsStructResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="ns2:SOAPStruct"><varString xsi:type="xsd:string">hello world</varString><varInt xsi:type="xsd:int">42</varInt><varFloat xsi:type="xsd:float">0.005</varFloat></return></ns1:echoSimpleTypesAsStructResponse></env:Body></env:Envelope>
27ok
28