Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Lots of reference and CS fixes.

git-svn-id: http://svn.php.net/repository/pear/packages/SOAP_Interop/trunk@227892 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit ec86c546b264556e8174c9c7e29c9a898f0548d6 1 parent a8f1ed1
Jan Schneider authored
View
133 interop_Round2Base.php
@@ -24,132 +24,131 @@
function &generateFault($short, $long)
{
$params = array(
- "faultcode" => "Server",
- "faultstring" => $short,
- "detail" => $long
+ 'faultcode' => 'Server',
+ 'faultstring' => $short,
+ 'detail' => $long
);
- $faultmsg =& new SOAP_Message("Fault",$params,"http://schemas.xmlsoap.org/soap/envelope/");
+ $faultmsg = new SOAP_Message('Fault', $params, 'http://schemas.xmlsoap.org/soap/envelope/');
return $faultmsg;
}
function hex2bin($data)
{
$len = strlen($data);
- return pack("H" . $len, $data);
+ return pack('H' . $len, $data);
}
class SOAP_Interop_Base {
- function &echoString($inputString)
+ function echoString($inputString)
{
- return new SOAP_Value('outputString','string',$inputString);
+ return new SOAP_Value('outputString', 'string', $inputString);
}
- function &echoStringArray($inputStringArray)
+ function echoStringArray($inputStringArray)
{
- $ra = array();
- if ($inputStringArray) {
- foreach($inputStringArray as $s) {
- $ra[] =& new SOAP_Value('item','string',$s);
- }
- }
- return new SOAP_Value('outputStringArray',NULL,$ra);
+ $ra = array();
+ if ($inputStringArray) {
+ foreach($inputStringArray as $s) {
+ $ra[] = new SOAP_Value('item', 'string', $s);
+ }
+ }
+ return new SOAP_Value('outputStringArray', null, $ra);
}
- function &echoInteger($inputInteger)
+ function echoInteger($inputInteger)
{
- return new SOAP_Value('outputInteger','int',(integer)$inputInteger);
+ return new SOAP_Value('outputInteger', 'int', (integer)$inputInteger);
}
- function &echoIntegerArray($inputIntegerArray)
+ function echoIntegerArray($inputIntegerArray)
{
- $ra = array();
- if ($inputIntegerArray) {
- foreach ($inputIntegerArray as $i) {
- $ra[] =& new SOAP_Value('item','int',$i);
- }
- }
- return new SOAP_Value('outputIntArray',NULL,$ra);
+ $ra = array();
+ if ($inputIntegerArray) {
+ foreach ($inputIntegerArray as $i) {
+ $ra[] = new SOAP_Value('item', 'int', $i);
+ }
+ }
+ return new SOAP_Value('outputIntArray', null, $ra);
}
- function &echoFloat($inputFloat)
+ function echoFloat($inputFloat)
{
- return new SOAP_Value('outputFloat','float',(FLOAT)$inputFloat);
+ return new SOAP_Value('outputFloat', 'float', (float)$inputFloat);
}
- function &echoFloatArray($inputFloatArray)
+ function echoFloatArray($inputFloatArray)
{
- $ra = array();
- if ($inputFloatArray) {
- foreach($inputFloatArray as $float) {
- $ra[] =& new SOAP_Value('item','float',(FLOAT)$float);
- }
- }
- return new SOAP_Value('outputFloatArray',NULL,$ra);
+ $ra = array();
+ if ($inputFloatArray) {
+ foreach($inputFloatArray as $float) {
+ $ra[] = new SOAP_Value('item', 'float', (FLOAT)$float);
+ }
+ }
+ return new SOAP_Value('outputFloatArray', null, $ra);
}
- function &echoStruct($inputStruct)
+ function echoStruct($inputStruct)
{
- if (strtolower(get_class($inputStruct)) == 'soapstruct')
+ if (strtolower(get_class($inputStruct)) == 'soapstruct') {
return $inputStruct->__to_soap();
+ }
return $inputStruct;
}
- function &echoStructArray($inputStructArray)
+ function echoStructArray($inputStructArray)
{
- $ra = array();
- if ($inputStructArray) {
- $c = count($inputStructArray);
- for ($i = 0; $i < $c; $i++) {
- $ra[] = $this->echoStruct($inputStructArray[$i]);
- }
- }
- return $ra;
+ $ra = array();
+ if ($inputStructArray) {
+ $c = count($inputStructArray);
+ for ($i = 0; $i < $c; $i++) {
+ $ra[] = $this->echoStruct($inputStructArray[$i]);
+ }
+ }
+ return $ra;
}
function echoVoid()
{
- return NULL;
+ return NULL;
}
- function &echoBase64($b_encoded)
+ function echoBase64($b_encoded)
{
- return new SOAP_Value('return','base64Binary',base64_encode(base64_decode($b_encoded)));
+ return new SOAP_Value('return', 'base64Binary', base64_encode(base64_decode($b_encoded)));
}
- function &echoDate($timeInstant)
+ function echoDate($timeInstant)
{
- $dt =& new SOAP_Type_dateTime($timeInstant);
- if ($dt->toUnixtime() != -1) {
- $value = $dt->toSOAP();
- return new SOAP_Value('return','dateTime',$value);
- } else {
- return new SOAP_Fault("Value $timeInstant is not a dateTime value");
- }
+ $dt = new SOAP_Type_dateTime($timeInstant);
+ if ($dt->toUnixtime() != -1) {
+ $value = $dt->toSOAP();
+ return new SOAP_Value('return', 'dateTime', $value);
+ } else {
+ return new SOAP_Fault("Value $timeInstant is not a dateTime value");
+ }
}
- function &echoHexBinary($hb)
+ function echoHexBinary($hb)
{
- return new SOAP_Value('return','hexBinary',bin2hex(hex2bin($hb)));
+ return new SOAP_Value('return', 'hexBinary', bin2hex(hex2bin($hb)));
}
- function &echoDecimal($dec)
+ function echoDecimal($dec)
{
- return new SOAP_Value('return','decimal',(FLOAT)$dec);
+ return new SOAP_Value('return', 'decimal', (float)$dec);
}
- function &echoBoolean($boolean)
+ function echoBoolean($boolean)
{
- return new SOAP_Value('return','boolean',$boolean);
+ return new SOAP_Value('return', 'boolean', $boolean);
}
- function &echoMimeAttachment($stuff)
+ function echoMimeAttachment($stuff)
{
- return new SOAP_Attachment('return','application/octet-stream',NULL,$stuff);
+ return new SOAP_Attachment('return', 'application/octet-stream', null, $stuff);
}
}
-
-?>
View
92 interop_Round2GroupB.php
@@ -22,80 +22,78 @@
require_once 'params_classes.php';
class SOAP_Interop_GroupB {
+
var $__dispatch_map = array();
- function SOAP_Interop_GroupB() {
- $this->__dispatch_map['echoStructAsSimpleTypes'] =
- array('in' => array('inputStruct' => 'SOAPStruct'),
- 'out' => array('outputString' => 'string', 'outputInteger' => 'int', 'outputFloat' => 'float')
- );
- $this->__dispatch_map['echoSimpleTypesAsStruct'] =
- array('in' => array('inputString' => 'string', 'inputInteger' => 'int', 'inputFloat' => 'float'),
- 'out' => array('return' => 'SOAPStruct')
- );
- $this->__dispatch_map['echoNestedStruct'] =
- array('in' => array('inputStruct' => 'SOAPStructStruct'),
- 'out' => array('return' => 'SOAPStructStruct')
- );
- $this->__dispatch_map['echo2DStringArray'] =
- array('in' => array('input2DStringArray' => 'ArrayOfString2D'),
- 'out' => array('return' => 'ArrayOfString2D')
- );
- $this->__dispatch_map['echoNestedArray'] =
- array('in' => array('inputString' => 'SOAPArrayStruct'),
- 'out' => array('return' => 'SOAPArrayStruct')
- );
+ function SOAP_Interop_GroupB()
+ {
+ $this->__dispatch_map['echoStructAsSimpleTypes'] =
+ array('in' => array('inputStruct' => 'SOAPStruct'),
+ 'out' => array('outputString' => 'string', 'outputInteger' => 'int', 'outputFloat' => 'float'));
+ $this->__dispatch_map['echoSimpleTypesAsStruct'] =
+ array('in' => array('inputString' => 'string', 'inputInteger' => 'int', 'inputFloat' => 'float'),
+ 'out' => array('return' => 'SOAPStruct'));
+ $this->__dispatch_map['echoNestedStruct'] =
+ array('in' => array('inputStruct' => 'SOAPStructStruct'),
+ 'out' => array('return' => 'SOAPStructStruct'));
+ $this->__dispatch_map['echo2DStringArray'] =
+ array('in' => array('input2DStringArray' => 'ArrayOfString2D'),
+ 'out' => array('return' => 'ArrayOfString2D'));
+ $this->__dispatch_map['echoNestedArray'] =
+ array('in' => array('inputString' => 'SOAPArrayStruct'),
+ 'out' => array('return' => 'SOAPArrayStruct'));
}
/* this private function is called on by SOAP_Server to determine any
- special dispatch information that might be necessary. This, for example,
- can be used to set up a dispatch map for functions that return multiple
- OUT parameters */
- function __dispatch($methodname) {
- if (array_key_exists($methodname,$this->__dispatch_map))
+ * special dispatch information that might be necessary. This, for
+ * example, can be used to set up a dispatch map for functions that return
+ * multiple OUT parameters. */
+ function __dispatch($methodname)
+ {
+ if (array_key_exists($methodname,$this->__dispatch_map)) {
return $this->__dispatch_map[$methodname];
- return NULL;
+ }
+ return null;
}
- function &echoStructAsSimpleTypes (&$struct)
+ function echoStructAsSimpleTypes ($struct)
{
- # convert a SOAPStruct to an array
- $r[] =& new SOAP_Value('outputString','string',$struct->varString);
- $r[] =& new SOAP_Value('outputInteger','int',$struct->varInt);
- $r[] =& new SOAP_Value('outputFloat','float',$struct->varFloat);
- return $r;
+ // Convert a SOAPStruct to an array.
+ return array(
+ new SOAP_Value('outputString','string',$struct->varString),
+ new SOAP_Value('outputInteger','int',$struct->varInt),
+ new SOAP_Value('outputFloat','float',$struct->varFloat));
}
- function &echoSimpleTypesAsStruct(&$string, &$int, &$float)
+ function echoSimpleTypesAsStruct($string, $int, $float)
{
- # convert a input into struct
- $v =& new SOAPStruct($string, $int, $float);
- return new SOAP_Value('return','{http://soapinterop.org/xsd}SOAPStruct',$v);
+ // Convert a input into struct.
+ $v = new SOAPStruct($string, $int, $float);
+ return new SOAP_Value('return', '{http://soapinterop.org/xsd}SOAPStruct', $v);
}
- function &echoNestedStruct(&$struct)
+ function echoNestedStruct($struct)
{
$separator = "\n";
$methods = get_class_methods($struct);
$arr_str = $separator . strtolower(implode($separator, $methods));
$string = $separator . '__to_soap' . $separator;
- if(strpos($arr_str, $string) !== false) {
+ if (strpos($arr_str, $string) !== false) {
return $struct->__to_soap();
}
return $struct;
}
- function &echo2DStringArray(&$ary)
+ function echo2DStringArray($array)
{
- $ret =& new SOAP_Value('return','Array',$ary);
- $ret->options['flatten'] = TRUE;
- return $ret;
+ $ret = new SOAP_Value('return', 'Array', $array);
+ $ret->options['flatten'] = true;
+ return $ret;
}
- function &echoNestedArray(&$ary)
+ function echoNestedArray($array)
{
- return $ary;
+ return $array;
}
-}
-?>
+}
View
12 interop_Round2GroupC.php
@@ -21,15 +21,15 @@
require_once 'SOAP/Value.php';
class SOAP_Interop_GroupC_Headers {
- function &echoMeStringRequest($string)
+
+ function echoMeStringRequest($string)
{
- return new SOAP_Value('{http://soapinterop.org/echoheader/}echoMeStringResponse','string',$string);
+ return new SOAP_Value('{http://soapinterop.org/echoheader/}echoMeStringResponse', 'string', $string);
}
- function &echoMeStructRequest($struct)
+ function echoMeStructRequest($struct)
{
- return new SOAP_Value('{http://soapinterop.org/echoheader/}echoMeStructResponse','SOAPStruct',$struct);
+ return new SOAP_Value('{http://soapinterop.org/echoheader/}echoMeStructResponse', 'SOAPStruct', $struct);
}
-}
-?>
+}
View
29 interop_Round3GroupD.php
@@ -23,32 +23,31 @@
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-class SOAP_Interop_GroupD
-{
+class SOAP_Interop_GroupD {
// wsdlns:SoapInteropEmptySABinding
- function &echoString($inputString)
+ function echoString($inputString)
{
- return new SOAP_Value('outputString','string',$inputString);
+ return new SOAP_Value('outputString', 'string', $inputString);
}
- function &echoStringArray($inputStringArray)
+ function echoStringArray($inputStringArray)
{
$ra = array();
if ($inputStringArray) {
- foreach($inputStringArray as $s) {
- $ra[] = new SOAP_Value('item','string',$s);
+ foreach ($inputStringArray as $s) {
+ $ra[] = new SOAP_Value('item', 'string', $s);
}
}
- return new SOAP_Value('outputStringArray',NULL,$ra);
+ return new SOAP_Value('outputStringArray', null, $ra);
}
- function &echoStruct($inputStruct)
+ function echoStruct($inputStruct)
{
return $inputStruct->to_soap();
}
- function &echoStructArray($inputStructArray)
+ function echoStructArray($inputStructArray)
{
$ra = array();
if ($inputStructArray) {
@@ -62,22 +61,22 @@ function &echoStructArray($inputStructArray)
function echoVoid()
{
- return NULL;
+ return null;
}
function echoPerson()
{
- return NULL;
+ return null;
}
- function &x_Document(&$document)
+ function x_Document(&$document)
{
- return new SOAP_Value('result_Document','{http://soapinterop.org/xsd}x_Document',$document);
+ return new SOAP_Value('result_Document', '{http://soapinterop.org/xsd}x_Document', $document);
}
function echoEmployee()
{
- return NULL;
+ return null;
}
}
View
10 interop_client.php
@@ -272,7 +272,7 @@ function doEndpointMethod(&$endpoint_info, &$soap_test) {
}
$endpoint_info->client->_auto_translation = true;
}
- if ($endpoint_info->client->_wsdl->__isfault()) {
+ if ($endpoint_info->client->_wsdl->_isfault()) {
$fault =& $endpoint_info->client->_wsdl->fault->getFault();
$detail = $fault->faultstring."\n\n".$fault->faultdetail;
$soap_test->setResult(0,'WSDL',
@@ -422,12 +422,12 @@ function doEndpointMethod(&$endpoint_info, &$soap_test) {
$fault->faultcode = 'HEADER';
$fault->faultstring = 'The returned result did not match what we expected to receive';
$soap_test->setResult(0,$fault->faultcode,
- $soap->__get_wire(),
+ $soap->getWire(),
$fault->faultstring,
$fault
);
} else {
- $soap_test->setResult(1,'OK',$soap->__get_wire());
+ $soap_test->setResult(1,'OK',$soap->getWire());
$success = TRUE;
}
} else {
@@ -437,7 +437,7 @@ function doEndpointMethod(&$endpoint_info, &$soap_test) {
$fault->faultdetail = ''/*"SENT:\n".var_export($soap_test->result['sent']).
"\n\nRECIEVED:\n".var_export($soap_test->result['return'])*/;
$soap_test->setResult(0,$fault->faultcode,
- $soap->__get_wire(),
+ $soap->getWire(),
$fault->faultstring,
$fault
);
@@ -451,7 +451,7 @@ function doEndpointMethod(&$endpoint_info, &$soap_test) {
$ok = 0;
$res =$fault->faultcode;
}
- $soap_test->setResult($ok,$res, $soap->__get_wire(),$fault->faultstring, $fault);
+ $soap_test->setResult($ok,$res, $soap->getWire(),$fault->faultstring, $fault);
}
$soap->_reset();
unset($return);
View
74 package.xml
@@ -32,10 +32,10 @@
<license>PHP License</license>
<release>
<state>beta</state>
- <version>0.8.1</version>
+ <version>0.8.2</version>
<date>2007-01-21</date>
<notes>
- PHP 4.4 and 5 compatibility fixes.
+ More PHP 4.4 and 5 reference fixes.
</notes>
<filelist>
<dir name="/" baseinstalldir="SOAP/Interop">
@@ -102,36 +102,44 @@
</deps>
</release>
<changelog>
- <release>
- <state>beta</state>
- <version>0.8</version>
- <date>2003-08-17</date>
- <notes>
- Minor updates bump version to match PEAR::SOAP
- </notes>
- </release>
- <release>
- <version>0.7.2</version>
- <date>2003-04-01</date>
- <notes>
- Minor fixes over 0.7.1.
- </notes>
- </release>
- <release>
- <state>beta</state>
- <version>0.7.1</version>
- <date>2002-12-01</date>
- <notes>
- Minor fixes to make interop suite run without modifications.
- </notes>
- </release>
- <release>
- <state>beta</state>
- <version>0.7.0</version>
- <date>2002-10-20</date>
- <notes>
- Initial release of the SOAP Builders Interop Test Suite for PEAR::SOAP
- </notes>
- </release>
+ <release>
+ <state>beta</state>
+ <version>0.8.1</version>
+ <date>2007-01-21</date>
+ <notes>
+ PHP 4.4 and 5 compatibility fixes.
+ </notes>
+ </release>
+ <release>
+ <state>beta</state>
+ <version>0.8</version>
+ <date>2003-08-17</date>
+ <notes>
+ Minor updates bump version to match PEAR::SOAP
+ </notes>
+ </release>
+ <release>
+ <version>0.7.2</version>
+ <date>2003-04-01</date>
+ <notes>
+ Minor fixes over 0.7.1.
+ </notes>
+ </release>
+ <release>
+ <state>beta</state>
+ <version>0.7.1</version>
+ <date>2002-12-01</date>
+ <notes>
+ Minor fixes to make interop suite run without modifications.
+ </notes>
+ </release>
+ <release>
+ <state>beta</state>
+ <version>0.7.0</version>
+ <date>2002-10-20</date>
+ <notes>
+ Initial release of the SOAP Builders Interop Test Suite for PEAR::SOAP
+ </notes>
+ </release>
</changelog>
</package>
View
23 server_Round3GroupDCompound1.php
@@ -26,33 +26,33 @@
class SOAP_Interop_GroupDCompound1 {
- function &echoPerson(&$person)
+ function echoPerson($person)
{
return $person->__to_soap('result_Person');
}
- function &echoDocument(&$document)
+ function echoDocument($document)
{
$ns = '{http://soapinterop.org/xsd}';
- return new SOAP_Value($ns.'result_Document',$ns.'x_Document',$document);
+ return new SOAP_Value($ns . 'result_Document', $ns . 'x_Document', $document);
}
-}
+}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$options = array('use'=>'literal','style'=>'document');
-$groupd =& new SOAP_Interop_GroupDCompound1();
-$server =& new SOAP_Server($options);
+$options = array('use' => 'literal', 'style' => 'document');
+$groupd = new SOAP_Interop_GroupDCompound1();
+$server = new SOAP_Server($options);
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop/');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/compound1.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
@@ -68,6 +68,5 @@ function &echoDocument(&$document)
<ns4:x_Document>Test Document Here</ns4:x_Document>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
17 server_Round3GroupDCompound2.php
@@ -26,29 +26,27 @@
class SOAP_Interop_GroupDCompound2 {
- function &echoEmployee(&$employee)
+ function echoEmployee(&$employee)
{
return $employee->__to_soap('result_Employee');
}
}
-
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$options = array('use'=>'literal','style'=>'document');
-$groupd =& new SOAP_Interop_GroupDCompound2();
-$server =& new SOAP_Server($options);
+$options = array('use' => 'literal', 'style' => 'document');
+$groupd = new SOAP_Interop_GroupDCompound2();
+$server = new SOAP_Server($options);
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop.org/employee');
+$server->addObjectMap($groupd, 'http://soapinterop.org/employee');
$server->bind('http://localhost/soap_interop/wsdl/compound2.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : NULL);
} else {
-
$test = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
@@ -68,6 +66,5 @@ function &echoEmployee(&$employee)
<ns5:ID>12345</ns5:ID></ns5:x_Employee>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
48 server_Round3GroupDDocLit.php
@@ -25,54 +25,56 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDDocLit {
+
// wsdlns:SoapInteropEmptySABinding
- function &echoString($inputString)
+ function echoString($inputString)
{
- return new SOAP_Value('{http://soapinterop.org/xsd}echoStringReturn','string',$inputString);
+ return new SOAP_Value('{http://soapinterop.org/xsd}echoStringReturn', 'string', $inputString);
}
- function &echoStringArray($inputStringArray)
+ function echoStringArray($inputStringArray)
{
- $ra = array();
- if ($inputStringArray) {
- foreach($inputStringArray as $s) {
- $ra[] =& new SOAP_Value('item','string',$s);
- }
- }
- return new SOAP_Value('{http://soapinterop.org/xsd}echoStringArrayReturn',NULL,$ra);
+ $ra = array();
+ if ($inputStringArray) {
+ foreach ($inputStringArray as $s) {
+ $ra[] =& new SOAP_Value('item', 'string', $s);
+ }
+ }
+ return new SOAP_Value('{http://soapinterop.org/xsd}echoStringArrayReturn', null, $ra);
}
- function &echoStruct($inputStruct)
+ function echoStruct($inputStruct)
{
$ns = '{http://soapinterop.org/xsd}';
- if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct')
+ if (is_object($inputStruct) &&
+ strtolower(get_class($inputStruct)) == 'soapstruct') {
return $inputStruct->__to_soap($ns.'echoStructReturn');
- else {
+ } else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
- $struct =& new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
+ $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap($ns.'echoStructReturn');
}
}
-}
+}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$options = array('use'=>'literal','style'=>'document');
-$groupd =& new SOAP_Interop_GroupDDocLit();
-$server =& new SOAP_Server($options);
+$options = array('use'=>'literal', 'style'=>'document');
+$groupd = new SOAP_Interop_GroupDDocLit();
+$server = new SOAP_Server($options);
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop.org/WSDLInteropTestDocLit');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestDocLit');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLit.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : NULL);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
@@ -91,6 +93,6 @@ function &echoStruct($inputStruct)
<ns4:varFloat>325.325</ns4:varFloat></ns4:echoStructParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
+
View
49 server_Round3GroupDDocLitParams.php
@@ -25,56 +25,58 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDDocLitParams {
- function &echoString($inputString)
+
+ function echoString($inputString)
{
- return new SOAP_Value('return','string',$inputString);
+ return new SOAP_Value('return', 'string', $inputString);
}
- function &echoStringArray($inputStringArray)
+ function echoStringArray($inputStringArray)
{
- $ra = array();
- if ($inputStringArray) {
- foreach($inputStringArray as $s) {
- $ra[] =& new SOAP_Value('item','string',$s);
- }
- }
- return new SOAP_Value('return',NULL,$ra);
+ $ra = array();
+ if ($inputStringArray) {
+ foreach ($inputStringArray as $s) {
+ $ra[] =& new SOAP_Value('item', 'string', $s);
+ }
+ }
+ return new SOAP_Value('return', null, $ra);
}
- function &echoStruct($inputStruct)
+ function echoStruct($inputStruct)
{
- if (is_object($inputStruct) && get_class($inputStruct)=='soapstruct')
+ if (is_object($inputStruct) &&
+ get_class($inputStruct) == 'soapstruct') {
return $inputStruct->__to_soap('return');
- else {
+ } else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
- $struct =& new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
+ $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap('return');
}
}
function echoVoid()
{
- return NULL;
+ return null;
}
-}
+}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$options = array('use'=>'literal','style'=>'document');
-$groupd =& new SOAP_Interop_GroupDDocLitParams();
-$server =& new SOAP_Server($options);
+$options = array('use' => 'literal', 'style' => 'document');
+$groupd = new SOAP_Interop_GroupDDocLitParams();
+$server = new SOAP_Server($options);
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop/');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLitParameters.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
@@ -90,6 +92,5 @@ function echoVoid()
<ns4:echoVoid/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
17 server_Round3GroupDImport1.php
@@ -25,25 +25,25 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDImport1 {
- function &echoString($inputString)
+
+ function echoString($inputString)
{
- return new SOAP_Value('Result','string',$inputString);
+ return new SOAP_Value('Result', 'string', $inputString);
}
}
-
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$groupd =& new SOAP_Interop_GroupDImport1();
-$server =& new SOAP_Server();
+$groupd = new SOAP_Interop_GroupDImport1();
+$server = new SOAP_Server();
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/echoString/');
+$server->addObjectMap($groupd, 'http://soapinterop/echoString/');
$server->bind('http://localhost/soap_interop/wsdl/import1.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
@@ -60,6 +60,5 @@ function &echoString($inputString)
<x xsi:type="xsd:string">Hello World</x></ns4:echoString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
28 server_Round3GroupDImport2.php
@@ -25,37 +25,36 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDImport2 {
- function &echoStruct($inputStruct)
+
+ function echoStruct($inputStruct)
{
- if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct')
+ if (is_object($inputStruct) &&
+ strtolower(get_class($inputStruct)) == 'soapstruct') {
return $inputStruct->__to_soap('Result');
- else {
+ } else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
- $struct =& new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
+ $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap('Result');
}
}
}
-
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$groupd =& new SOAP_Interop_GroupDImport2();
-$server =& new SOAP_Server();
+$groupd = new SOAP_Interop_GroupDImport2();
+$server = new SOAP_Server();
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop/');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
if (isset($_SERVER['SERVER_NAME'])) {
- $baseurl = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].'/soap_interop/';
- #$server->bind($baseurl.'wsdl/import2.wsdl.php');
- #echo $baseurl;
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $baseurl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/soap_interop/';
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
$baseurl = 'http://localhost/soap_interop/';
$server->bind($baseurl.'wsdl/import2.wsdl.php');
@@ -78,6 +77,5 @@ function &echoStruct($inputStruct)
<varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns5:echoStruct>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
45 server_Round3GroupDImport3.php
@@ -25,47 +25,49 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDImport3 {
- function &echoStruct($inputStruct)
+
+ function echoStruct($inputStruct)
{
$ns = '{http://soapinterop.org/xsd}';
- if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct')
- return $inputStruct->__to_soap($ns.'return');
- else {
+ if (is_object($inputStruct) &&
+ strtolower(get_class($inputStruct)) == 'soapstruct') {
+ return $inputStruct->__to_soap($ns . 'return');
+ } else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
- $struct =& new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
+ $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap($ns.'return');
}
}
- function &echoStructArray($inputStructArray)
+ function echoStructArray($inputStructArray)
{
- $ra = array();
- if ($inputStructArray) {
- $c = count($inputStructArray);
- for ($i = 0; $i < $c; $i++) {
- $ra[] = $inputStructArray[$i]->__to_soap('item');
- }
- }
- return $ra;
+ $ra = array();
+ if ($inputStructArray) {
+ $c = count($inputStructArray);
+ for ($i = 0; $i < $c; $i++) {
+ $ra[] = $inputStructArray[$i]->__to_soap('item');
+ }
+ }
+ return $ra;
}
-}
+}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$groupd =& new SOAP_Interop_GroupDImport3();
-$server =& new SOAP_Server();
+$groupd = new SOAP_Interop_GroupDImport3();
+$server = new SOAP_Server();
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop/');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/import3.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
- $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
+ $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
// allows command line testing of specific request
$test = '<?xml version="1.0" encoding="UTF-8"?>
@@ -95,6 +97,5 @@ function &echoStructArray($inputStructArray)
<varFloat xsi:type="xsd:float">325.325</varFloat></item></inputArray></ns5:echoStructArray>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
- $server->service($test,'',TRUE);
+ $server->service($test, '', true);
}
-?>
View
48 server_Round3GroupDRpcEnc.php
@@ -25,55 +25,55 @@
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDRpcEnc {
+
// wsdlns:SoapInteropEmptySABinding
- function &echoString($inputString)
+ function echoString($inputString)
{
- return new SOAP_Value('echoStringReturn','string',$inputString);
+ return new SOAP_Value('echoStringReturn', 'string', $inputString);
}
- function &echoStringArray($inputStringArray)
+ function echoStringArray($inputStringArray)
{
- $ra = array();
- if ($inputStringArray) {
- foreach($inputStringArray as $s) {
- $ra[] =& new SOAP_Value('item','string',$s);
- }
- }
- return new SOAP_Value('echoStringArrayReturn',NULL,$ra);
+ $ra = array();
+ if ($inputStringArray) {
+ foreach($inputStringArray as $s) {
+ $ra[] = new SOAP_Value('item', 'string', $s);
+ }
+ }
+ return new SOAP_Value('echoStringArrayReturn', null, $ra);
}
- function &echoStruct($inputStruct)
+ function echoStruct($inputStruct)
{
- if (is_object($inputStruct) && strtolower(get_class($inputStruct))=='soapstruct')
+ if (is_object($inputStruct) &&
+ strtolower(get_class($inputStruct)) == 'soapstruct') {
return $inputStruct->__to_soap('return');
- else {
+ } else {
if (is_object($inputStruct)) {
$inputStruct = get_object_vars($inputStruct);
}
- $struct =& new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
+ $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
return $struct->__to_soap('return');
}
}
function echoVoid()
{
- return NULL;
+ return null;
}
-}
+}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
-$groupd =& new SOAP_Interop_GroupDRpcEnc();
-$server =& new SOAP_Server();
+$groupd = new SOAP_Interop_GroupDRpcEnc();
+$server = new SOAP_Server();
$server->_auto_translation = true;
-$server->addObjectMap($groupd,'http://soapinterop/');
-$server->addObjectMap($groupd,'http://soapinterop.org/xsd');
-$server->addObjectMap($groupd,'http://soapinterop.org/WSDLInteropTestRpcEnc');
+$server->addObjectMap($groupd, 'http://soapinterop/');
+$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
+$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestRpcEnc');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestRpcEnc.wsdl.php');
-$server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
-
-?>
+$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
Please sign in to comment.
Something went wrong with that request. Please try again.