eZSOAPClient Class Reference
[SOAP communication library]

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.
 $UseSSL

Detailed Description

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

eZSOAPClient handles communication with a SOAP server.

// include client classes
include_once( "lib/ezsoap/classes/ezsoapclient.php" );
include_once( "lib/ezsoap/classes/ezsoaprequest.php" );

// 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 78 of file ezsoapclient.php.


Member Function Documentation

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

Creates a new SOAP client.

Parameters:
$server The remote server to connect to
$path The path to the SOAP service on the remote server
$port The 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.
$useSSL If we need to connect to the remote server with (https://) or without (http://) SSL

Definition at line 89 of file ezsoapclient.php.

eZSOAPClient::login (  ) 

Returns the login, used for HTTP authentification

Definition at line 258 of file ezsoapclient.php.

Referenced by send().

eZSOAPClient::password (  ) 

Returns the password, used for HTTP authentification

Definition at line 274 of file ezsoapclient.php.

Referenced by send().

eZSOAPClient::send ( request  ) 

Sends a SOAP message and returns the response object.

Definition at line 123 of file ezsoapclient.php.

eZSOAPClient::setLogin ( login  ) 

Sets the HTTP login

Definition at line 250 of file ezsoapclient.php.

eZSOAPClient::setPassword ( password  ) 

Sets the HTTP password

Definition at line 266 of file ezsoapclient.php.

eZSOAPClient::setTimeout ( timeout  ) 

Set timeout value

Parameters:
timeout value in seconds. Set to 0 for unlimited.

Definition at line 242 of file ezsoapclient.php.


Member Data Documentation

eZSOAPClient::$Login

HTTP login for HTTP authentification.

Definition at line 288 of file ezsoapclient.php.

eZSOAPClient::$Password

HTTP password for HTTP authentification.

Definition at line 290 of file ezsoapclient.php.

eZSOAPClient::$Path

The path to the SOAP server.

Definition at line 282 of file ezsoapclient.php.

eZSOAPClient::$Port

The port of the server to communicate with.

Definition at line 284 of file ezsoapclient.php.

eZSOAPClient::$Server

The name or IP of the server to communicate with.

Definition at line 280 of file ezsoapclient.php.

eZSOAPClient::$Timeout = 0

How long to wait for the call.

Definition at line 286 of file ezsoapclient.php.

eZSOAPClient::$UseSSL

Definition at line 291 of file ezsoapclient.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 12 07:10:30 2010 for eZ publish by  doxygen 1.6.3