git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@152537 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2004-02-27 13:26:12 +00:00
parent 968d585a21
commit f18579b48a
9 changed files with 39 additions and 38 deletions

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-__call">
<refnamediv>
<refname>SoapClient::__call</refname>
@ -39,17 +39,17 @@
<![CDATA[
<?php
$client = new SoapClient("some.wsdl");
$client->SomeFunction($a,$b,$c);
$client->__call("SomeFunction",array($a,$b,$c));
$client->__call("SomeFunction",array($a,$b,$c), NULL,
$client->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),
$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'));
?>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-__getLastRequest">
<refnamediv>
<refname>SoapClient::__getLastRequest</refname>
@ -22,9 +22,9 @@
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace'=>1));
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction(...);
echo "REQUEST:\n".$client->__getLastRequest()."\n";
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapClient-__getLastResponse">
<refnamediv>
<refname>SoapClient::__getLastResponse</refname>
@ -22,9 +22,9 @@
<programlisting role="php">
<![CDATA[
<?php
$client = SoapClient("some.wsdl", array('trace'=>1));
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction(...);
echo "RESPONSE:\n".$client->__getLastResponse()."\n";
echo "RESPONSE:\n" . $client->__getLastResponse() . "\n";
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapFault-SoapFault">
<refnamediv>
<refname>SoapFault::SoapFault</refname>
@ -57,10 +57,10 @@ $server->addFunction("test");
<?php
function test($x)
{
throw new SoapFault("Server","Some error message");
throw new SoapFault("Server", "Some error message");
}
$server = new SoapServer(null,array('uri'=>"http://test-uri/"));
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapHeader-SoapHeader">
<refnamediv>
<refname>SoapHeader::SoapHeader</refname>
@ -35,9 +35,9 @@
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient(null,array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->__call("echoVoid",NULL,NULL,
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->__call("echoVoid", null, null,
new SoapHeader('http://soapinterop.org/echoheader/',
'echoMeStringRequest',
'hello world'));

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapParam-SoapParam">
<refnamediv>
<refname>SoapParam::SoapParam</refname>
@ -30,9 +30,9 @@
<?php
$client = new SoapClient(null,array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/"));
$client->SomeFunction(new SoapParam($a,"a"),
new SoapParam($b,"b"),
new SoapParam($c,"c"));
$client->SomeFunction(new SoapParam($a, "a"),
new SoapParam($b, "b"),
new SoapParam($c, "c"));
?>
]]>
</programlisting>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapServer-getFunctions">
<refnamediv>
<refname>SoapServer::getFunctions</refname>
@ -23,15 +23,15 @@
<programlisting role="php">
<![CDATA[
<?php
$server = new SoapServer(NULL,array("uri"=>"http://test-uri"));
$server->addFunction(SOAP_FUNCTIONS_ALL );
$server = new SoapServer(NULL, array("uri" => "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 . " ";
echo $func . "\n";
}
}
?>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapServer-handle">
<refnamediv>
<refname>SoapServer::handle</refname>
@ -30,7 +30,7 @@ function test($x)
return $x;
}
$server = new SoapServer(null,array('uri'=>"http://test-uri/"));
$server = new SoapServer(null, array('uri' => "http://test-uri/"));
$server->addFunction("test");
$server->handle();
?>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.SoapVar-SoapVar">
<refnamediv>
<refname>SoapVar::SoapVar</refname>
@ -34,16 +34,17 @@
<![CDATA[
<?php
class SOAPStruct {
function SOAPStruct($s, $i, $f) {
function SOAPStruct($s, $i, $f)
{
$this->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 = 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"));
?>
]]>