Development

How to Change the Namespace in IIB Using ESQL

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.

 

 

Existing Desing

Problem in existing design:

  1. Mapper node takes more time to process the messages.
  2. Since two mapper nodes are used per operation, (one for request and other for response) deploying more number of nodes causes performance issue.
  3. 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.

New Design

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:

Flow Analyser

About the Author

More from this Author

Thoughts on “How to Change the Namespace in IIB Using ESQL”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up
Categories