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 » 1st Message Flow - Can I use mapping with database results?

Post new topic  Reply to topic
 1st Message Flow - Can I use mapping with database results? « View previous topic :: View next topic » 
Author Message
PisgahMan
PostPosted: Fri Aug 10, 2007 6:22 am    Post subject: 1st Message Flow - Can I use mapping with database results? Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

I am a newbie at Message Broker, in fact this is my first message flow. Any help would be greatly appreciated.

This is what I have going on on my local machine
1. XML comes in to input node
2. One element in XML is used as the where clause in an Oracle SQL Statement.

Now what I need to do is take that result set and using some of the Oracle fields along with some hardcoded values,
build a delimited string to send to another application. Currenly I am loading the data into part of the OutPutRoot.XML.
(Compute node)

A few of things I am trying:
1. Use a message map/mapping node after the compute node with the Oracle select.
Can this work to map not the whole message but just the results of the database query?

2. Is there a way in my ESQL code I can 'load' the message into my message/messageset?

3. The toolkit will allow me to connect to my Oracle database with a RDB object.....but this connection in over jdbc.
My broker is set up for ODBC. If I use the mapping tool to set up the mapping with ODBC..will it work the same if I put the ODBC name in the datasource of my mapping node.


By the way, I followed the CSV sample that came with the software and I can get an incoming XML to convert to CSV.
I just need to instead convert the results of my query to delimited string.


Any comments, suggestions are appreciated. Even read the manual and search the site if you tell me what to look for.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 10, 2007 6:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

First thing is, use XMLNS or XMLNSC and not XML domain.

Secondly - what you will do in your flow is construct your Output message, one field at a time. This can be done with Mapping or ESQL or other things.

Mapping nodes can take inputs from Database tables as well as from messages.

The toolkit connection is just in the toolkit, and just to help you build the mapping. You will have to put the ODBC name in as the datasource for it to function when you deploy.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PisgahMan
PostPosted: Fri Aug 10, 2007 6:35 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

jefflowrey, thanks for the quick reply.

That is awesome news regarding JDBC/ODBC. I'll give that a shot. I assume I can somehow pass in a 'WHERE' to that query(?)

What I was doing in ESQL up to now looked like:
SET OutputRoot.XML.SRData[] = PASSTHRU('SELECT A FROM X WHERE Y=?
Back to top
View user's profile Send private message
PisgahMan
PostPosted: Fri Aug 10, 2007 9:14 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

What would the syntax be if you just manually built up the string in ESQL, ...no dataset or mapping at all.....to set the whole output message to the value of your string?

SET OutBody.Message = MyString;

Similar to that but I know that is wrong.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » 1st Message Flow - Can I use mapping with database results?
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.