|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MbElement.toBitstream() returns an empty array |
« View previous topic :: View next topic » |
Author |
Message
|
mlce |
Posted: Wed Jan 10, 2007 6:21 am Post subject: MbElement.toBitstream() returns an empty array |
|
|
Newbie
Joined: 10 Jan 2007 Posts: 4
|
I can't get MbElement.toBitstream() to work properly.
The following code snippet (Java Compute Node) returns en empty array:
Code: |
public class JavaGdsVcomCsCall extends MbJavaComputeNode {
private MbElementUtil util = new MbElementUtil();
public void evaluate(MbMessageAssembly contact admin) throws MbException {
try {
// Get rootElement
MbElement rootElement = contact admin.getMessage().getRootElement();
// Get the data as a bitstream
String requestMessageSet = "EGCJ700002001";
String requestMessageType = "msg_R9I34101";
String requestMessageFormat = "CWF";
byte [] msgAsBytes = rootElement.getLastChild().toBitstream(requestMessageType,requestMessageSet,requestMessageFormat,0,0,0);
|
I have verified that the message sent into the Java Compute Node is of the Set and Type as specified above.
WMB version is 6.0.0.1.
Any clue on what I'm doing wrong?
Regards,
Magnus. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jan 10, 2007 8:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
String requestMessageFormat = "CWF"; |
CWF1? |
|
Back to top |
|
 |
mlce |
Posted: Wed Jan 10, 2007 1:00 pm Post subject: The Physical Format is actually named "CWF" |
|
|
Newbie
Joined: 10 Jan 2007 Posts: 4
|
Thanks for your advice but I have actually named the Physical Format "CWF".
Are there any working examples on calling toBitstream() available?
Starting from something that actually works is maybe the easiest way forward...
Regards,
Magnus. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 11, 2007 1:23 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Have you tried searching for 'toBitstream()' on this forum? |
|
Back to top |
|
 |
mlce |
Posted: Thu Jan 11, 2007 7:03 am Post subject: |
|
|
Newbie
Joined: 10 Jan 2007 Posts: 4
|
Absolutelty, I read all 14 topics carefully
However, I got an suggestion to temporary replace the Java compute node by a MQ Output node to see what happens. The ideas was that if the message is successfully written to the MQ queue then the call to toBitstream() "should" work.
As you probably can imagine the message written to the queue also contained 0 bytes of data.
After finding the problem using the temporary MQ Output node I switched back to the Java Compute node...
...and the call to toBitstream() now works (of course)
So it was all a matter of finding a proper method for isolating the problem.
Thanks anyhow for your suggestions!
Regards,
Magnus. |
|
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
|
|
|
|