Configure temporary file retention
All xDI web service deliveries with inputs and outputs saves messages as temporary files. By default, those files are deleted when the web service invocation completes, but not if it ends with errors.
You can configure this behavior globally in xDI Runtime properties, individually per process, and individually with request headers.
Set retention globally
-
Find and open the
engineParameters.xml
runtime configuration file. -
Search for the section labeled Runtime Web Services Parameters.
-
Edit the values of the following three parameters, and uncomment them if needed:
<parameter name="webServiceInputMessageKeep" value="if_error"/>
<parameter name="webServiceOutputMessageKeep" value="if_error"/>
<parameter name="webServiceFaultMessageKeep" value="if_error"/>
The three parameters correspond to input message retention, output message retention, and fault message retention. Possible values for each are:
yes
-
Keep temporary files.
no
-
Delete temporary files after web service invocation.
if_error
-
Delete temporary files after web service invocation except if an error occurs.
Set retention individually, in process
Find the process corresponding to your web service. Open its properties window, and open the Meta-Inf finger tab.
Add the following code block:
<keepInputMessage>yes</keepInputMessage>
<keepOutputMessage>yes</keepOutputMessage>
<keepFaultMessage>yes</keepFaultMessage>
The three nodes correspond to input message retention, output message retention, and fault message retention. Possible values for each are:
yes
-
Keep temporary files.
no
-
Delete temporary files after web service invocation.
if_error
-
Delete temporary files after web service invocation except if an error occurs.
Process-level retention overrides global runtime settings.
Set retention individually, with HTTP headers
When invoking a runtime exposed as a web service, add one or more of the following HTTP headers:
X-keepInputMessage
X-keepOutputMessage
X-keepFaultMessage
The three headers correspond to input message retention, output message retention, and fault message retention. Possible values for each are:
yes
-
Keep temporary files.
no
-
Delete temporary files after web service invocation.
if_error
-
Delete temporary files after web service invocation except if an error occurs.
Header-level retention overrides all other retention settings.