Author |
Message
|
Gaya3 |
Posted: Wed Jan 21, 2009 5:28 am Post subject: Convert String to MRM Format |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
I am having a String variable (contains a Record),
i want to convert this to an MRM (messageSet , TDS) format in Java (JCN)
How can i do this,
String Var = "Gaya3|Gayathri|WORLD" (this is how the record looks like)
how can i achieve this. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
gs |
Posted: Wed Jan 21, 2009 6:01 am Post subject: |
|
|
 Master
Joined: 31 May 2007 Posts: 254 Location: Sweden
|
What aspect of the code do you need help with?
How to do the string split or how to create the message in java? |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed Jan 21, 2009 6:04 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
I just need to do the conversion of String to MRM thats all (as the String contains all data)
the rest of the things are ready. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
gs |
Posted: Wed Jan 21, 2009 6:08 am Post subject: |
|
|
 Master
Joined: 31 May 2007 Posts: 254 Location: Sweden
|
I'm not sure I've quite understood what you're trying to do.
However, it sounds like you want to do this:
Create an output message and define the format & messageset in the message tree.
Split the string into a string array.
For each string in the array, write your string to the corresponding field (from the message set) in the message tree. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 21, 2009 6:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
you want the createElementAsLastChildFromBitstream method on MbElement.
This is the equivalent to CREATE FIELD... PARSE... |
|
Back to top |
|
 |
|