Author |
Message
|
manoj5007 |
Posted: Wed Jul 27, 2016 11:16 pm Post subject: Opening a old thread but with new version |
|
|
 Acolyte
Joined: 15 May 2013 Posts: 64
|
Got a flow where we can expect 3 types of input MRM message from source system, so the flow goes as below:
SrcQ ->Set message properties ->Transformation ->OutputQ
Based on a value at a particular point we apply the message set to the message at the second node and further transform the message and process to OutputQ
Now at times the source system sends NUL characters values in a field of length 10, so 10 nul characters are present and we do a direct mapping and form the output xml message.
Question: Now, how do we handle these null characters at ESB so that when we send to output queue, there should be a blank tag or no tag informed instead of the tag being populated with 10 null characters as its value
Thanks in advance. |
|
Back to top |
|
 |
manoj5007 |
Posted: Wed Jul 27, 2016 11:28 pm Post subject: |
|
|
 Acolyte
Joined: 15 May 2013 Posts: 64
|
This is in version 9.0.0.3 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 28, 2016 4:26 am Post subject: Re: Opening a old thread but with new version |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
manoj5007 wrote: |
Now, how do we handle these null characters at ESB so that when we send to output queue, there should be a blank tag or no tag informed instead of the tag being populated with 10 null characters as its value |
Change the mapping accordingly.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
manoj5007 |
Posted: Thu Jul 28, 2016 5:25 pm Post subject: |
|
|
 Acolyte
Joined: 15 May 2013 Posts: 64
|
My question is how do i eliminate the ten null characters at the message set level ??The source system has told they are not able to do the change, i.e. sending some other characters in the place of null characters.
We can expect these characters in other fields too going forward.
Hmmm..Wondering how we achieve this. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 28, 2016 9:58 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Null fill is pretty common when dealing with fixed length data structures.
You can model the MRM parsing to deal with this.
Why not do some experimentation and see what works and what does not? You will learn more by trying things for yourself.
By all means come back with specific questions like, "I tried this and got this."
One useful way is to reverse the model. Create a message tree that looks like what you want to see after parsing and then pass it out through your model and compare it with the input sample that you have.
Learning how to create an element that has no content is very useful. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
timber |
Posted: Fri Jul 29, 2016 4:07 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
My question is how do i eliminate the ten null characters at the message set level? |
This is a well known problem. The answer is
- tell the MRM parser to convert any field that is filled with low-values ( null characters ) into the special value NULL
- In your ESQL, detect the special value NULL and output something that is valid for XML ( a popular option is to set xsi:nil='true'. If you do that then you must also ensure that the XSD declares the element to be nillable using xsi:nillable='true' )
I will leave the first step as an exercise for the reader; just look up 'MRM Null handling' in the Knowledge Center and/or search this forum. |
|
Back to top |
|
 |
|