How to generate custom faultcode & faultstring using service agent?

How to generate custom faultcode & faultstring using service agent?

book

Article ID: KB0091148

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Abstract:
==========
How to generate custom faultcode and faultstring using a service agent?

Description:
==========
In TIBCO ActiveMatrix BusinessWorks 5.9, you implement a Web-Service with the "Service" palette and object. In the executed process, you execute "Generate Error" activities to return errors. You would like to populate the SOAP faultcode and faultstring with your own values. It seems BW does not use the activity input message and message code for that. It always replaces them with "SOAP-ENV:Server" and "This is an operation implementation generated fault".

Environment:
==========
TIBCO ActiveMatrix BusinessWorks / All

Symptoms:
==========
Generate Error activity always returns fault messages such as the following:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode xmlns="">SOAP-ENV:Server</faultcode>
            <faultstring xmlns="">This is an operation implementation generated fault</faultstring>
            <faultactor xmlns=""/>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

How to change the faultcode/faultstring to custom values?

Cause:
==========
This could be a BW limitation.

Resolution:
==========
Add one Context Resource and a SetContext before the Generate Error to save the custom values into Context Resource. Go to Advanced SOAP Settings -> Fault Context. Do some mapping here.

Attachments:
==========
Filename: custom fault service.zip .

Issue/Introduction

How to generate custom faultcode & faultstring using service agent?

Attachments

How to generate custom faultcode &amp; faultstring using service agent? get_app