Inheritance diagram for soap_client:
Public Member Functions | |
soap_client ($endpoint, $wsdl=false, $proxyhost=false, $proxyport=false, $proxyusername=false, $proxypassword=false, $timeout=0, $response_timeout=30) | |
call ($operation, $params=array(), $namespace='http://tempuri.org', $soapAction='', $headers=false, $rpcParams=null, $style='rpc', $use='encoded') | |
getOperationData ($operation) | |
send ($msg, $soapaction= '', $timeout=0, $response_timeout=30) | |
parseResponse ($headers, $data) | |
setEndpoint ($endpoint) | |
setHeaders ($headers) | |
getHeaders () | |
setHTTPProxy ($proxyhost, $proxyport, $proxyusername= '', $proxypassword= '') | |
setCredentials ($username, $password, $authtype= 'basic', $certRequest=array()) | |
setHTTPEncoding ($enc='gzip, deflate') | |
useHTTPPersistentConnection () | |
getDefaultRpcParams () | |
setDefaultRpcParams ($rpcParams) | |
getProxy () | |
_getProxyClassCode ($r) | |
getProxyClassCode () | |
getHTTPBody ($soapmsg) | |
getHTTPContentType () | |
getHTTPContentTypeCharset () | |
setCookie ($name, $value) | |
getCookies () | |
checkCookies () | |
UpdateCookies ($cookies) | |
soap_client ($endpoint, $wsdl=false, $proxyhost=false, $proxyport=false, $proxyusername=false, $proxypassword=false, $timeout=0, $response_timeout=30) | |
call ($operation, $params=array(), $namespace='http://tempuri.org', $soapAction='', $headers=false, $rpcParams=null, $style='rpc', $use='encoded') | |
getOperationData ($operation) | |
send ($msg, $soapaction= '', $timeout=0, $response_timeout=30) | |
parseResponse ($headers, $data) | |
setEndpoint ($endpoint) | |
setHeaders ($headers) | |
getHeaders () | |
setHTTPProxy ($proxyhost, $proxyport, $proxyusername= '', $proxypassword= '') | |
setCredentials ($username, $password, $authtype= 'basic', $certRequest=array()) | |
setHTTPEncoding ($enc='gzip, deflate') | |
useHTTPPersistentConnection () | |
getDefaultRpcParams () | |
setDefaultRpcParams ($rpcParams) | |
getProxy () | |
_getProxyClassCode ($r) | |
getProxyClassCode () | |
getHTTPBody ($soapmsg) | |
getHTTPContentType () | |
getHTTPContentTypeCharset () | |
setCookie ($name, $value) | |
getCookies () | |
checkCookies () | |
UpdateCookies ($cookies) |
usage:
// instantiate client with server info $soapclient = new soapclient( string path [ ,boolean wsdl] );
// call method, get results echo $soapclient->call( string methodname [ ,array parameters] );
// bye bye client unset($soapclient);
soap_client::soap_client | ( | $ | endpoint, | |
$ | wsdl = false , |
|||
$ | proxyhost = false , |
|||
$ | proxyport = false , |
|||
$ | proxyusername = false , |
|||
$ | proxypassword = false , |
|||
$ | timeout = 0 , |
|||
$ | response_timeout = 30 | |||
) |
constructor
mixed | $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) | |
bool | $wsdl optional, set to true if using WSDL | |
int | $portName optional portName in WSDL document | |
string | $proxyhost | |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword | |
integer | $timeout set the connection timeout | |
integer | $response_timeout set the response timeout public |
soap_client::call | ( | $ | operation, | |
$ | params = array() , |
|||
$ | namespace = 'http://tempuri.org' , |
|||
$ | soapAction = '' , |
|||
$ | headers = false , |
|||
$ | rpcParams = null , |
|||
$ | style = 'rpc' , |
|||
$ | use = 'encoded' | |||
) |
calls method, returns PHP native type
string | $method SOAP server URL or path | |
mixed | $params An array, associative or simple, of the parameters for the method call, or a string that is the XML for the call. For rpc style, this call will wrap the XML in a tag named after the method, as well as the SOAP Envelope and Body. For document style, this will only wrap with the Envelope and Body. IMPORTANT: when using an array with document style, in which case there is really one parameter, the root of the fragment used in the call, which encloses what programmers normally think of parameters. A parameter array *must* include the wrapper. | |
string | $namespace optional method namespace (WSDL can override) | |
string | $soapAction optional SOAPAction value (WSDL can override) | |
mixed | $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers | |
boolean | $rpcParams optional (no longer used) | |
string | $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) | |
string | $use optional (encoded|literal) the use when serializing parameters (WSDL can override) |
soap_client::getOperationData | ( | $ | operation | ) |
get available data pertaining to an operation
string | $operation operation name |
soap_client::send | ( | $ | msg, | |
$ | soapaction = '' , |
|||
$ | timeout = 0 , |
|||
$ | response_timeout = 30 | |||
) |
send the SOAP message
Note: if the operation has multiple return values the return value of this method will be an array of those values.
string | $msg a SOAPx4 soapmsg object | |
string | $soapaction SOAPAction value | |
integer | $timeout set connection timeout in seconds | |
integer | $response_timeout set response timeout in seconds |
soap_client::parseResponse | ( | $ | headers, | |
$ | data | |||
) |
processes SOAP message returned from server
array | $headers The HTTP headers | |
string | $data unprocessed response data from server |
soap_client::setEndpoint | ( | $ | endpoint | ) |
sets the SOAP endpoint, which can override WSDL
$endpoint | string The endpoint URL to use, or empty string or false to prevent override public |
soap_client::setHeaders | ( | $ | headers | ) |
set the SOAP headers
$headers | mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers public |
soap_client::getHeaders | ( | ) |
get the SOAP response headers (namespace resolution incomplete)
soap_client::setHTTPProxy | ( | $ | proxyhost, | |
$ | proxyport, | |||
$ | proxyusername = '' , |
|||
$ | proxypassword = '' | |||
) |
set proxy info here
string | $proxyhost | |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword public |
soap_client::setCredentials | ( | $ | username, | |
$ | password, | |||
$ | authtype = 'basic' , |
|||
$ | certRequest = array() | |||
) |
if authenticating, set user credentials here
string | $username | |
string | $password | |
string | $authtype (basic|digest|certificate) | |
array | $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) public |
soap_client::setHTTPEncoding | ( | $ | enc = 'gzip , |
|
deflate' | ||||
) |
use HTTP encoding
string | $enc public |
soap_client::useHTTPPersistentConnection | ( | ) |
use HTTP persistent connections if possible
public
soap_client::getDefaultRpcParams | ( | ) |
gets the default RPC parameter setting. If true, default is that call params are like RPC even for document style. Each call() can override this value.
This is no longer used.
soap_client::setDefaultRpcParams | ( | $ | rpcParams | ) |
sets the default RPC parameter setting. If true, default is that call params are like RPC even for document style Each call() can override this value.
This is no longer used.
boolean | $rpcParams public |
soap_client::getProxy | ( | ) |
dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl
soap_client::_getProxyClassCode | ( | $ | r | ) |
dynamically creates proxy class code
soap_client::getProxyClassCode | ( | ) |
dynamically creates proxy class code
soap_client::getHTTPBody | ( | $ | soapmsg | ) |
gets the HTTP body for the current request.
string | $soapmsg The SOAP payload |
soap_client::getHTTPContentType | ( | ) |
gets the HTTP content type for the current request.
Note: getHTTPBody must be called before this.
soap_client::getHTTPContentTypeCharset | ( | ) |
gets the HTTP content type charset for the current request. returns false for non-text content types.
Note: getHTTPBody must be called before this.
soap_client::setCookie | ( | $ | name, | |
$ | value | |||
) |
adds a new Cookie into $this->cookies array
string | $name Cookie Name | |
string | $value Cookie Value |
soap_client::getCookies | ( | ) |
gets all Cookies
soap_client::checkCookies | ( | ) |
checks all Cookies and delete those which are expired
soap_client::UpdateCookies | ( | $ | cookies | ) |
updates the current cookies with a new set
array | $cookies new cookies with which to update current ones |
soap_client::soap_client | ( | $ | endpoint, | |
$ | wsdl = false , |
|||
$ | proxyhost = false , |
|||
$ | proxyport = false , |
|||
$ | proxyusername = false , |
|||
$ | proxypassword = false , |
|||
$ | timeout = 0 , |
|||
$ | response_timeout = 30 | |||
) |
constructor
mixed | $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) | |
bool | $wsdl optional, set to true if using WSDL | |
int | $portName optional portName in WSDL document | |
string | $proxyhost | |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword | |
integer | $timeout set the connection timeout | |
integer | $response_timeout set the response timeout public |
soap_client::call | ( | $ | operation, | |
$ | params = array() , |
|||
$ | namespace = 'http://tempuri.org' , |
|||
$ | soapAction = '' , |
|||
$ | headers = false , |
|||
$ | rpcParams = null , |
|||
$ | style = 'rpc' , |
|||
$ | use = 'encoded' | |||
) |
calls method, returns PHP native type
string | $method SOAP server URL or path | |
mixed | $params An array, associative or simple, of the parameters for the method call, or a string that is the XML for the call. For rpc style, this call will wrap the XML in a tag named after the method, as well as the SOAP Envelope and Body. For document style, this will only wrap with the Envelope and Body. IMPORTANT: when using an array with document style, in which case there is really one parameter, the root of the fragment used in the call, which encloses what programmers normally think of parameters. A parameter array *must* include the wrapper. | |
string | $namespace optional method namespace (WSDL can override) | |
string | $soapAction optional SOAPAction value (WSDL can override) | |
mixed | $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers | |
boolean | $rpcParams optional (no longer used) | |
string | $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) | |
string | $use optional (encoded|literal) the use when serializing parameters (WSDL can override) |
soap_client::getOperationData | ( | $ | operation | ) |
get available data pertaining to an operation
string | $operation operation name |
soap_client::send | ( | $ | msg, | |
$ | soapaction = '' , |
|||
$ | timeout = 0 , |
|||
$ | response_timeout = 30 | |||
) |
send the SOAP message
Note: if the operation has multiple return values the return value of this method will be an array of those values.
string | $msg a SOAPx4 soapmsg object | |
string | $soapaction SOAPAction value | |
integer | $timeout set connection timeout in seconds | |
integer | $response_timeout set response timeout in seconds |
soap_client::parseResponse | ( | $ | headers, | |
$ | data | |||
) |
processes SOAP message returned from server
array | $headers The HTTP headers | |
string | $data unprocessed response data from server |
soap_client::setEndpoint | ( | $ | endpoint | ) |
sets the SOAP endpoint, which can override WSDL
$endpoint | string The endpoint URL to use, or empty string or false to prevent override public |
soap_client::setHeaders | ( | $ | headers | ) |
set the SOAP headers
$headers | mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers public |
soap_client::getHeaders | ( | ) |
get the SOAP response headers (namespace resolution incomplete)
soap_client::setHTTPProxy | ( | $ | proxyhost, | |
$ | proxyport, | |||
$ | proxyusername = '' , |
|||
$ | proxypassword = '' | |||
) |
set proxy info here
string | $proxyhost | |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword public |
soap_client::setCredentials | ( | $ | username, | |
$ | password, | |||
$ | authtype = 'basic' , |
|||
$ | certRequest = array() | |||
) |
if authenticating, set user credentials here
string | $username | |
string | $password | |
string | $authtype (basic|digest|certificate) | |
array | $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) public |
soap_client::setHTTPEncoding | ( | $ | enc = 'gzip , |
|
deflate' | ||||
) |
use HTTP encoding
string | $enc public |
soap_client::useHTTPPersistentConnection | ( | ) |
use HTTP persistent connections if possible
public
soap_client::getDefaultRpcParams | ( | ) |
gets the default RPC parameter setting. If true, default is that call params are like RPC even for document style. Each call() can override this value.
This is no longer used.
soap_client::setDefaultRpcParams | ( | $ | rpcParams | ) |
sets the default RPC parameter setting. If true, default is that call params are like RPC even for document style Each call() can override this value.
This is no longer used.
boolean | $rpcParams public |
soap_client::getProxy | ( | ) |
dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl
soap_client::_getProxyClassCode | ( | $ | r | ) |
dynamically creates proxy class code
soap_client::getProxyClassCode | ( | ) |
dynamically creates proxy class code
soap_client::getHTTPBody | ( | $ | soapmsg | ) |
gets the HTTP body for the current request.
string | $soapmsg The SOAP payload |
soap_client::getHTTPContentType | ( | ) |
gets the HTTP content type for the current request.
Note: getHTTPBody must be called before this.
soap_client::getHTTPContentTypeCharset | ( | ) |
gets the HTTP content type charset for the current request. returns false for non-text content types.
Note: getHTTPBody must be called before this.
soap_client::setCookie | ( | $ | name, | |
$ | value | |||
) |
adds a new Cookie into $this->cookies array
string | $name Cookie Name | |
string | $value Cookie Value |
soap_client::getCookies | ( | ) |
gets all Cookies
soap_client::checkCookies | ( | ) |
checks all Cookies and delete those which are expired
soap_client::UpdateCookies | ( | $ | cookies | ) |
updates the current cookies with a new set
array | $cookies new cookies with which to update current ones |