1--TEST--
2SOAP Interop Round4 GroupH Complex Doc Lit 007 (php/wsdl): echoMultipleFaults2(1)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--INI--
6soap.wsdl_cache_enabled=0
7--FILE--
8<?php
9class SOAPStruct {
10    function __construct($s, $i, $f) {
11        $this->varString = $s;
12        $this->varInt = $i;
13        $this->varFloat = $f;
14    }
15}
16class BaseStruct {
17    function __construct($f, $s) {
18        $this->structMessage = $f;
19        $this->shortMessage = $s;
20    }
21}
22class ExtendedStruct extends BaseStruct {
23    function __construct($f, $s, $x1, $x2, $x3) {
24        parent::__construct($f,$s);
25        $this->stringMessage = $x1;
26        $this->intMessage = $x2;
27        $this->anotherIntMessage = $x3;
28    }
29}
30class MoreExtendedStruct extends ExtendedStruct {
31    function __construct($f, $s, $x1, $x2, $x3, $b) {
32        parent::__construct($f, $s, $x1, $x2, $x3);
33        $this->booleanMessage = $b;
34    }
35}
36$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1);
37$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5);
38$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true);
39$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0));
40$client->echoMultipleFaults2(array("whichFault" => 1,
41                                   "param1"     => $s1,
42                                   "param2"     => $s2,
43                                   "param3"     => $s3));
44echo $client->__getlastrequest();
45$HTTP_RAW_POST_DATA = $client->__getlastrequest();
46include("round4_groupH_complex_doclit.inc");
47echo "ok\n";
48?>
49--EXPECT--
50<?xml version="1.0" encoding="UTF-8"?>
51<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types/requestresponse" xmlns:ns2="http://soapinterop.org/types"><SOAP-ENV:Body><ns1:echoMultipleFaults2Request><ns1:whichFault>1</ns1:whichFault><ns1:param1><ns2:structMessage><ns2:varString>s1</ns2:varString><ns2:varInt>1</ns2:varInt><ns2:varFloat>1.1</ns2:varFloat></ns2:structMessage><ns2:shortMessage>1</ns2:shortMessage></ns1:param1><ns1:param2><ns2:structMessage><ns2:varString>s2</ns2:varString><ns2:varInt>2</ns2:varInt><ns2:varFloat>2.2</ns2:varFloat></ns2:structMessage><ns2:shortMessage>2</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage></ns1:param2><ns1:param3><ns2:structMessage><ns2:varString>s3</ns2:varString><ns2:varInt>3</ns2:varInt><ns2:varFloat>3.3</ns2:varFloat></ns2:structMessage><ns2:shortMessage>3</ns2:shortMessage><ns2:stringMessage>arg</ns2:stringMessage><ns2:intMessage>-3</ns2:intMessage><ns2:anotherIntMessage>5</ns2:anotherIntMessage><ns2:booleanMessage>true</ns2:booleanMessage></ns1:param3></ns1:echoMultipleFaults2Request></SOAP-ENV:Body></SOAP-ENV:Envelope>
52<?xml version="1.0" encoding="UTF-8"?>
53<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/types" xmlns:ns2="http://soapinterop.org/types/part"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Fault in response to 'echoMultipleFaults2'.</faultstring><detail><ns2:BaseStructPart><ns1:structMessage><ns1:varString>s1</ns1:varString><ns1:varInt>1</ns1:varInt><ns1:varFloat>1.1</ns1:varFloat></ns1:structMessage><ns1:shortMessage>1</ns1:shortMessage></ns2:BaseStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
54ok
55