Cloud Application Integration (On-Premises) : Administering CloudStreams : CloudStreams Configuration Options : The Administration Options : Setting the Service Fault Configuration Options
Setting the Service Fault Configuration Options
Note:  
The service fault configuration options are intended only for virtual services, and not for Connector Virtual Services. For information about error handling for Connector Virtual Services, see The "Error Sequence" Step (Connector Virtual Service, SOAP) or The "Error Sequence" Step (Connector Virtual Service, REST).
You can use these options to configure global error responses for all virtual services.
Alternatively, you can configure error responses for virtual services individually, in the services' "Error Sequence" step, as described in The "Error Sequence" Step (Connector Virtual Service, SOAP) or The "Error Sequence" Step (Connector Virtual Service, REST).
The precedence of the error messaging instructions is as follows:
*If you create an "Error Sequence" step for a virtual service, the error messaging step takes precedence over any settings on the Service Fault Configuration page.
*If you do not create an "Error Sequence" step for a virtual service, the settings on the Service Fault Configuration page take precedence.
To set the CloudStreams > Administration > Service Fault Configuration options
1. In Integration Server Administrator, select Solutions > CloudStreams > Administration > Service Fault Configuration.
2. Click Edit, complete the following fields and click Save.
Option
Description
Default Fault Response
When you select this option, CloudStreams returns the following fault response to the consuming application:
CloudStreams encountered an error:$ERROR_MESSAGE while executing operation:$OPERATION service:$SERVICE at time:$TIME on date:$DATE. The client ip was:$CLIENT_IP. The current user:$USER. The consumer application:$CONSUMER_APPLICATION".
This fault response is returned in both of the following cases:
*When a fault is returned by the native service provider.
In this case, the $ERROR_MESSAGE variable in the fault response will contain the message produced by the provider's exception that caused the error. This is equivalent to the getMessage call on the Java Exception. This maps to the faultString element for SOAP 1.1 or the Reason element for SOAP 1.2 catch. For REST service calls, the message is returned inside an </Exception> tag. CloudStreams discards the native service provider's fault and does not return this content to the web service caller since it could be considered a security issue, especially if the native provider is returning a stack trace with its response.
*When a fault is returned by internal CloudStreams exceptions (policy violation errors, cloud connection errors and cloud connector service errors).
In this case, the $ERROR_MESSAGE variable will contain the error message generated by CloudStreams.
The default fault response contains predefined fault handler variables ($ERROR_MESSAGE, $OPERATION, etc.), which are described in The Fault Handler Variables.
You can customize the default fault response using the following substitution variables, where CloudStreams replaces the variable reference with the real content at run time:
*The predefined context variables listed in The Predefined Context Variables.
*Custom context variables that you declare using the CloudStreams API (see The API for Context Variables).
Note:  
If you want to reference a custom context variable that you have already defined in a context-based routing rule (as opposed to one you have declared using CloudStreams API for context variables), then you must add the prefix $mx to the variable name in order to reference the variable. For example, if you defined the variable TAXID, you would reference it as $mx:TAXID.
Send Native Provider Fault
When you select this option, CloudStreams sends the native service provider's fault content, if available. CloudStreams will send whatever content it received from the native service provider.
If you select this option, the Default Fault Response is ignored when a fault is returned by the native service provider. (Faults returned by internal CloudStreams exceptions will still be handled by the Default Fault Response option.)
Note:  
Unlike with SOAP specifications, there is no agreed upon format to suggest an error condition for REST services (that is, there is no element nested in a </soap:Fault> element nested in a </soap:Body>). CloudStreams assumes that REST services will follow HTTP conventions and return responses with return codes in the 200-299 range when service calls are successful. This is the only way CloudStreams can determine that a native provider's response should be interpreted as a failure.
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback