Author |
Message
|
remocx |
Posted: Wed May 15, 2013 10:07 am Post subject: please help newbie |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
Hi I need to fetch the value under EDIdata. Could you please help m how to do it. I am new to WMB and finding a little tough.
The message tree is as follows:
XMLNS/ResponseMessage/ResponseHeader/EDIdata
Under EDIdata the element name is empty but value is present. I want to fetch the value. Please help me how to fetch the value. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed May 15, 2013 10:13 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
What version of the product are you on? You should be using XMLNSC not XMLNS.
Have you attended the required training (9 days) ? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
remocx |
Posted: Wed May 15, 2013 10:20 am Post subject: |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
Hi, I am on version 7.0.1. No, I havent attended any formal training on WMB. Am trying to learn by going through pdf tutorials. Please help me on how to parse and fetch the data. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed May 15, 2013 10:22 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Did you try out the samples that come with WMB toolkit?
WMB version numbers have 4 digits. You might need to apply fix packs. You should at least be on 7.0.0.5.
To inquire the value of a field, inside a Compute node, you can type:
Code: |
SET xyz_variable = InputRoot.XMLNSC.ResponseMessage.ResponseHeader.EDIdata;
|
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
remocx |
Posted: Wed May 15, 2013 10:27 am Post subject: |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
Hi,
Sorry, I am on 7.0.0.1.
I am trying to accomplish the task using java compute node.
The message tree is as below:
Message
XMLNS
ResponseMessage
ResponseHeader
EDIdata
(name:empty) Value is present
Under EDIdata, the name is empty but the value is present. I want the fetch this value using JCN. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed May 15, 2013 10:29 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
remocx |
Posted: Wed May 15, 2013 10:32 am Post subject: |
|
|
Novice
Joined: 21 Dec 2012 Posts: 13
|
Have mailed you the screenshot of the message tree. Will go thru the link u sent me. but, since I'e started with JCN, i dont want to leave this undone. could u please help me with it?
Sir Thanksalot  |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed May 15, 2013 10:36 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Are you offering some compensation with that request?
Thats why IBM offers training. So you can learn about Message Broker and ask questions of instructors.
Did you import and run the sample? If you want something free, the sample is free and comes with the toolkit. You probably better update your toolkit to 7.0.0.5 though.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac30330_.htm
Quote: |
Accessing elements in a message tree from a JavaCompute node
Access the contents of a message, for reading or writing, using the structure and arrangement of the elements in the tree that the parser creates from the input bit stream. |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
nukalas2010 |
Posted: Wed May 15, 2013 10:53 pm Post subject: |
|
|
 Master
Joined: 04 Oct 2010 Posts: 220 Location: Somewhere in the World....
|
Remo,
In JCN you can try something like below..
Code: |
MbElement oReqRoot = i n A s s e m b l y.getMessage().getRootElement();
MbElement value = oReqRoot.getFirstElementByPath("/XMLNS/ResponseMessage/ResponseHeader/EDIdata"); |
|
|
Back to top |
|
 |
goffinf |
Posted: Wed May 15, 2013 11:37 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
I appreciate that you are new to this forum, but in future please do not give your post a subject title 'please help newbie'.
The title is useful for others when they are searching the forum looking for previous problems that are similar to the one that they have.
So, if you want to get help here, make the effort to give your post a meaningful title that states clearly the nature of the question that you are asking.
Thanks and good luck
Fraser. |
|
Back to top |
|
 |
|