Understanding requirements for customizing the composite response

The product provides two response constructors, one for application tcrm and the other for DWLAdminService; see Request and Response Framework. These constructors append every single response in the composite XML response and put them under a root tag.

These two constructors extend the AbstractCompositeResponseConstructor class. If you want to customize your own response constructor, you should create your constructor by extending the AbstractCompositeResponseConstructor class. You may consider customizing your own response constructor if you want to use a different root tag for the individual response or the composite response, or if you want to validate the composite response against another XSD or schema.

The AbstractCompositeResponseConstructor class contains several abstract methods that you need to override:
  • setApplicationName() – Calls the setApplicationName(String) method to override the application name of the individual response.
  • setTxnResponseRoot() – Calls the setTxnResponseRoot(String) method to override the root tag of the individual response.
  • modifyXMLHeader(XMLHeader) – Calls the setter methods of the XMLHeader argument to override attribute (such as the root tag, XSD or schema) of the XMLHeader argument. The XMLHeader object provides callback methods for the AbstractCompositeResponseConstructor class to call when constructing the composite response.

To use your customized constructor, follow the instructions in Composite XML transactions to set the CompositeConstructor key in the context when submitting the composite request.