\Aculab\WebServicesWrapperOutboundServiceWebService

Outbound Service Web Service.

Summary

Methods
Properties
Constants
__construct()
getInstanceStatus()
cancelInstance()
getApplicationStatus()
setWebServicesServer()
setCryptoMethod()
setProxy()
startInstance()
startRestInstance()
No public properties found
VERSION
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

VERSION

VERSION

The wrapper version.

The wrapper version number.

Methods

__construct()

__construct(string  $cloud_id, string  $username, string  $servicename, string  $service_password) 

Create a OutboundServiceWebService object.

This object can be used to start outbound services and check their status.

Parameters

string $cloud_id

The cloud identifier, such as "1-2-0".

string $username

The cloud account username.

string $servicename

The outbound service name.

string $service_password

The outbound service password.

getInstanceStatus()

getInstanceStatus(array|string  $invocation_reference_ids) : array

Get the status of one or more outbound instances.

Parameters

array|string $invocation_reference_ids

A single invocation reference ID object or an array of invocation reference IDs.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

array —

Returns an array of OutboundInstanceStatus objects, keyed by invocation reference ID.

cancelInstance()

cancelInstance(array|string  $invocation_reference_ids) : array

Cancel one or more outbound servce invocations.

Parameters

array|string $invocation_reference_ids

A invocation reference ID object or an array of invocation reference IDs.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

array —

Returns an array, keyed by invocation reference ID, containing the cancellation status, The cancellation status is one of "success", "failed", or "unknown".

"success" indicates that the service invocation was successfully cancelled before it was run. "failed" indicates that the service was recognised but could not be cancelled. "unknown" indicates that the service was not recognised, either because it was incorrect or has expired.

getApplicationStatus()

getApplicationStatus(string  $application_instance_id) : \Aculab\WebServicesWrapper\ApplicationStatus|null

Get the status of an application.

Gets the application status as an ApplicationStatus object.

The application instance id in known to UAS applications and is included in the instance info object of HTTP requests to REST applications.

For outbound applications, the application instance id can also be obtained from \Aculab\WebServicesWrapper\OutboundInstanceStatus::getApplicationInstanceId()

Parameters

string $application_instance_id

The application instance id of the instance to check.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

\Aculab\WebServicesWrapper\ApplicationStatus|null —

Returns an ApplicationStatus object if the status is available.

setWebServicesServer()

setWebServicesServer(string  $wsserver) 

Set the web services server address.

This allows the web service requests to be directed to a specific server. The default is https://ws-<cloud_id>.aculabcloud.net

Parameters

string $wsserver

The base URL of the web services server.

setCryptoMethod()

setCryptoMethod(integer  $method) 

Set the crypto method used when connectiing to the web services server.

This allows a specific crypto method to be used when connecting to the web service server. The values should be one of the STREAM_CRYPTO_METHOD_TLSv1_N_CLIENT constants. The default is STREAM_CRYPTO_METHOD_ANY_CLIENT.

Parameters

integer $method

The crypto method to use.

setProxy()

setProxy(string  $proxy, boolean  $request_fulluri) 

Configures the proxy server to use when making Web Service requests.

Parameters

string $proxy

URI specifying address of proxy server. (e.g. tcp://proxy.example.com:5100).

boolean $request_fulluri

When set to TRUE, the entire URI will be used when constructing the request. While this is a non-standard request format, some proxy servers require it.

startInstance()

startInstance(string  $outbound_parameters, integer  $count, string  $delimiter = null) : array

Start one or more UAS application instances.

Parameters

string $outbound_parameters

The outbound parameter string to be sent to the outbound application(s).

Specifying a number of strings, each separated by the $delimiter character, invokes an instance for each one (and count is ignored).

Must contain only seven bit ASCII, excluding ^, | and the control characters.

integer $count

The number of instances to start.

By default a single instance is invoked. Specifying more than one (Production and Premium accounts only) invokes multiple instances.

string $delimiter

The delimiting character when multiple outbound parameter strings are defined.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

array —

Returns an array of unique service invocation reference ID strings.

startRestInstance()

startRestInstance(mixed  $instance_config) : array

Start one or more REST application instances.

Parameters

mixed $instance_config

A single OutboundRestInstanceConfiguration object or an array of such objects.

If an array is provided, then a new instance of the service is started for each object provided.

Throws

\Aculab\WebServicesWrapper\WebServiceException

Returns

array —

Returns an array of unique service invocation reference ID strings.