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.
AbstractCompositeResponseConstructor
class
contains several abstract methods that you need to override:setApplicationName()
– Calls thesetApplicationName(String)
method to override the application name of the individual response.setTxnResponseRoot()
– Calls thesetTxnResponseRoot(String)
method to override the root tag of the individual response.modifyXMLHeader(XMLHeader)
– Calls the setter methods of theXMLHeader
argument to override attribute (such as the root tag, XSD or schema) of theXMLHeader
argument. TheXMLHeader
object provides callback methods for theAbstractCompositeResponseConstructor
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.