Author |
Message
|
Cho Chul-hwan |
Posted: Tue May 14, 2013 12:58 am Post subject: message convert |
|
|
Newbie
Joined: 05 May 2013 Posts: 8
|
hi~
i have some questions.
about making a message
i get message from other message and i convert the message and
to send the other system.
when i get message, the structure like this,
1|1223|2323|
this message delimited.
and i have to convert like this,
a=1&b=1223&c=2323 (key=value)
is it possible using message set?
if it isn't possible do i have to implement ESQL code?
please help me.^^ |
|
Back to top |
|
 |
zpat |
Posted: Tue May 14, 2013 1:16 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
This is more correctly termed as message "transformation".
I woul imagine you would use a TDS message set (or DFDL in WMB v to parse the message.
However because you are inserting values not in the original message - this would have to use ESQL code.
At least that's my guess, but I am not an expert in this respect.
It would also be possible to use ESQL by itself but no doubt this would be considered the wrong way to use WMB. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 14, 2013 2:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Message broker ( Ibm Integration Bus ) is very good at exactly this task. And zpat is correct - ESQL would be the wrong solution.
Your input message and output message contain the same logical information. Only the physical format is different.
All you need to do is
a) Parse the input message using model A
b) [optional step] Add, remove or move fields in the message tree
c) Write the message tree using model B
If you are using v7, then you will use the MRM parser with two TDS physical formats ( one to parse and one to write ).
If you are using WMB v8 or later then you will use DFDL to parse and write the messages, and you will need two different models ( or two message definitions in the same xsd if you prefer ).
Give it a try, and post again if you get stuck with the modelling of your physical formats. |
|
Back to top |
|
 |
Cho Chul-hwan |
Posted: Tue May 14, 2013 4:41 am Post subject: Thank you |
|
|
Newbie
Joined: 05 May 2013 Posts: 8
|
Thank you for your answer.^^
i have to implement this week and i understand your answer in logically....
but i don't have any idea, how do i implement it
if it's possible let me know where can i get a example code or sample code..
please help me..... |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 14, 2013 5:24 am Post subject: Re: Thank you |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Cho Chul-hwan wrote: |
i have to implement this week and i understand your answer in logically....
but i don't have any idea, how do i implement it |
If you've been given a task this simple and you don't know how to do it I would think you've been given insufficient training / mentoring in the product. The error would seem to have been compounded by then giving you a week to learn and complete the task, forcing you to turn to a bunch of strangers on the Internet. You should push back.
Cho Chul-hwan wrote: |
if it's possible let me know where can i get a example code or sample code.. |
There are samples provided with the product, but what you're asking is "how do I use the product" and we're not a training resource. Even if we were, "how do I build a message set" is not a question that can be answered in a forum post. Message sets are (IIRC) most of the 2nd day of the IBM training course.
Cho Chul-hwan wrote: |
please help me..... |
You need career assistance, not technical help. As a bare minimum, a more reasonable manager.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 14, 2013 5:38 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
@Cho Chul-hwan: The proper way to do this is to create a DFDL model for your input and output data ( assuming that you are on version 8 ). That is not difficult - the WMB toolkit provides a test/debug facility so that you can get the models correct before you deploy.
The input format can be created for you by a DFDL wizard.
- Create a library
- Select 'New/Message Model/Record-oriented text
- De-select the check boxes for 'The first record is a header' and 'The last record is a trailer'
- Delete the 'Record initiator'
- Set the number of fields
- Click Finish
Then you should be able to use the test/debug facilities to refine that model until it can parse your input format. When it's correct, deploy the library as part of your application and use the DFDL domain to parse your input message.
I recommend that you put a Trace node immediately after the input node ( set the Pattern property to ${Root} ) to show you what the message tree looks like.
And when that's done, you should have a pretty good idea about how to model the output data format.
Give it a try, post again if you can't get it working. |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 14, 2013 6:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
@Cho Chul-hwan: The proper way to do this is to create a DFDL model for your input and output data ( assuming that you are on version 8 ). That is not difficult - the WMB toolkit provides a test/debug facility so that you can get the models correct before you deploy. |
Note that @Cho Chul-hwan indicated in an earlier post he was on WMBv7.
Having said that, the only change is that there's no DFDL & no DFDL wizard in v7. So (if you're using v7) create a message set not a library and proceed from there. Especially:
kimbert wrote: |
Then you should be able to use the test/debug facilities to refine that model until it can parse your input format. When it's correct, deploy the library as part of your application and use the DFDL domain to parse your input message.
I recommend that you put a Trace node immediately after the input node ( set the Pattern property to ${Root} ) to show you what the message tree looks like.
And when that's done, you should have a pretty good idea about how to model the output data format. |
This advice is good advice no matter what version is in use. As is pushing back on timescales and training. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue May 14, 2013 6:15 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
There might be a TDS example in the infocenter that can be imported into the toolkit.
But this is not really something to tackle without training. Why would an IT professional agree to perform a role that they were not ready to do? |
|
Back to top |
|
 |
|