SoapClient
extends SoapClient
in package
Class SoapClient
Tags
Table of Contents
Properties
- $ch : resource|false|CurlHandle
- cURL resource used to make the SOAP request
- $options : array<string|int, mixed>
- Options passed to the client constructor.
- $__last_request : string
- $__last_request_headers : array<string|int, string>
- $__last_response : string|false
- $__last_response_headers : string|false
Methods
- __construct() : mixed
- {@inheritdoc}
- __doRequest() : string|null
- {@inheritdoc}
- __getLastRequestHeaders() : string|null
- {@inheritdoc}
- getResponseCode() : int
- Returns the response code from the last request
- parseResponse() : mixed
- Pareses the response from a successful request.
- buildHeaders() : array<string|int, mixed>
- Builds the headers for the request.
- cleanResponse() : mixed
- Cleans the response body by stripping bad characters if instructed to.
- curlOptions() : array<string|int, mixed>
- Builds an array of curl options for the request
Properties
$ch
cURL resource used to make the SOAP request
protected
resource|false|CurlHandle
$ch
$options
Options passed to the client constructor.
protected
array<string|int, mixed>
$options
$__last_request
private
string
$__last_request
$__last_request_headers
private
array<string|int, string>
$__last_request_headers
$__last_response
private
string|false
$__last_response
$__last_response_headers
private
string|false
$__last_response_headers
Methods
__construct()
{@inheritdoc}
public
__construct(string|null $wsdl[, array<string|int, mixed> $options = [] ]) : mixed
Additional options:
- user (string): The user to authenticate with.
- password (string): The password to use when authenticating the user.
- curlopts (array): Array of options to set on the curl handler when making the request.
- strip_bad_chars (boolean, default true): Whether or not to strip invalid characters from the XML response. This can lead to content being returned differently than it actually is on the host service, but can also prevent the "looks like we got no XML document" SoapFault when the response includes invalid characters.
- warn_on_bad_chars (boolean, default false): Trigger a warning if bad characters are stripped. This has no affect unless strip_bad_chars is true.
Parameters
- $wsdl : string|null
- $options : array<string|int, mixed> = []
__doRequest()
{@inheritdoc}
public
__doRequest(string $request, string $location, string $action, int $version[, bool $oneWay = false ]) : string|null
Parameters
- $request : string
- $location : string
- $action : string
- $version : int
- $oneWay : bool = false
Return values
string|null__getLastRequestHeaders()
{@inheritdoc}
public
__getLastRequestHeaders() : string|null
Return values
string|nullgetResponseCode()
Returns the response code from the last request
public
getResponseCode() : int
Tags
Return values
intparseResponse()
Pareses the response from a successful request.
public
parseResponse(string $response) : mixed
Parameters
- $response : string
-
The response from the cURL request, including headers and body.
buildHeaders()
Builds the headers for the request.
protected
buildHeaders(string $action) : array<string|int, mixed>
Parameters
- $action : string
Return values
array<string|int, mixed>cleanResponse()
Cleans the response body by stripping bad characters if instructed to.
protected
cleanResponse() : mixed
curlOptions()
Builds an array of curl options for the request
protected
curlOptions(string $action, string $request) : array<string|int, mixed>
Parameters
- $action : string
- $request : string