eZ Publish  [trunk]
eZSOAPClient Class Reference

eZSOAPClient is a class which can be used as a SOAP client More...

List of all members.

Public Member Functions

 eZSOAPClient ($server, $path= '/', $port=80, $useSSL=null)
 login ()
 password ()
 send ($request)
 setLogin ($login)
 setPassword ($password)
 setTimeout ($timeout)

Public Attributes

 $Login
 HTTP login for HTTP authentification.
 $Password
 HTTP password for HTTP authentification.
 $Path
 The path to the SOAP server.
 $Port
 The port of the server to communicate with.
 $Server
 The name or IP of the server to communicate with.
 $Timeout = 0
 How long to wait for the call.

Private Attributes

 $UseSSL

Detailed Description

eZSOAPClient is a class which can be used as a SOAP client

eZSOAPClient handles communication with a SOAP server.

// create a new client
$client = new eZSOAPClient( "nextgen.bf.dvh1.ez.no", "/sdk/ezsoap/view/server" );

$namespace = "http://soapinterop.org/";

// create the SOAP request object
$request = new eZSOAPRequest( "addNumbers", "http://calkulator.com/simplecalculator" );

// add parameters to the request
$request->addParameter( "valueA", 42 );
$request->addParameter( "valueB", 17 );

// send the request to the server and fetch the response
$response = $client->send( $request );

// check if the server returned a fault, if not print out the result
if ( $response->isFault() )
{
    print( "SOAP fault: " . $response->faultCode(). " - " . $response->faultString() . "" );
}
else
    print( "Returned SOAP value was: \"" . $response->value() . "\"" );
See also:
eZSOAPServer eZSOAPRequest eZSOAPResponse

Definition at line 48 of file ezsoapclient.php.


Member Function Documentation

eZSOAPClient::eZSOAPClient ( server,
path = '/',
port = 80,
useSSL = null 
)

Creates a new SOAP client.

Parameters:
$serverThe remote server to connect to
$pathThe path to the SOAP service on the remote server
$portThe port to connect to, 80 by default. You can use 'ssl' as well to specify that you want to use port 443 over SSL, but omit the last parameter $useSSL of this method then or set it to true. When $port equals 443, SSL will also be used if $useSSL is omitted or set to true.
$useSSLIf we need to connect to the remote server with (https://) or without (http://) SSL

Definition at line 60 of file ezsoapclient.php.

Returns the login, used for HTTP authentification

Definition at line 234 of file ezsoapclient.php.

Referenced by send().

Returns the password, used for HTTP authentification

Definition at line 250 of file ezsoapclient.php.

Referenced by send().

eZSOAPClient::send ( request)

Sends a SOAP message and returns the response object.

Definition at line 99 of file ezsoapclient.php.

eZSOAPClient::setLogin ( login)

Sets the HTTP login

Definition at line 226 of file ezsoapclient.php.

eZSOAPClient::setPassword ( password)

Sets the HTTP password

Definition at line 242 of file ezsoapclient.php.

eZSOAPClient::setTimeout ( timeout)

Set timeout value

Parameters:
timeoutvalue in seconds. Set to 0 for unlimited.

Definition at line 218 of file ezsoapclient.php.


Member Data Documentation

eZSOAPClient::$Login

HTTP login for HTTP authentification.

Definition at line 264 of file ezsoapclient.php.

eZSOAPClient::$Password

HTTP password for HTTP authentification.

Definition at line 266 of file ezsoapclient.php.

eZSOAPClient::$Path

The path to the SOAP server.

Definition at line 258 of file ezsoapclient.php.

eZSOAPClient::$Port

The port of the server to communicate with.

Definition at line 260 of file ezsoapclient.php.

eZSOAPClient::$Server

The name or IP of the server to communicate with.

Definition at line 256 of file ezsoapclient.php.

eZSOAPClient::$Timeout = 0

How long to wait for the call.

Definition at line 262 of file ezsoapclient.php.

eZSOAPClient::$UseSSL [private]

Definition at line 267 of file ezsoapclient.php.


The documentation for this class was generated from the following file: