Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Client Class Reference

Public Member Functions

 __construct ($wsdl=null, $options=null)
 #@-
 
 setWSDL ($wsdl)
 Set wsdl.
 
 getWSDL ()
 Get wsdl.
 
 setOptions ($options)
 Set Options.
 
 getOptions ()
 Return array of options suitable for using with SoapClient constructor.
 
 setSoapVersion ($version)
 Set SOAP version.
 
 getSoapVersion ()
 Get SOAP version.
 
 setClassmap (array $classmap)
 Set classmap.
 
 getClassmap ()
 Retrieve classmap.
 
 setTypemap (array $typeMap)
 Set typemap with xml to php type mappings with appropriate validation.
 
 getTypemap ()
 Retrieve typemap.
 
 setEncoding ($encoding)
 Set encoding.
 
 getEncoding ()
 Get encoding.
 
 validateUrn ($urn)
 Check for valid URN.
 
 setUri ($uri)
 Set URI.
 
 getUri ()
 Retrieve URI.
 
 setLocation ($location)
 Set Location.
 
 getLocation ()
 Retrieve URI.
 
 setStyle ($style)
 Set request style.
 
 getStyle ()
 Get request style.
 
 setEncodingMethod ($use)
 Set message encoding method.
 
 getEncodingMethod ()
 Get message encoding method.
 
 setHttpLogin ($login)
 Set HTTP login.
 
 getHttpLogin ()
 Retrieve HTTP Login.
 
 setHttpPassword ($password)
 Set HTTP password.
 
 getHttpPassword ()
 Retrieve HTTP Password.
 
 setProxyHost ($proxyHost)
 Set proxy host.
 
 getProxyHost ()
 Retrieve proxy host.
 
 setProxyPort ($proxyPort)
 Set proxy port.
 
 getProxyPort ()
 Retrieve proxy port.
 
 setProxyLogin ($proxyLogin)
 Set proxy login.
 
 getProxyLogin ()
 Retrieve proxy login.
 
 setProxyPassword ($proxyPassword)
 Set proxy password.
 
 setHttpsCertificate ($localCert)
 Set HTTPS client certificate path.
 
 getHttpsCertificate ()
 Get HTTPS client certificate path.
 
 setHttpsCertPassphrase ($passphrase)
 Set HTTPS client certificate passphrase.
 
 getHttpsCertPassphrase ()
 Get HTTPS client certificate passphrase.
 
 setCompressionOptions ($compressionOptions)
 Set compression options.
 
 getCompressionOptions ()
 Get Compression options.
 
 getProxyPassword ()
 Retrieve proxy password.
 
 setStreamContext ($context)
 Set Stream Context.
 
 getStreamContext ()
 Get Stream Context.
 
 setSoapFeatures ($feature)
 Set the SOAP Feature options.
 
 getSoapFeatures ()
 Return current SOAP Features options.
 
 setWSDLCache ($caching)
 Set the SOAP WSDL Caching Options.
 
 getWSDLCache ()
 Get current SOAP WSDL Caching option.
 
 setUserAgent ($userAgent)
 Set the string to use in User-Agent header.
 
 getUserAgent ()
 Get current string to use in User-Agent header.
 
 getLastRequest ()
 Retrieve request XML.
 
 getLastResponse ()
 Get response XML.
 
 getLastRequestHeaders ()
 Retrieve request headers.
 
 getLastResponseHeaders ()
 Retrieve response headers (as string)
 
 getLastMethod ()
 Retrieve last invoked method.
 
 _doRequest (Client\Common $client, $request, $location, $action, $version, $oneWay=null)
 Do request proxy method.
 
 addSoapInputHeader (SoapHeader $header, $permanent=false)
 Add SOAP input header.
 
 resetSoapInputHeaders ()
 Reset SOAP input headers.
 
 getLastSoapOutputHeaderObjects ()
 Get last SOAP output headers.
 
 __call ($name, $arguments)
 Perform a SOAP call.
 
 call ($method, $params=[])
 Send an RPC request to the service for a specific method.
 
 getFunctions ()
 Return a list of available functions.
 
 getTypes ()
 Return a list of SOAP types.
 
 setSoapClient (SoapClient $soapClient)
 Set SoapClient object.
 
 getSoapClient ()
 Get SoapClient object.
 
 setCookie ($cookieName, $cookieValue=null)
 Set cookie.
 
 getKeepAlive ()
 
 setKeepAlive ($keepAlive)
 
 getSslMethod ()
 
 setSslMethod ($sslMethod)
 

Protected Member Functions

 initSoapClientObject ()
 Initialize SOAP Client object.
 
 _preProcessArguments ($arguments)
 Perform arguments pre-processing.
 
 _preProcessResult ($result)
 Perform result pre-processing.
 

Protected Attributes

 $classmap = null
 
 $encoding = 'UTF-8'
 
 $faultExceptions = []
 
 $lastMethod = ''
 
 $permanentSoapInputHeaders = []
 
 $soapClient
 
 $soapInputHeaders = []
 
 $soapOutputHeaders = []
 
 $soapVersion = SOAP_1_2
 
 $typemap = null
 
 $wsdl = null
 
 $keepAlive
 
 $sslMethod
 
 $connectionTimeout = null
 
 $localCert = null
 
 $location = null
 
 $login = null
 
 $passphrase = null
 
 $password = null
 
 $proxyHost = null
 
 $proxyLogin = null
 
 $proxyPassword = null
 
 $proxyPort = null
 
 $streamContext = null
 
 $style = null
 
 $uri = null
 
 $use = null
 
 $userAgent = null
 
 $cacheWsdl = null
 
 $compression = null
 
 $features = null
 

Constructor & Destructor Documentation

__construct (   $wsdl = null,
  $options = null 
)

#@-

Parameters
string$wsdl
array | Traversable$options
Exceptions
Exception\ExtensionNotLoadedException

Member Function Documentation

__call (   $name,
  $arguments 
)

Perform a SOAP call.

Parameters
string$name
array$arguments
Returns
mixed
_doRequest ( Client\Common  $client,
  $request,
  $location,
  $action,
  $version,
  $oneWay = null 
)

Do request proxy method.

May be overridden in subclasses

Parameters
Client\Common$client
string$request
string$location
string$action
int$version
int$oneWay
Returns
mixed
_preProcessArguments (   $arguments)
protected

Perform arguments pre-processing.

My be overridden in descendant classes

Parameters
array$arguments
Returns
array
_preProcessResult (   $result)
protected

Perform result pre-processing.

My be overridden in descendant classes

Parameters
array$result
Returns
array
addSoapInputHeader ( SoapHeader  $header,
  $permanent = false 
)

Add SOAP input header.

Parameters
SoapHeader$header
bool$permanent
Returns
self
call (   $method,
  $params = [] 
)

Send an RPC request to the service for a specific method.

Parameters
string$methodName of the method we want to call.
array$paramsList of parameters for the method.
Returns
mixed Returned results.

Implements Client.

getClassmap ( )

Retrieve classmap.

Returns
mixed
getCompressionOptions ( )

Get Compression options.

Returns
int
getEncoding ( )

Get encoding.

Returns
string
getEncodingMethod ( )

Get message encoding method.

Returns
int
getFunctions ( )

Return a list of available functions.

Returns
array
Exceptions
Exception\UnexpectedValueException
getHttpLogin ( )

Retrieve HTTP Login.

Returns
string
getHttpPassword ( )

Retrieve HTTP Password.

Returns
string
getHttpsCertificate ( )

Get HTTPS client certificate path.

Returns
string
getHttpsCertPassphrase ( )

Get HTTPS client certificate passphrase.

Returns
string
getKeepAlive ( )
Returns
boolean
getLastMethod ( )

Retrieve last invoked method.

Returns
string
getLastRequest ( )

Retrieve request XML.

Returns
string
getLastRequestHeaders ( )

Retrieve request headers.

Returns
string
getLastResponse ( )

Get response XML.

Returns
string
getLastResponseHeaders ( )

Retrieve response headers (as string)

Returns
string
getLastSoapOutputHeaderObjects ( )

Get last SOAP output headers.

Returns
array
getLocation ( )

Retrieve URI.

Returns
string
getOptions ( )

Return array of options suitable for using with SoapClient constructor.

Returns
array
getProxyHost ( )

Retrieve proxy host.

Returns
string
getProxyLogin ( )

Retrieve proxy login.

Returns
string
getProxyPassword ( )

Retrieve proxy password.

Returns
string
getProxyPort ( )

Retrieve proxy port.

Returns
int
getSoapClient ( )

Get SoapClient object.

Returns
SoapClient
getSoapFeatures ( )

Return current SOAP Features options.

Returns
int
getSoapVersion ( )

Get SOAP version.

Returns
int
getSslMethod ( )
Returns
int
getStreamContext ( )

Get Stream Context.

Returns
resource
getStyle ( )

Get request style.

Returns
int
getTypemap ( )

Retrieve typemap.

Returns
array
getTypes ( )

Return a list of SOAP types.

Returns
array
Exceptions
Exception\UnexpectedValueException
getUri ( )

Retrieve URI.

Returns
string
getUserAgent ( )

Get current string to use in User-Agent header.

Returns
string|null
getWSDL ( )

Get wsdl.

Returns
string
getWSDLCache ( )

Get current SOAP WSDL Caching option.

Returns
int
initSoapClientObject ( )
protected

Initialize SOAP Client object.

Exceptions
Exception\ExceptionInterface
resetSoapInputHeaders ( )

Reset SOAP input headers.

Returns
self
setClassmap ( array  $classmap)

Set classmap.

Parameters
array$classmap
Returns
self
Exceptions
Exception\InvalidArgumentExceptionfor any invalid class in the class map
setCompressionOptions (   $compressionOptions)

Set compression options.

Parameters
int | null$compressionOptions
Returns
self
setCookie (   $cookieName,
  $cookieValue = null 
)

Set cookie.

Parameters
string$cookieName
string$cookieValue
Returns
self
setEncoding (   $encoding)

Set encoding.

Parameters
string$encoding
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid encoding argument
setEncodingMethod (   $use)

Set message encoding method.

Parameters
int$useOne of the SOAP_ENCODED or SOAP_LITERAL constants
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid message encoding method argument
setHttpLogin (   $login)

Set HTTP login.

Parameters
string$login
Returns
self
setHttpPassword (   $password)

Set HTTP password.

Parameters
string$password
Returns
self
setHttpsCertificate (   $localCert)

Set HTTPS client certificate path.

Parameters
string$localCertlocal certificate path
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid local certificate path argument
setHttpsCertPassphrase (   $passphrase)

Set HTTPS client certificate passphrase.

Parameters
string$passphrase
Returns
self
setKeepAlive (   $keepAlive)
Parameters
boolean$keepAlive
Returns
self
setLocation (   $location)

Set Location.

URI in Web Service the target namespace

Parameters
string$location
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid uri argument
setOptions (   $options)

Set Options.

Allows setting options as an associative array of option => value pairs.

Parameters
array | Traversable$options
Returns
self
Exceptions
Exception\InvalidArgumentException
setProxyHost (   $proxyHost)

Set proxy host.

Parameters
string$proxyHost
Returns
self
setProxyLogin (   $proxyLogin)

Set proxy login.

Parameters
string$proxyLogin
Returns
self
setProxyPassword (   $proxyPassword)

Set proxy password.

Parameters
string$proxyPassword
Returns
self
setProxyPort (   $proxyPort)

Set proxy port.

Parameters
int$proxyPort
Returns
self
setSoapClient ( SoapClient  $soapClient)

Set SoapClient object.

Parameters
SoapClient$soapClient
Returns
self
setSoapFeatures (   $feature)

Set the SOAP Feature options.

Parameters
string | int$feature
Returns
self
setSoapVersion (   $version)

Set SOAP version.

Parameters
int$versionOne of the SOAP_1_1 or SOAP_1_2 constants
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid soap version argument
setSslMethod (   $sslMethod)
Parameters
int$sslMethod
Returns
self
setStreamContext (   $context)

Set Stream Context.

Parameters
resource$context
Returns
self
Exceptions
Exception\InvalidArgumentException
setStyle (   $style)

Set request style.

Parameters
int$styleOne of the SOAP_RPC or SOAP_DOCUMENT constants
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid style argument
setTypemap ( array  $typeMap)

Set typemap with xml to php type mappings with appropriate validation.

Parameters
array$typeMap
Returns
self
Exceptions
Exception\InvalidArgumentException
setUri (   $uri)

Set URI.

URI in Web Service the target namespace

Parameters
string$uri
Returns
self
Exceptions
Exception\InvalidArgumentExceptionwith invalid uri argument
setUserAgent (   $userAgent)

Set the string to use in User-Agent header.

Parameters
string | null$userAgent
Returns
self
setWSDL (   $wsdl)

Set wsdl.

Parameters
string$wsdl
Returns
self
setWSDLCache (   $caching)

Set the SOAP WSDL Caching Options.

Parameters
string | int | bool | null$caching
Returns
self
validateUrn (   $urn)

Check for valid URN.

Parameters
string$urn
Returns
bool
Exceptions
Exception\InvalidArgumentExceptionon invalid URN

Member Data Documentation

$cacheWsdl = null
protected
$classmap = null
protected
$compression = null
protected
$connectionTimeout = null
protected
$encoding = 'UTF-8'
protected
$faultExceptions = []
protected
$features = null
protected
$keepAlive
protected
$lastMethod = ''
protected
$localCert = null
protected
$location = null
protected
$login = null
protected
$passphrase = null
protected
$password = null
protected
$permanentSoapInputHeaders = []
protected
$proxyHost = null
protected
$proxyLogin = null
protected
$proxyPassword = null
protected
$proxyPort = null
protected
$soapClient
protected
$soapInputHeaders = []
protected
$soapOutputHeaders = []
protected
$soapVersion = SOAP_1_2
protected
$sslMethod
protected
$streamContext = null
protected
$style = null
protected
$typemap = null
protected
$uri = null
protected
$use = null
protected
$userAgent = null
protected
$wsdl = null
protected