summaryrefslogtreecommitdiff
path: root/ext/soap/interop
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-02-04 14:46:12 +0000
committerDmitry Stogov <dmitry@php.net>2004-02-04 14:46:12 +0000
commit9fa7d1c24aa8dd6130179da2eb2e0b37b6e4fd8d (patch)
tree4066be9017b4609b6de1f903aad3ddbfec69d11f /ext/soap/interop
parent3df50001e132d2c634cebb2c336654c3211dac44 (diff)
downloadphp-git-9fa7d1c24aa8dd6130179da2eb2e0b37b6e4fd8d.tar.gz
SOAP Headers was implemented (near complete)
Diffstat (limited to 'ext/soap/interop')
-rw-r--r--ext/soap/interop/client_round2_interop.php2
-rw-r--r--ext/soap/interop/client_round2_params.php52
-rw-r--r--ext/soap/interop/server_round2_groupC.php7
3 files changed, 31 insertions, 30 deletions
diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php
index dfdced7b85..7d9f90455e 100644
--- a/ext/soap/interop/client_round2_interop.php
+++ b/ext/soap/interop/client_round2_interop.php
@@ -409,7 +409,7 @@ class Interop_Client
// XXX no way to set encoding
// this lets us set UTF-8, US-ASCII or other
//$soap->setEncoding($soap_test->encoding);
- if ($this->useWSDL) {
+ if ($this->useWSDL && !$soap_test->headers && !$soap_test->headers_expect) {
$args = '';
foreach ($soap_test->method_params as $pname => $param) {
$arg = '$soap_test->method_params["'.$pname.'"]';
diff --git a/ext/soap/interop/client_round2_params.php b/ext/soap/interop/client_round2_params.php
index 0b8017418b..ee5aeade3a 100644
--- a/ext/soap/interop/client_round2_params.php
+++ b/ext/soap/interop/client_round2_params.php
@@ -422,48 +422,48 @@ $soap_tests['GroupB'][] = new SOAP_Test('echoNestedArray',
// echoMeStringRequest
// echoMeStringRequest with endpoint as header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 0, SOAP_ACTOR_NEXT);
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 0, SOAP_ACTOR_NEXT);
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
$soap_tests['GroupC'][] = $test;
// echoMeStringRequest with endpoint as header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_ACTOR_NEXT);
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 1, SOAP_ACTOR_NEXT);
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
$soap_tests['GroupC'][] = $test;
// echoMeStringRequest with endpoint NOT header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 0, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 0, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
// echoMeStringRequest with endpoint NOT header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world', XSD_STRING), 1, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
@@ -471,13 +471,13 @@ $soap_tests['GroupC'][] = $test;
// echoMeStringRequest with endpoint header destination, must understand,
// invalid namespace, should recieve a fault
-$test = new SOAP_Test('echoVoid (echoMeStringRequest invalid namespace)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest invalid namespace)', NULL);
$test->headers[] = new SoapHeader('http://unknown.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_ACTOR_NEXT);
$test->headers_expect = array();
$test->expect_fault = TRUE;
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStringRequest invalid namespace)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStringRequest invalid namespace)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://unknown.org/echoheader/','echoMeStringRequest', new SoapVar('hello world', XSD_STRING), 1, SOAP_ACTOR_NEXT);
$test->headers_expect = array();
@@ -488,14 +488,14 @@ $soap_tests['GroupC'][] = $test;
// echoMeStructRequest
// echoMeStructRequest with endpoint as header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SOAPStruct('arg',34,325.325), 0, SOAP_ACTOR_NEXT);
$test->headers_expect =
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
@@ -505,14 +505,14 @@ $test->headers_expect =
$soap_tests['GroupC'][] = $test;
// echoMeStructRequest with endpoint as header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SOAPStruct('arg',34,325.325), 1, SOAP_ACTOR_NEXT);
$test->headers_expect =
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
@@ -522,13 +522,13 @@ $test->headers_expect =
$soap_tests['GroupC'][] = $test;
// echoMeStructRequest with endpoint NOT header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SOAPStruct('arg',34,325.325), 0, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
@@ -537,13 +537,13 @@ $test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
// echoMeStructRequest with endpoint NOT header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SOAPStruct('arg',34,325.325), 1, SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
@@ -555,25 +555,25 @@ $soap_tests['GroupC'][] = $test;
// echoMeUnknown
// echoMeUnknown with endpoint as header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',0,SOAP_ACTOR_NEXT);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=0 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),0,SOAP_ACTOR_NEXT);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
// echoMeUnknown with endpoint as header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=next)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',1,SOAP_ACTOR_NEXT);
$test->headers_expect = array();
$test->expect_fault = TRUE;
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=1 actor=next)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=next)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),1,SOAP_ACTOR_NEXT);
$test->headers_expect = array();
@@ -581,24 +581,24 @@ $test->expect_fault = TRUE;
$soap_tests['GroupC'][] = $test;
// echoMeUnknown with endpoint NOT header destination, doesn't have to understand
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',0,SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=0 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),0,SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
// echoMeUnknown with endpoint NOT header destination, must understand
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=other)', NULL);
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',1,SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
$soap_tests['GroupC'][] = $test;
-$test = new SOAP_Test('echoVoid (echoMeUnknown mustUnderstand=1 actor=other)', NULL);
+$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=other)', NULL);
$test->type = 'soapval';
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),1,SOAP_TEST_ACTOR_OTHER);
$test->headers_expect = array();
diff --git a/ext/soap/interop/server_round2_groupC.php b/ext/soap/interop/server_round2_groupC.php
index 7372cae437..5d5544b1db 100644
--- a/ext/soap/interop/server_round2_groupC.php
+++ b/ext/soap/interop/server_round2_groupC.php
@@ -25,14 +25,15 @@ class SOAP_Interop_GroupC {
function echoMeStringRequest($string)
{
// return $string;
- return new SoapVar($string, XSD_STRING, "string", XSD_NAMESPACE, "echoMeStringResponse", $this->method_namespace);
+// return new SoapVar($string, XSD_STRING, "string", XSD_NAMESPACE, "echoMeStringResponse", $this->method_namespace);
+ return new SoapHeader($this->method_namespace, "echoMeStringResponse", $string);
}
function echoMeStructRequest($struct)
{
// return $struct;
- return new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/", "echoMeStructResponse",$this->method_namespace);
-// new SOAP_Value('{'.$this->method_namespace.'}echoMeStructResponse','SOAPStruct',$struct);
+// return new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/", "echoMeStructResponse",$this->method_namespace);
+ return new SoapHeader($this->method_namespace, "echoMeStructResponse", $struct);
}
function echoVoid()