From 1fd00ff2542058620e5da11af3fab06a19c3ff92 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 22 Oct 2026 18:50:11 +0200 Subject: [PATCH] #79 - Documentation: SOAP call options restored after the call, exceptions of the bundle in the reference pages Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 3 +++ docs/index.md | 7 +++++++ docs/reference/client.md | 8 ++++---- docs/reference/tasks/request_task.md | 2 +- docs/reference/transformers/request_transformer.md | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a06a97..0160d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Latest ------ +### Changes +* [#79](https://github.com/cleverage/soap-process-bundle/issues/79) Documentation: SOAP call options restored after the call, exceptions of the bundle in the reference pages. + v3.3.1 ------ diff --git a/docs/index.md b/docs/index.md index 7981c3c..fc9bd6d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -69,3 +69,10 @@ No option can be configured under `cleverage_soap_process`: a key there is ignor - [Call a SOAP service and export the response](cookbooks/soap_call_and_export.md) - [Enrich a CSV file with a SOAP service](cookbooks/soap_enrich_csv.md) + +## Exceptions + +The exceptions named without namespace in the reference pages (e.g. `UnexpectedValueException`) are the ones of the +bundle, `CleverAge\SoapProcessBundle\Exception\*`: they extend the SPL exceptions of the same name and implement +`CleverAge\ProcessBundle\Exception\ProcessExceptionInterface`, so that all the errors of the process bundles can be +caught at once. diff --git a/docs/reference/client.md b/docs/reference/client.md index 396d51e..cb146b0 100644 --- a/docs/reference/client.md +++ b/docs/reference/client.md @@ -34,8 +34,8 @@ Arguments of the `CleverAge\SoapProcessBundle\Client\Client` base class: Setters ------- -These values can be set with `calls` in the service definition. Note that the [RequestTask](tasks/request_task.md) -overwrites the SOAP call options and headers each time it is executed (see Notes). +These values can be set with `calls` in the service definition. The [RequestTask](tasks/request_task.md) uses its own +SOAP call options and headers for its call only: the values of the client are restored afterwards (see Notes). | Method | Description | |-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -128,11 +128,11 @@ Notes * The clients are registered by the `code` attribute of their tag, in a service locator built when the container is compiled: a client is only instantiated when a task or the transformer uses it (an error in a client that a process does not use does not make it fail). The `code` must be the one returned by `getCode()` (an - `\UnexpectedValueException` is thrown otherwise when it is fetched). Two clients with the same code, or an empty + `UnexpectedValueException` is thrown otherwise when it is fetched). Two clients with the same code, or an empty code, fail the container compilation. * **Deprecated**: a service tagged without `code` is still registered, with `ClientRegistry::addClient()`, instantiated with the registry (deprecated since 3.3, the `code` will be required in 4.0). Two clients with the same code then - throw an `\UnexpectedValueException` giving the ids of both services + throw an `UnexpectedValueException` giving the ids of both services (`Client is already defined by service "", cannot register service ""`) when the registry is instantiated, i.e. when the first SOAP task or transformer service is built. * Using a code that is not registered throws a `CleverAge\SoapProcessBundle\Exception\MissingClientException` diff --git a/docs/reference/tasks/request_task.md b/docs/reference/tasks/request_task.md index 91fb918..4eb309a 100644 --- a/docs/reference/tasks/request_task.md +++ b/docs/reference/tasks/request_task.md @@ -16,7 +16,7 @@ Accepted inputs [SoapClient::__soapCall()](https://www.php.net/manual/en/soapclient.soapcall.php). An empty input (`null`, `[]`, …) calls the method without argument. -Any other non-empty input (e.g. a `string`) throws an `\UnexpectedValueException`. +Any other non-empty input (e.g. a `string`) throws an `UnexpectedValueException`. For a document/literal service, the arguments of the method are usually wrapped in a single array, e.g. `{ parameters: { sCountryISOCode: FR } }` (in WSDL mode, the keys of the first level are ignored, only the order diff --git a/docs/reference/transformers/request_transformer.md b/docs/reference/transformers/request_transformer.md index 0807c28..abd9ec0 100644 --- a/docs/reference/transformers/request_transformer.md +++ b/docs/reference/transformers/request_transformer.md @@ -16,7 +16,7 @@ Accepted inputs `array`: list of the arguments passed as `$args` to [SoapClient::__soapCall()](https://www.php.net/manual/en/soapclient.soapcall.php) (see the -[RequestTask](../tasks/request_task.md#accepted-inputs)). Any other type throws an `\UnexpectedValueException` +[RequestTask](../tasks/request_task.md#accepted-inputs)). Any other type throws an `UnexpectedValueException` (`Expecting an array of value`). Possible outputs