Requirement:
The source system exposes a set of operations in wsdl, which IIB have to transform to the target/provider system’s message format. Hit the provider system, transform the response to source format, and reply to the source system.
The only difference between the source and provider system’s message is the namespace. The message definition for both the systems are same.
Existing Design:
Since the message definition has nested repeating segments, mapper node per operation is used for both request and response nodes.
Problem in existing design:
- Mapper node takes more time to process the messages.
- Since two mapper nodes are used per operation, (one for request and other for response) deploying more number of nodes causes performance issue.
- Instead of mapping mode, if esql is used for transformation, mapping more than 1000 and odd fields in esql for all the operation is time-consuming, and difficult to maintain.
Proposed Solution:
Use esql node for the transformation. Instead of doing transformation on element level, convert the message as blob, replace the source namespace with target namespace and re-parse the message with xmlnsc parser. The above solution addresses all the above problems, and improves the efficiency of the flows.
Code Snippet:
DECLARE inBitStream CHARACTER CAST((ASBITSTREAM(InputRoot.XMLNSC CCSID 1208)) AS CHARACTER CCSID 1208);
SET inBitStream = REPLACE(inBitStream, In_Namespace, Out_Namespace);
CREATE LASTCHILD OF OutputRoot DOMAIN(‘XMLNSC’) PARSE(inBitStream CCSID 1208);
Verdict:
The below screen shot shows there is significant improvement in the flow performance:
Thanks a lot. This has saved me a lot of time.