eZ Publish  [4.2]
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.

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

eZSOAPClient::login ( )

Returns the login, used for HTTP authentification

Definition at line 261 of file ezsoapclient.php.

Referenced by send().

eZSOAPClient::password ( )

Returns the password, used for HTTP authentification

Definition at line 277 of file ezsoapclient.php.

Referenced by send().

eZSOAPClient::send ( request)

Sends a SOAP message and returns the response object.

Definition at line 126 of file ezsoapclient.php.

eZSOAPClient::setLogin ( login)

Sets the HTTP login

Definition at line 253 of file ezsoapclient.php.

eZSOAPClient::setPassword ( password)

Sets the HTTP password

Definition at line 269 of file ezsoapclient.php.

eZSOAPClient::setTimeout ( timeout)

Set timeout value

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

Definition at line 245 of file ezsoapclient.php.


Member Data Documentation

eZSOAPClient::$Login

HTTP login for HTTP authentification.

Definition at line 291 of file ezsoapclient.php.

eZSOAPClient::$Password

HTTP password for HTTP authentification.

Definition at line 293 of file ezsoapclient.php.

eZSOAPClient::$Path

The path to the SOAP server.

Definition at line 285 of file ezsoapclient.php.

eZSOAPClient::$Port

The port of the server to communicate with.

Definition at line 287 of file ezsoapclient.php.

eZSOAPClient::$Server

The name or IP of the server to communicate with.

Definition at line 283 of file ezsoapclient.php.

eZSOAPClient::$Timeout = 0

How long to wait for the call.

Definition at line 289 of file ezsoapclient.php.

eZSOAPClient::$UseSSL [private]

Definition at line 294 of file ezsoapclient.php.


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