diff --git a/reference/soap/functions/SoapClient-SoapClient.xml b/reference/soap/functions/SoapClient-SoapClient.xml deleted file mode 100644 index 63473e49d9..0000000000 --- a/reference/soap/functions/SoapClient-SoapClient.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - SoapClient::SoapClient - - SoapClient constructor - - - - Description - - SoapClientSoapClient::SoapClient - mixedwsdl - arrayoptions - - - This constructor allows creating SoapClient objects in WSDL or non-WSDL mode. - The first case requires the URI of WSDL file as the first parameter and an - optional options array. The second case requires &null; - as the first parameter and the options array with - location and uri options set, - where location is a URL to request and uri - is a target namespace of the SOAP service. - - - The style and use options only work in - non-WSDL mode. In WSDL mode, they comes from the WSDL file. - - - The soap_version option specifies whether to use SOAP - 1.1, or SOAP 1.2 client. - - - For HTTP authentication, you may use the login and - password options. For making a HTTP connection through - a proxy server, use the options proxy_host, - proxy_port, proxy_login - and proxy_password. - - - - SoapClient examples - - SOAP_1_2)); - -$client = new SoapClient("some.wsdl", array('login' => "some_name", - 'password' => "some_password")); - -$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", - 'proxy_port' => 8080)); - -$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", - 'proxy_port' => 8080, - 'proxy_login' => "some_name", - 'proxy_password' => "some_password")); - -$client = new SoapClient(null, array('location' => "http://localhost/soap.php", - 'uri' => "http://test-uri/")); - -$client = new SoapClient(null, array('location' => "http://localhost/soap.php", - 'uri' => "http://test-uri/", - 'style' => SOAP_DOCUMENT, - 'use' => SOAP_LITERAL)); - -?> -]]> - - - - - - - diff --git a/reference/soap/functions/SoapClient-call.xml b/reference/soap/functions/SoapClient-call.xml deleted file mode 100644 index 5c8d432483..0000000000 --- a/reference/soap/functions/SoapClient-call.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - SoapClient::__call - - Calls a SOAP function - - - - Description - - mixedSoapClient::__call - stringfunction_name - arrayarguments - arrayoptions - arrayinput_headers - arrayoutput_headers - - - This is a low level API function to make a SOAP call. Usually in WSDL mode - you can simply call SOAP functions as SoapClient methods. It is useful for - non-WSDL mode when soapaction is unknown, uri - differs from the default or when you like to send and/or receive SOAP Headers. - On error, a call to a SOAP function can cause PHP exceptions or return a - SoapFault object if exceptions was disabled. - To check if the function call failed catch the SoapFault exceptions or - check the result with the is_soap_fault function. - - - SOAP functions may return one or several values. In the first case it will - return just the value of output parameter, in the second it will return - the associative array with named output parameters. - - - - <function>SoapClient::__call</function> examples - -SomeFunction($a, $b, $c); -$client->__call("SomeFunction", array($a, $b, $c)); -$client->__call("SomeFunction", array($a, $b, $c), NULL, - new SoapHeader(), $output_headers); - - -$client = new SoapClient(null, array('location' => "http://localhost/soap.php", - 'uri' => "http://test-uri/")); -$client->SomeFunction($a, $b, $c); -$client->__call("SomeFunction", array($a, $b, $c)); -$client->__call("SomeFunction", array($a, $b, $c), - array('soapaction' => 'some_action', - 'uri' => 'some_uri')); -?> -]]> - - - - - See also - SoapClient::SoapClient, - SoapParam::SoapParam, - SoapVar::SoapVar, - SoapHeader::SoapHeader, - SoapFault::SoapFault, and - is_soap_fault. - - - - - diff --git a/reference/soap/functions/SoapClient-getFunctions.xml b/reference/soap/functions/SoapClient-getFunctions.xml deleted file mode 100644 index 5f47b27183..0000000000 --- a/reference/soap/functions/SoapClient-getFunctions.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - SoapClient::__getFunctions - - Returns list of SOAP functions - - - - Description - - arraySoapClient::__getFunctions - - - - This function works only in WSDL mode. - - - - <function>SoapClient::__getFunctions</function> example - -__getFunctions()); -?> -]]> - - - - - See also - SoapClient::SoapClient. - - - - - diff --git a/reference/soap/functions/SoapClient-getLastRequest.xml b/reference/soap/functions/SoapClient-getLastRequest.xml deleted file mode 100644 index 402ba82c79..0000000000 --- a/reference/soap/functions/SoapClient-getLastRequest.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - SoapClient::__getLastRequest - - Returns last SOAP request - - - - Description - - stringSoapClient::__getLastRequest - - - - This function works only with SoapClient which was created with - the trace option. - - - - <function>SoapClient::__getLastRequest</function> example - - 1)); -$result = $client->SomeFunction(); -echo "REQUEST:\n" . $client->__getLastRequest() . "\n"; -?> -]]> - - - - - See also - SoapClient::SoapClient. - - - - - diff --git a/reference/soap/functions/SoapClient-getLastResponse.xml b/reference/soap/functions/SoapClient-getLastResponse.xml deleted file mode 100644 index c16dde59a1..0000000000 --- a/reference/soap/functions/SoapClient-getLastResponse.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - SoapClient::__getLastResponse - - Returns last SOAP response - - - - Description - - stringSoapClient::__getLastResponse - - - - This function works only with SoapClient which was created with - the trace option. - - - - <function>SoapClient::__getLastResponse</function> example - - 1)); -$result = $client->SomeFunction(); -echo "RESPONSE:\n" . $client->__getLastResponse() . "\n"; -?> -]]> - - - - - See also - SoapClient::SoapClient. - - - - - diff --git a/reference/soap/functions/SoapClient-getTypes.xml b/reference/soap/functions/SoapClient-getTypes.xml deleted file mode 100644 index 0ce3421643..0000000000 --- a/reference/soap/functions/SoapClient-getTypes.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - SoapClient::__getTypes - - Returns list of SOAP types - - - - Description - - arraySoapClient::__getTypes - - - - This function works only in WSDL mode. - - - - <function>SoapClient::__getTypes</function> example - -__getTypes()); -?> -]]> - - - - - See also - SoapClient::SoapClient. - - - - - diff --git a/reference/soap/functions/SoapFault-SoapFault.xml b/reference/soap/functions/SoapFault-SoapFault.xml deleted file mode 100644 index 42a852cf5a..0000000000 --- a/reference/soap/functions/SoapFault-SoapFault.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - SoapFault::SoapFault - - SoapFault constructor - - - - Description - - SoapFaultSoapFault::SoapFault - stringfaultcode - stringfaultstring - stringfaultactor - mixeddetail - stringfaultname - mixedheaderfault - - - This class is useful when you would like to send SOAP fault responses from - the PHP handler. faultcode, faultstring, - faultactor and details are - standard elements of SOAP Fault; faultname is an - optional parameter that can be used to select proper fault encoding from - WSDL; headerfault is an optional parameter that - can be used during SOAP header handling to report an error in the response - header. - - - - Some examples - - "http://test-uri/")); -$server->addFunction("test"); -$server->handle(); -?> -]]> - - - - - It is possible to use PHP exception mechanism to throw SOAP Fault. - - - - Some examples - - "http://test-uri/")); -$server->addFunction("test"); -$server->handle(); -?> -]]> - - - - - See also - SoapClient::SoapClient, - SoapClient::__call, - SoapParam::SoapParam, - SoapVar::SoapVar, and - is_soap_fault. - - - - - diff --git a/reference/soap/functions/SoapHeader-SoapHeader.xml b/reference/soap/functions/SoapHeader-SoapHeader.xml deleted file mode 100644 index 5cafad4b1a..0000000000 --- a/reference/soap/functions/SoapHeader-SoapHeader.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - SoapHeader::SoapHeader - - SoapHeader constructor - - - - Description - - SoapHeaderSoapHeader::SoapHeader - stringnamespace - stringname - mixeddata - boolmustUnderstand - mixedactor - - - SoapHeader is a special low-level class for passing or returning SOAP - headers. It is just a data holder and it does not have any special methods - except a constructor. It can be used in the SoapClient::__call - method to pass a SOAP header or in a SOAP header handler to return the header in - a SOAP response. namespace and name - are namespace and name of the SOAP header element. data is a SOAP - header's content. It can be a PHP value or SoapVar object. - mustUnderstand and actor are values for - mustUnderstand and actor attributes - of this SOAP Header element. - - - - Some examples - - "http://localhost/soap.php", - 'uri' => "http://test-uri/")); -$client->__call("echoVoid", null, null, - new SoapHeader('http://soapinterop.org/echoheader/', - 'echoMeStringRequest', - 'hello world')); -?> -]]> - - - - - See also - SoapClient::__call, - SoapParam::SoapParam, and - SoapVar::SoapVar. - - - - - diff --git a/reference/soap/functions/SoapParam-SoapParam.xml b/reference/soap/functions/SoapParam-SoapParam.xml deleted file mode 100644 index 0ea68cce3e..0000000000 --- a/reference/soap/functions/SoapParam-SoapParam.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - SoapParam::SoapParam - - SoapParam constructor - - - - Description - - SoapParamSoapParam::SoapParam - mixeddata - stringname - - - SoapParam is a special low-level class for naming parameters and returning - values in non-WSDL mode. It is just a data holder and it does not have any - special methods except the constructor. The constructor takes - data to pass or return and name. - It is possible to pass parameters directly as PHP values, but in this case - it will be named as paramN and the SOAP Service may not - understand them. - - - - Some examples - - "http://localhost/soap.php", - 'uri' => "http://test-uri/")); -$client->SomeFunction(new SoapParam($a, "a"), - new SoapParam($b, "b"), - new SoapParam($c, "c")); -?> -]]> - - - - - See also - SoapClient::__call, and - SoapVar::SoapVar. - - - - - diff --git a/reference/soap/functions/SoapServer-SoapServer.xml b/reference/soap/functions/SoapServer-SoapServer.xml deleted file mode 100644 index bc2b556806..0000000000 --- a/reference/soap/functions/SoapServer-SoapServer.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - SoapServer::SoapServer - - SoapServer constructor - - - - Description - - SoapServerSoapServer::SoapServer - mixedwsdl - arrayoptions - - - This constructor allows the creation of SoapServer objects in WSDL or non-WSDL mode. - In the first case, wsdl must be set to the URI of a WSDL file. - In the second case, wsdl must be set to &null; and the - uri option must be set. - Additional options allow setting a default SOAP version - (soap_version) and actor URI (actor). - - - - Some examples - - SOAP_1_2)); - -$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C")); - -$server = new SoapServer(null, array('uri' => "http://test-uri/")); - -?> -]]> - - - - - - - diff --git a/reference/soap/functions/SoapServer-addFunction.xml b/reference/soap/functions/SoapServer-addFunction.xml deleted file mode 100644 index ca90d11c10..0000000000 --- a/reference/soap/functions/SoapServer-addFunction.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - SoapServer::addFunction - - Adds one or several functions those will handle SOAP requests - - - - Description - - voidSoapServer::addFunction - mixedfunctions - - - Exports one or more functions for remote clients. - - - To export one function, pass the function name into the - functions parameter as a string. - To export several functions pass an array of function names, and to export all - functions pass a special constant SOAP_FUNCTIONS_ALL. - - - functions must receive all input arguments in the same - order as defined in the WSDL file (They should not receive any output parameters - as arguments) and return one or more values. To return several values they must - return an array with named output parameters. - - - - Some examples - -addFunction("echoString"); - -function echoTwoStrings($inputString1, $inputString2) -{ - return array("outputString1" => $inputString1, - "outputString2" => $inputString2); -} -$server->addFunction(array("echoString", "echoTwoStrings")); - -$server->addFunction(SOAP_FUNCTIONS_ALL); - -?> -]]> - - - - - See also - SoapServer::SoapServer, and - SoapServer::SetClass. - - - - - diff --git a/reference/soap/functions/SoapServer-getFunctions.xml b/reference/soap/functions/SoapServer-getFunctions.xml deleted file mode 100644 index 5b58eec933..0000000000 --- a/reference/soap/functions/SoapServer-getFunctions.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - SoapServer::getFunctions - - Returns list of defined functions - - - - Description - - arraySoapServer::getFunctions - - - - This functions returns the list of all functions which was added by - SoapServer::addFunction or - SoapServer::setClass. - - - - Some examples - - "http://test-uri")); -$server->addFunction(SOAP_FUNCTIONS_ALL); -if ($_SERVER["REQUEST_METHOD"] == "POST") { - $server->handle(); -} else { - echo "This SOAP server can handle following functions: "; - $functions = $server->getFunctions(); - foreach($functions as $func) { - echo $func . "\n"; - } -} -?> -]]> - - - - - See also - SoapServer::SoapServer, - SoapServer::addFunction, and - SoapServer::SetClass. - - - - - diff --git a/reference/soap/functions/SoapServer-handle.xml b/reference/soap/functions/SoapServer-handle.xml deleted file mode 100644 index 1897456548..0000000000 --- a/reference/soap/functions/SoapServer-handle.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - SoapServer::handle - - Handles a SOAP request - - - - Description - - voidSoapServer::handle - stringsoap_request - - - Processes a SOAP request, calls necessary functions, and sends a response - back. It assumes a request in input parameter soap_request - or in the global $HTTP_RAW_POST_DATA PHP variable if the argument is - omitted. - - - - Some examples - - "http://test-uri/")); -$server->addFunction("test"); -$server->handle(); -?> -]]> - - - - - See also - SoapServer::SoapServer. - - - - - diff --git a/reference/soap/functions/SoapServer-setClass.xml b/reference/soap/functions/SoapServer-setClass.xml deleted file mode 100644 index 966fac1438..0000000000 --- a/reference/soap/functions/SoapServer-setClass.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - SoapServer::setClass - - Sets class which will handle SOAP requests - - - - Description - - voidSoapServer::setClass - stringclass_name - mixedargs - - - Exports all methods from specified class. Additional parameters args - will be passed to the default class constructor during object creation. - The object can be made persistent across request for a given PHP session - with the SoapServer::setPersistence method. - - - - Some examples - -setClass("foo"); - -class bar { - function bar($x, $y) - { - } -} -$server->setClass("bar", $arg1, $arg2); - -?> -]]> - - - - - See also - SoapServer::SoapServer, - SoapServer::addFunction, and - SoapServer::setPersistence. - - - - - diff --git a/reference/soap/functions/SoapServer-setPersistence.xml b/reference/soap/functions/SoapServer-setPersistence.xml deleted file mode 100644 index 5a87528acd..0000000000 --- a/reference/soap/functions/SoapServer-setPersistence.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - SoapServer::setPersistence - - Sets persistence mode of SoapServer - - - - Description - - voidSoapServer::setPersistence - intmode - - - This function allows saving data between requests in a PHP session. It works only - with a server that exports functions from a class with - SoapServer::setClass. - - - - Some examples - -setPersistence(SOAP_PERSISTENCE_SESSION); - -$server->setPersistence(SOAP_PERSISTENCE_REQUEST); - -?> -]]> - - - - - See also - SoapServer::SoapServer, and - SoapServer::SetClass. - - - - - diff --git a/reference/soap/functions/SoapVar-SoapVar.xml b/reference/soap/functions/SoapVar-SoapVar.xml deleted file mode 100644 index f471b23540..0000000000 --- a/reference/soap/functions/SoapVar-SoapVar.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - SoapVar::SoapVar - - SoapVar constructor - - - - Description - - SoapVarSoapVar::SoapVar - mixeddata - intencoding - stringtype_name - stringtype_namespace - stringnode_name - stringnode_namespace - - - SoapVar is a special low-level class for encoding parameters and returning - values in non-WSDL mode. It is just a data holder and does not have any - special methods except the constructor. It is useful when you would like to set - the type property in SOAP request or response. The constructor takes - data to pass or return, encoding - ID to encode it (see XSD_... constants) and as option type - name and namespace and XML node name and namespace. - - - - Some examples - -varString = $s; - $this->varInt = $i; - $this->varFloat = $f; - } -} -$client = new SoapClient(null, array('location' => "http://localhost/soap.php", - 'uri' => "http://test-uri/")); -$struct = new SOAPStruct('arg', 34, 325.325); -$soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd"); -$client->echoStruct(new SoapParam($soapstruct, "inputStruct")); -?> -]]> - - - - - See also - SoapClient::__call and - SoapParam::SoapParam. - - - - - diff --git a/reference/soap/functions/is-soap-fault.xml b/reference/soap/functions/is-soap-fault.xml index 822a70d312..e4b6dc8b4b 100644 --- a/reference/soap/functions/is-soap-fault.xml +++ b/reference/soap/functions/is-soap-fault.xml @@ -1,37 +1,61 @@ - - - - is_soap_fault - - Checks if SOAP call was failed - - - - Description - - boolis_soap_fault - mixedobj - - - This function is useful when you like to check if the - SOAP call failed, but don't like to use exceptions. - To use it you must create a SoapClient object with - exceptions option set to zero or &false;. - In this case, the SOAP method will return a special SoapFault - object which encapsulates the fault details (faultcode, - faultstring, faultactor and faultdetails). - - - If exceptions is not set then SOAP call will throw - an exception on error. - is_soap_fault checks if the given - parameter is a SoapFault object. - - - - <function>is_soap_fault</function> example - + + + + is_soap_fault + + Checks if SOAP call was failed + + + + &reftitle.description; + + boolis_soap_fault + mixedobj + + + This function is useful when you like to check if the SOAP call failed, but + don't like to use exceptions. To use it you must create a + SoapClient object with the exceptions + option set to zero or &false;. + In this case, the SOAP method will return a special + SoapFault object which encapsulates the fault + details (faultcode, faultstring, faultactor and faultdetails). + + + If exceptions is not set then SOAP call will throw + an exception on error. + is_soap_fault checks if the given + parameter is a SoapFault object. + + + + &reftitle.parameters; + + + + obj + + + The tested object. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.examples; + + + <function>is_soap_fault</function> example + 0)); @@ -41,11 +65,11 @@ if (is_soap_fault($result)) { } ?> ]]> - - - - SOAP's standard method for error reporting is exceptions - + + + + SOAP's standard method for error reporting is exceptions + ]]> - - - - - See also - SoapClient::SoapClient, and - SoapFault::SoapFault. - - - + + + + + + &reftitle.seealso; + + + + + + + + + + + SoapClient->__call() + + Calls a SOAP function + + + + &reftitle.description; + + SoapClient + + mixed + __call + stringfunction_name + arrayarguments + arrayoptions + arrayinput_headers + arrayoutput_headers + + + + This is a low level API function to make a SOAP call. Usually in WSDL mode + you can simply call SOAP functions as SoapClient + methods. It is useful for non-WSDL mode when soapaction + is unknown, uri differs from the default or when you like + to send and/or receive SOAP Headers. + + + On error, a call to a SOAP function can cause PHP exceptions or return a + SoapFault object if exceptions was disabled. + To check if the function call failed catch the SoapFault exceptions or + check the result with is_soap_fault. + + + + &reftitle.returnvalues; + + SOAP functions may return one or several values. In the first case it will + return just the value of output parameter, in the second it will return + the associative array with named output parameters. + + + + &reftitle.examples; + + + SoapClient->__call() Examples + +SomeFunction($a, $b, $c); + +$client->__call("SomeFunction", array($a, $b, $c)); +$client->__call("SomeFunction", array($a, $b, $c), NULL, + new SoapHeader(), $output_headers); + + +$client = new SoapClient(null, array('location' => "http://localhost/soap.php", + 'uri' => "http://test-uri/")); +$client->SomeFunction($a, $b, $c); +$client->__call("SomeFunction", array($a, $b, $c)); +$client->__call("SomeFunction", array($a, $b, $c), + array('soapaction' => 'some_action', + 'uri' => 'some_uri')); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + is_soap_fault + + + + + + diff --git a/reference/soap/functions/soap-soapclient-construct.xml b/reference/soap/functions/soap-soapclient-construct.xml new file mode 100644 index 0000000000..8d0feed231 --- /dev/null +++ b/reference/soap/functions/soap-soapclient-construct.xml @@ -0,0 +1,127 @@ + + + + + SoapClient->__construct() + + SoapClient constructor + + + + &reftitle.description; + + SoapClient + + __construct + mixedwsdl + arrayoptions + + + + This constructor allows creating SoapClient objects + in WSDL or non-WSDL mode. + + + + &reftitle.parameters; + + + + wsdl + + + URI of the WSDL file or &null; if working in + non-WSDL mode. + + + + + options + + + An array of option. If working in WSDL mode, this parameter is optional. + If working in non-WSDL mode, you must set the location + and uri options, where location is + a URL to request and uri is a target namespace of the + SOAP service. + + + The style and use options only work in + non-WSDL mode. In WSDL mode, they comes from the WSDL file. + + + The soap_version option specifies whether to use SOAP + 1.1, or SOAP 1.2 client. + + + For HTTP authentication, you may use the login and + password options. For making a HTTP connection through + a proxy server, use the options proxy_host, + proxy_port, proxy_login + and proxy_password. + + + + + + + + &reftitle.examples; + + + SoapClient examples + + SOAP_1_2)); + +$client = new SoapClient("some.wsdl", array('login' => "some_name", + 'password' => "some_password")); + +$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", + 'proxy_port' => 8080)); + +$client = new SoapClient("some.wsdl", array('proxy_host' => "localhost", + 'proxy_port' => 8080, + 'proxy_login' => "some_name", + 'proxy_password' => "some_password")); + +$client = new SoapClient(null, array('location' => "http://localhost/soap.php", + 'uri' => "http://test-uri/")); + +$client = new SoapClient(null, array('location' => "http://localhost/soap.php", + 'uri' => "http://test-uri/", + 'style' => SOAP_DOCUMENT, + 'use' => SOAP_LITERAL)); + +?> +]]> + + + + + + + diff --git a/reference/soap/functions/soap-soapclient-getfunctions.xml b/reference/soap/functions/soap-soapclient-getfunctions.xml new file mode 100644 index 0000000000..bfac580730 --- /dev/null +++ b/reference/soap/functions/soap-soapclient-getfunctions.xml @@ -0,0 +1,80 @@ + + + + + SoapClient->__getFunctions() + + Returns list of SOAP functions + + + + &reftitle.description; + + SoapClient + + array + __getFunctions + + + + + Returns the list of SOAP functions. + + + + This function works only in WSDL mode. + + + + + &reftitle.returnvalues; + + The list of SOAP functions. + + + + &reftitle.examples; + + + SoapClient->__getFunctions() example + +__getFunctions()); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + diff --git a/reference/soap/functions/soap-soapclient-getlastrequest.xml b/reference/soap/functions/soap-soapclient-getlastrequest.xml new file mode 100644 index 0000000000..884b6b42d4 --- /dev/null +++ b/reference/soap/functions/soap-soapclient-getlastrequest.xml @@ -0,0 +1,80 @@ + + + + + SoapClient->__getLastRequest() + + Returns last SOAP request + + + + &reftitle.description; + + SoapClient + + string + __getLastRequest + + + + + + This method works only if the SoapClient object + was created with the trace option. + + + + + &reftitle.returnvalues; + + The last SOAP request. + + + + &reftitle.examples; + + + SoapClient->__getLastRequest() example + + 1)); +$result = $client->SomeFunction(); +echo "REQUEST:\n" . $client->__getLastRequest() . "\n"; +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapclient-getlastresponse.xml b/reference/soap/functions/soap-soapclient-getlastresponse.xml new file mode 100644 index 0000000000..bc8ed72099 --- /dev/null +++ b/reference/soap/functions/soap-soapclient-getlastresponse.xml @@ -0,0 +1,80 @@ + + + + + SoapClient->__getLastResponse() + + Returns last SOAP response. + + + + &reftitle.description; + + SoapClient + + string + __getLastResponse + + + + + + This method works only if the SoapClient object + was created with the trace option. + + + + + &reftitle.returnvalues; + + The last SOAP response. + + + + &reftitle.examples; + + + SoapClient->__getLastResponse() example + + 1)); +$result = $client->SomeFunction(); +echo "RESPONSE:\n" . $client->__getLastResponse() . "\n"; +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapclient-gettypes.xml b/reference/soap/functions/soap-soapclient-gettypes.xml new file mode 100644 index 0000000000..a883a5d1f2 --- /dev/null +++ b/reference/soap/functions/soap-soapclient-gettypes.xml @@ -0,0 +1,75 @@ + + + + + SoapClient->__getTypes() + + Returns list of SOAP types + + + + &reftitle.description; + + SoapClient + + array + __getTypes + + + + + This function works only in WSDL mode. + + + + &reftitle.returnvalues; + + The list of SOAP types. + + + + &reftitle.examples; + + + SoapClient->__getTypes() example + +__getTypes()); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + diff --git a/reference/soap/functions/soap-soapfault-construct.xml b/reference/soap/functions/soap-soapfault-construct.xml new file mode 100644 index 0000000000..0c8d8c419f --- /dev/null +++ b/reference/soap/functions/soap-soapfault-construct.xml @@ -0,0 +1,164 @@ + + + + + SoapFault->__construct() + + SoapFault constructor + + + + &reftitle.description; + + SoapFault + + __construct + stringfaultcode + stringfaultstring + stringfaultactor + mixeddetail + stringfaultname + SoapHeaderheaderfault + + + + This class is useful when you would like to send SOAP fault responses from + the PHP handler. faultcode, faultstring, + faultactor and details are + standard elements of SOAP Fault; + + + + &reftitle.parameters; + + + + faultcode + + + The error code of the SoapFault. + + + + + faultstring + + + The error message of the SoapFault. + + + + + faultactor + + + A string identifying the actor that caused the error. + + + + + detail + + + + + + + faultname + + + Can be used to select the proper fault encoding from WSDL. + + + + + headerfault + + + Can be used during SOAP header handling to report an error in the + response header. + + + + + + + + &reftitle.examples; + + + Some examples + + "http://test-uri/")); +$server->addFunction("test"); +$server->handle(); +?> +]]> + + + + + It is possible to use PHP exception mechanism to throw SOAP Fault. + + + + Some examples + + "http://test-uri/")); +$server->addFunction("test"); +$server->handle(); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + is_soap_fault + + + + + + diff --git a/reference/soap/functions/soap-soapheader-construct.xml b/reference/soap/functions/soap-soapheader-construct.xml new file mode 100644 index 0000000000..559c144e11 --- /dev/null +++ b/reference/soap/functions/soap-soapheader-construct.xml @@ -0,0 +1,128 @@ + + + + + SoapHeader->__construct() + + SoapHeader constructor + + + + &reftitle.description; + + SoapHeader + + __construct + stringnamespace + stringname + mixeddata + boolmustUnderstand + mixedactor + + + + Constructs a new SoapHeader object. + + + + &reftitle.parameters; + + + + namespace + + + The namespace of the SOAP header element. + + + + + name + + + The name of the SOAP header element. + + + + + data + + + A SOAP header's content. It can be a PHP value or a + SoapVar object. + + + + + mustUnderstand + + + Value of the mustUnderstand attribute of the SOAP + header element. + + + + + actor + + + Value of the actor attribute of the SOAP header + element. + + + + + + + + &reftitle.examples; + + + Some examples + + "http://localhost/soap.php", + 'uri' => "http://test-uri/")); +$client->__call("echoVoid", null, null, + new SoapHeader('http://soapinterop.org/echoheader/', + 'echoMeStringRequest', + 'hello world')); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapparam-construct.xml b/reference/soap/functions/soap-soapparam-construct.xml new file mode 100644 index 0000000000..013b2a1525 --- /dev/null +++ b/reference/soap/functions/soap-soapparam-construct.xml @@ -0,0 +1,98 @@ + + + + + SoapParam->__construct() + + SoapParam constructor + + + + &reftitle.description; + + SoapParam + + __construct + mixeddata + stringname + + + + Constructs a new SoapParam object. + + + + &reftitle.parameters; + + + + data + + + The data to pass or return. You can pass this parameter directly as PHP + value, but in this case it will be named as paramN and + the SOAP Service may not understand it. + + + + + name + + + The parameter name. + + + + + + + + &reftitle.examples; + + + Some examples + + "http://localhost/soap.php", + 'uri' => "http://test-uri/")); +$client->SomeFunction(new SoapParam($a, "a"), + new SoapParam($b, "b"), + new SoapParam($c, "c")); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-addfunction.xml b/reference/soap/functions/soap-soapserver-addfunction.xml new file mode 100644 index 0000000000..e164980ab3 --- /dev/null +++ b/reference/soap/functions/soap-soapserver-addfunction.xml @@ -0,0 +1,121 @@ + + + + + SoapServer->addFunction() + + Adds one or several functions those will handle SOAP requests + + + + &reftitle.description; + + SoapServer + + + addFunction + mixedfunctions + + + + Exports one or more functions for remote clients. + + + + &reftitle.parameters; + + + + functions + + + To export one function, pass the function name into this parameter as + a string. + + + To export several functions, pass an array of function names. + + + To export all the functions, pass a special constant SOAP_FUNCTIONS_ALL. + + + + functions must receive all input arguments in the same + order as defined in the WSDL file (They should not receive any output parameters + as arguments) and return one or more values. To return several values they must + return an array with named output parameters. + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.examples; + + + Some examples + +addFunction("echoString"); + +function echoTwoStrings($inputString1, $inputString2) +{ + return array("outputString1" => $inputString1, + "outputString2" => $inputString2); +} +$server->addFunction(array("echoString", "echoTwoStrings")); + +$server->addFunction(SOAP_FUNCTIONS_ALL); + +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-construct.xml b/reference/soap/functions/soap-soapserver-construct.xml new file mode 100644 index 0000000000..d5d0db85d5 --- /dev/null +++ b/reference/soap/functions/soap-soapserver-construct.xml @@ -0,0 +1,95 @@ + + + + + SoapServer->__construct() + + SoapServer constructor + + + + &reftitle.description; + + SoapServer + + __construct + mixedwsdl + arrayoptions + + + + This constructor allows the creation of SoapServer + objects in WSDL or non-WSDL mode. + + + + &reftitle.parameters; + + + + wsdl + + + If you want the WSDL mode, you must set this to the URI of a WSDL file. + In the other case, you must set this to &null; and set the uri + option. + + + + + options + + + Allow setting a default SOAP version (soap_version) + and actor URI (actor). + + + + + + + + &reftitle.examples; + + + Some examples + + SOAP_1_2)); + +$server = new SoapServer("some.wsdl", array('actor' => "http://example.org/ts-tests/C")); + +$server = new SoapServer(null, array('uri' => "http://test-uri/")); + +?> +]]> + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-getfunctions.xml b/reference/soap/functions/soap-soapserver-getfunctions.xml new file mode 100644 index 0000000000..dbfc1ed563 --- /dev/null +++ b/reference/soap/functions/soap-soapserver-getfunctions.xml @@ -0,0 +1,88 @@ + + + + + SoapServer->getFunctions() + + Returns list of defined functions + + + + &reftitle.description; + + SoapServer + + array + getFunctions + + + + + This method returns the list of all functions added by + or + . + + + + &reftitle.returnvalues; + + The list of all functions. + + + + &reftitle.examples; + + + Some examples + + "http://test-uri")); +$server->addFunction(SOAP_FUNCTIONS_ALL); +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $server->handle(); +} else { + echo "This SOAP server can handle following functions: "; + $functions = $server->getFunctions(); + foreach($functions as $func) { + echo $func . "\n"; + } +} +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-handle.xml b/reference/soap/functions/soap-soapserver-handle.xml new file mode 100644 index 0000000000..b195a0df76 --- /dev/null +++ b/reference/soap/functions/soap-soapserver-handle.xml @@ -0,0 +1,98 @@ + + + + + SoapServer->handle() + + Handles a SOAP request + + + + &reftitle.description; + + SoapServer + + + handle + stringsoap_request + + + + Processes a SOAP request, calls necessary functions, and sends a response + back. + + + + &reftitle.parameters; + + + + soap_request + + + The SOAP request. If this argument is omitted, the request is supposed + to be in the $HTTP_RAW_POST_DATA PHP variable. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.examples; + + + Some examples + + "http://test-uri/")); +$server->addFunction("test"); +$server->handle(); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-setclass.xml b/reference/soap/functions/soap-soapserver-setclass.xml new file mode 100644 index 0000000000..cad16b17e3 --- /dev/null +++ b/reference/soap/functions/soap-soapserver-setclass.xml @@ -0,0 +1,119 @@ + + + + + SoapServer->setClass() + + Sets class which will handle SOAP requests + + + + &reftitle.description; + + SoapServer + + + setClass + stringclass_name + mixedargs + + + + Exports all methods from specified class. + + + The object can be made persistent across request for a given PHP session + with the method. + + + + &reftitle.parameters; + + + + class_name + + + The name of the exported class. + + + + + args + + + This optional parameter will be passed to the default class constructor + during object creation. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.examples; + + + Some examples + +setClass("foo"); + +class bar { + function bar($x, $y) + { + } +} +$server->setClass("bar", $arg1, $arg2); + +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + + diff --git a/reference/soap/functions/soap-soapserver-setpersistence.xml b/reference/soap/functions/soap-soapserver-setpersistence.xml new file mode 100644 index 0000000000..70f73e2e6f --- /dev/null +++ b/reference/soap/functions/soap-soapserver-setpersistence.xml @@ -0,0 +1,95 @@ + + + + + SoapServer->setPersistence() + + Sets persistence mode of SoapServer + + + + &reftitle.description; + + SoapServer + + + setPersistence + intmode + + + + This function allows saving data between requests in a PHP session. It works only + with a server that exports functions from a class with + . + + + + &reftitle.parameters; + + + + mode + + + One of the SOAP_PERSISTENCE_XXX constants. + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + &reftitle.examples; + + + Some examples + +setPersistence(SOAP_PERSISTENCE_SESSION); + +$server->setPersistence(SOAP_PERSISTENCE_REQUEST); + +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + diff --git a/reference/soap/functions/soap-soapvar-construct.xml b/reference/soap/functions/soap-soapvar-construct.xml new file mode 100644 index 0000000000..1bd06a3935 --- /dev/null +++ b/reference/soap/functions/soap-soapvar-construct.xml @@ -0,0 +1,140 @@ + + + + + SoapVar->__construct() + + SoapVar constructor + + + + &reftitle.description; + + SoapVar + + __construct + mixeddata + intencoding + stringtype_name + stringtype_namespace + stringnode_name + stringnode_namespace + + + + Constructs a new SoapVar object. + + + + &reftitle.parameters; + + + + data + + + The data to pass or return. + + + + + encoding + + + The encoding ID, one of the XSD_... constants. + + + + + type_name + + + The type name. + + + + + type_namespace + + + The type namespace. + + + + + node_name + + + The XML node name. + + + + + node_namespace + + + The XML node namespace. + + + + + + + + &reftitle.examples; + + + Some examples + +varString = $s; + $this->varInt = $i; + $this->varFloat = $f; + } +} +$client = new SoapClient(null, array('location' => "http://localhost/soap.php", + 'uri' => "http://test-uri/")); +$struct = new SOAPStruct('arg', 34, 325.325); +$soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd"); +$client->echoStruct(new SoapParam($soapstruct, "inputStruct")); +?> +]]> + + + + + + &reftitle.seealso; + + + + + + + + + + diff --git a/reference/soap/reference.xml b/reference/soap/reference.xml index 67aabb1f8b..4f9b97688a 100644 --- a/reference/soap/reference.xml +++ b/reference/soap/reference.xml @@ -1,40 +1,181 @@ - + - - SOAP Functions - SOAP + + SOAP Functions + SOAP - -
+ +
&reftitle.intro; &warn.experimental; - - The SOAP extension can be used to write SOAP Servers and Clients. It supports - subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications. - -
+ + The SOAP extension can be used to write SOAP Servers and Clients. It supports + subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications. + +
-
- &reftitle.required; - - This extension makes use of the GNOME xml - library. Download and install this library. You will need at - least libxml-2.5.4. - -
+
+ &reftitle.required; + + This extension makes use of the GNOME xml + library. Download and install this library. You will need at + least libxml-2.5.4. + +
-
+
&reftitle.install; - - This extension is only available if PHP was configured with - . - + + This extension is only available if PHP was configured with + . + +
+ + &reference.soap.ini; + + +
+ &reftitle.classes; + +
+ <classname>SoapClient</classname> + +
+ &reftitle.constructor; + + + - construct a new SoapClient object + + +
+
+ &reftitle.methods; + + + - Calls a SOAP function + + + - Returns list of SOAP functions + + + - Returns last SOAP request + + + - Returns last SOAP response + + + - Returns list of SOAP types + + +
- &reference.soap.ini; +
+ <classname>SoapFault</classname> + +
+ &reftitle.constructor; + + + - construct a new SoapFault object + + +
+
+ +
+ <classname>SoapHeader</classname> + + SoapHeader is a special low-level class for passing + or returning SOAP headers. It's just a data holder and it does not have any + special methods except its constructor. It can be used in the method to pass a SOAP header or + in a SOAP header handler to return the header in a SOAP response. + +
+ &reftitle.constructor; + + + - construct a new SoapHeader object + + +
+
+ +
+ <classname>SoapParam</classname> + + SoapParam is a special low-level class for naming + parameters and returning values in non-WSDL mode. + It's just a data holder and it does not have any special methods except + its constructor. + +
+ &reftitle.constructor; + + + - construct a new SoapParam object + + +
+
+ +
+ <classname>SoapServer</classname> + +
+ &reftitle.constructor; + + + - construct a new SoapServer object + + +
+
+ &reftitle.methods; + + + - Adds one or several functions those will handle SOAP requests + + + - Returns list of defined functions + + + - Handles a SOAP request + + + - Sets class which will handle SOAP requests + + + - Sets persistence mode of SoapServer + + +
+
+ +
+ <classname>SoapVar</classname> + + SoapVar is a special low-level class for encoding + parameters and returning values in non-WSDL mode. It's + just a data holder and does not have any special methods except the constructor. + It's useful when you want to set the type property in SOAP request or response. + +
+ &reftitle.constructor; + + + - construct a new SoapVar object + + +
+
+ +
+ &reference.soap.constants;