1--TEST-- 2SOAP Interop Round4 GroupH Complex Doc Lit 008 (php/wsdl): echoMultipleFaults2(2) 3--EXTENSIONS-- 4soap 5--INI-- 6soap.wsdl_cache_enabled=0 7--FILE-- 8<?php 9class SOAPStruct { 10 function __construct(public $varString, public $varInt, public $varFloat) {} 11} 12class BaseStruct { 13 function __construct(public $structMessage, public $shortMessage) {} 14} 15class ExtendedStruct extends BaseStruct { 16 function __construct( 17 $structMessage, $shortMessage, 18 public $stringMessage, public $intMessage, public $anotherIntMessage 19 ) { 20 parent::__construct($structMessage, $shortMessage); 21 } 22} 23class MoreExtendedStruct extends ExtendedStruct { 24 function __construct($f, $s, $x1, $x2, $x3, public $booleanMessage) { 25 parent::__construct($f, $s, $x1, $x2, $x3); 26 } 27} 28$s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); 29$s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); 30$s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); 31$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); 32$client->echoMultipleFaults2(array("whichFault" => 2, 33 "param1" => $s1, 34 "param2" => $s2, 35 "param3" => $s3)); 36echo $client->__getlastrequest(); 37$HTTP_RAW_POST_DATA = $client->__getlastrequest(); 38include("round4_groupH_complex_doclit.inc"); 39echo "ok\n"; 40?> 41--EXPECT-- 42<?xml version="1.0" encoding="UTF-8"?> 43<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>2</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> 44<?xml version="1.0" encoding="UTF-8"?> 45<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:ExtendedStructPart><ns1:structMessage><ns1:varString>s2</ns1:varString><ns1:varInt>2</ns1:varInt><ns1:varFloat>2.2</ns1:varFloat></ns1:structMessage><ns1:shortMessage>2</ns1:shortMessage><ns1:stringMessage>arg</ns1:stringMessage><ns1:intMessage>-3</ns1:intMessage><ns1:anotherIntMessage>5</ns1:anotherIntMessage></ns2:ExtendedStructPart></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> 46ok 47