|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
simple java compute node |
« View previous topic :: View next topic » |
Author |
Message
|
spider |
Posted: Wed Nov 08, 2006 11:01 pm Post subject: simple java compute node |
|
|
Novice
Joined: 19 Feb 2006 Posts: 23
|
Hi,
I'm kinda new to java compute.
Am trying to use a simple java compute where an xml string need to be passed as output from the java compute node.
I tried with the following code, but it does not return any output.
public class TMP_MF_JavaCompute extends MbJavaComputeNode {
public void evaluate(MbMessageAssembly assembly) throws MbException {
MbOutputTerminal out = getOutputTerminal("out");
MbMessage message = assembly.getMessage();
MbMessage outMessage = new MbMessage();
MbMessageAssembly outAssembly = new MbMessageAssembly (assembly, outMessage);
try
{
MbElement root = outMessage.getRootElement();
MbElement mqmd = root.createElementAsFirstChild("test");
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Format", "XML");
}
catch (Exception e)
{e.printStackTrace();}
out.propagate(outAssembly);
}
}
Plss tell me wat kind of modification i need to do to send out a string.
Thanks in advance... |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 09, 2006 3:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read the manual, look at the samples, copy the message headers, etc...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
spider |
Posted: Thu Nov 09, 2006 5:24 am Post subject: |
|
|
Novice
Joined: 19 Feb 2006 Posts: 23
|
May i atleast know which manual to refer for this???????
As i said, am new to this... |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 09, 2006 5:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
|
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
|
|
|
|