|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
getDOMNode() method of MBElement returns NULL |
« View previous topic :: View next topic » |
Author |
Message
|
arijitdas08 |
Posted: Wed Oct 16, 2013 2:21 pm Post subject: getDOMNode() method of MBElement returns NULL |
|
|
Newbie
Joined: 16 Oct 2013 Posts: 1
|
I have the following code snippet for a java Node:
Code: |
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");
// Get message tree root
MbMessage inMessage = contact admin.getMessage();
MbElement inMsgTreeRoot = inMessage.getRootElement();
// Get environment tree root
MbMessage envr = contact admin.getGlobalEnvironment();
MbElement envrRoot = envr.getRootElement();
// create new empty message
MbMessage outMessage = new MbMessage();
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,
outMessage);
try {
// Get work item
MbElement parserElm = inMsgTreeRoot.getLastChild();
MbElement workItem = parserElm.getFirstChild();
System.out.println( "Rule Input--"+workItem.getDOMNode()); |
NOTE in Assembly without space comes out as contact admin
------------------
SOAP UI Request is as follows:
Code: |
<soapenv:Envelope >
<soapenv:Header/>
<soapenv:Body>
<mes:XferAddRq>
<RqUID>123123123</RqUID>
<FromAcctRef>
<AcctKeys>
<AcctId>3;1;DDA</AcctId>
</AcctKeys>
</FromAcctRef>
<ToAcctRef>
<AcctKeys>
<AcctId>3;11;dda</AcctId>
</AcctKeys>
</ToAcctRef>
<CurAmt>
<Amt>3123</Amt>
<CurCode>
<CurCodeValue>USD</CurCodeValue>
</CurCode>
</CurAmt>
</mes:XferAddRq>
</soapenv:Body>
</soapenv:Envelope> |
----------------------
When we call getFirstChild() method on MBElement, we get the proper value. But the getDOMNode() is always returning NULL.
Please let me know if something is not correct.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 16, 2013 6:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
dogorsy |
Posted: Thu Oct 17, 2013 1:30 am Post subject: Re: getDOMNode() method of MBElement returns NULL |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
arijitdas08 wrote: |
I have the following code snippet for a java Node:
Code: |
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");
// Get message tree root
MbMessage inMessage = contact admin.getMessage();
MbElement inMsgTreeRoot = inMessage.getRootElement();
// Get environment tree root
MbMessage envr = contact admin.getGlobalEnvironment();
MbElement envrRoot = envr.getRootElement();
// create new empty message
MbMessage outMessage = new MbMessage();
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,
outMessage);
try {
// Get work item
MbElement parserElm = inMsgTreeRoot.getLastChild();
MbElement workItem = parserElm.getFirstChild();
System.out.println( "Rule Input--"+workItem.getDOMNode()); |
NOTE in Assembly without space comes out as contact admin
------------------
SOAP UI Request is as follows:
Code: |
<soapenv:Envelope >
<soapenv:Header/>
<soapenv:Body>
<mes:XferAddRq>
<RqUID>123123123</RqUID>
<FromAcctRef>
<AcctKeys>
<AcctId>3;1;DDA</AcctId>
</AcctKeys>
</FromAcctRef>
<ToAcctRef>
<AcctKeys>
<AcctId>3;11;dda</AcctId>
</AcctKeys>
</ToAcctRef>
<CurAmt>
<Amt>3123</Amt>
<CurCode>
<CurCodeValue>USD</CurCodeValue>
</CurCode>
</CurAmt>
</mes:XferAddRq>
</soapenv:Body>
</soapenv:Envelope> |
----------------------
When we call getFirstChild() method on MBElement, we get the proper value. But the getDOMNode() is always returning NULL.
Please let me know if something is not correct.. |
WMB and IIB provide you with a debug facility. If you use it, you probably will find what the problem is, and in the process you will learn a few things.
Debugging the problem yourself not only will give you the satisfaction and sense of achievement, but also it will be quicker than posting a question in the forum. You need to understand that even if people answering your question are well intentioned, sometimes their answer is not the best solution, it is just an opinion. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|