ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JavaCompute Node Propagate

Post new topic  Reply to topic Goto page Previous  1, 2
 JavaCompute Node Propagate « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Wed Feb 11, 2009 5:57 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

There is a TDS Sample flow provided.
Goto Help->Samples and have a browse....
They are there
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed Feb 11, 2009 6:13 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

smdavies99 wrote:
There is a TDS Sample flow provided.
Goto Help->Samples and have a browse....
They are there


Hi, Thanks for your guidence, but can you please be more specific on this, because i have searched the samples as well and i could not find any TDS samples used in Java Compute Node.

It would be of great help if you can provide some code snippets for reading an TDS message in JavaCompute node. I need to read an PipeDelimited message and send it to a Socket server.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Wed Feb 11, 2009 6:46 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

You need to
- Create a message set
- Add a TDS physical format
- Create a message definition to describe the physical format of your pipe-delimited message. ( hint: you need 'All Elements Delimited' )
- Make sure that the message set is deployed
- Use MbElement.createElementAsLastChildFromBitstream() to create a message tree from the bitstream. Don't forget to specify the CCSID and Encoding.

Alternatively, you could write some Java to scan the text received from via TCP/IP and create the elements yourself using createElementAsLastChild(). If you decide to do it this way, remember that the remainder of your message flow will not get any help from the (non-existent) message set.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 11, 2009 6:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Or you could do all of those steps except the last, and then wire a ResetContentDescriptor node after the JCN.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Feb 11, 2009 7:05 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Try
Help->Samples Gallery->Technology->Message Broker->Message Formats

Then you will see the FIX & SWIFT examples. These use both XML & TDS

It is really not that hard to find
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed Feb 11, 2009 7:53 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

smdavies99 wrote:
Try
Help->Samples Gallery->Technology->Message Broker->Message Formats

Then you will see the FIX & SWIFT examples. These use both XML & TDS

It is really not that hard to find


I tried all those samples and none of them use the JCN. I will again explain my scenario in detail...

MQInput-->Compute1-->JavaCompute-->Compute2-->MQOutput

I get an XML message in MQInput, I create a PipeDelimited message from that XML in Compute1. Now i need to send this PipeDelimited message to TCP Socket server so i use JCN. Now, how do i read this PipeDelimited message inside the JCN in order to send it to TCP server.

Can anyone please help me on this?

Regards,
Kashyap.
Back to top
View user's profile Send private message Send e-mail
MQEnthu
PostPosted: Wed Feb 11, 2009 8:53 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

As I said earlier the above posts will help you to send the construct and send the blob message to compute2 node..

Quote:
how do i read this PipeDelimited message inside the JCN in order to send it to TCP server.


And though you may not find the code snippet for reading TDS message in the link I provided. It is very much similar.

MbMessage inMessage = contact admin.getMessage();

MbElement inRoot = inMessage.getRootElement(); // reference to root of incoming message equivalent to InputRoot in ESQL

MbElement inMRM = inRoot.getLastChild(); // refers to InputRoot.MRM

After this you can use inMRM.getFirstElementByPath(<specify XPATH>) or any other get methods you can traverse through InputRoot and access TDS fields.
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 12, 2009 3:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Now that we understand the problem, then I believe that kash3338 needs the toBitstream() method on MBElement.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JavaCompute Node Propagate
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.