eZPublish  3.8
eZSOAPClient Class Reference

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

Public Member Functions

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

Public Attributes

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

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

Member Function Documentation

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

Creates a new SOAP client.

eZSOAPClient::login ( )

Returns the login, used for HTTP authentification

Referenced by send().

eZSOAPClient::password ( )

Returns the password, used for HTTP authentification

Referenced by send().

eZSOAPClient::send (   $request)

Sends a SOAP message and returns the response object.

eZSOAPClient::setLogin (   $login)

Sets the HTTP login

eZSOAPClient::setPassword (   $password)

Sets the HTTP password

eZSOAPClient::setTimeout (   $timeout)

Set timeout value

Parameters
timeoutvalue in seconds. Set to 0 for unlimited.

Member Data Documentation

eZSOAPClient::$Login

HTTP login for HTTP authentification.

Referenced by login().

eZSOAPClient::$Password

HTTP password for HTTP authentification.

Referenced by password().

eZSOAPClient::$Path

The path to the SOAP server.

Referenced by send().

eZSOAPClient::$Port

The port of the server to communicate with.

eZSOAPClient::$Server

The name or IP of the server to communicate with.

eZSOAPClient::$Timeout = 0

How long to wait for the call.


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