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 » reterieving data from Oracle database

Post new topic  Reply to topic
 reterieving data from Oracle database « View previous topic :: View next topic » 
Author Message
CHAN
PostPosted: Tue Mar 01, 2011 7:53 pm    Post subject: reterieving data from Oracle database Reply with quote

Novice

Joined: 22 Mar 2010
Posts: 12

HI,
I have a sample flow
MQInput---->Compute node --> MQOutputNode

MQ version: 6.0
MB version; 6.0.0.9
Oracle : 11g

I am selecting soap messages stored in database column(data type LONG) and assigning it to output root.All i have to do is whatever soap messages i get in the result set ,i need to propagate it output root one by one to do some transformation before making SOAP call.

Code used in Compute Node:

declare resultset row;
delcare I integer 1;
SET Outputroot.MQMD.structid =MQMD_STRUC_ID;
SET OutputRoot.MQM.Msgtype = MQMD_DATAGRAM;
SET OutputRoot.MQM.Codedd = 1208;
SET Outputroot.properties.DOMAIN = 'XMLNSC';
## data type of MESSAGE_CONTENT column is LONG in ORACLE 11g database.

SET Environment.Resultset.Rows[] = (SELECT w.MESSAGE_CONTENT FROM database.ialooging.TABLE AS w WHERE w.STATUS = 'P');
FOR row1 AS ENVIRONMENT.Resultset.Rows[]
SET OutputRoot.XMLNSC = CAST(row1.MESSAGE_CONTENT AS CHAR CCSID 1208);
DECLARE REF to OutputRoot.XMLNSC.Resultset.Rows[];
SET REF.MESSAGE_CONTENT = CAST(row1.MESSAGE_CONTENT AS CHAR CCSID 1208);
SET OutputRoot = InputRoot;
SET outputRoot.XMLNSC = NULL;
Propagate;
I = I+1;
END FOR;

RESULT FALSE;


This is in compute node,
i get the output with "...." between fields in the message.I am not getting exact message that is in database.something like this.

<field1>...</field1>......
<field2>...</field2>....
<filedn>...</fieldn>....

Even i tried with CAST AS BLOB and used RCD node but i get error like (inavlid document type) invalid message body

things to know:
1. Am i using the for loop through array exactly to extract fields(soap messages) from result set and assigning it to output root one by one.If not,correct me.
2. What type of casting do i have to use to retrive data type of LONG exactly same as that in database as my code is assinging "...." to output.

I have been trying this since a while.Its an important and needs to be completed early.Please let me know the best way of doing it.Thanks for your help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 01, 2011 9:13 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Why is the database splitting up the SOAP message and not storing it as a CLOB?

Why are you parsing it row by row and not as one?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Mar 02, 2011 2:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

CAST does not perform a PARSE.
Back to top
View user's profile Send private message
CHAN
PostPosted: Wed Mar 02, 2011 6:32 am    Post subject: Reply with quote

Novice

Joined: 22 Mar 2010
Posts: 12

database is storing correctly only but in the flow i get the response message with "...." between fields.Example:

<"xml version="1.0"?>.<bfg-env:Envelope xmlns="http://www.XXXX....">..<bfg-env:Header>...<bfg-hdr:MessageHeader>....<bfg-hdr:Service>.....<bfg-hdr:ServiceName>......</bfg-hdr:ServiceName>.....<bfgcfg-hdr:MessageType>Response</bfg-hdr:MessageType>....</bfg-hdr:Service>....<bfg-hdr:From>.....<bfg-hdr:PartyId>11-22-3333</bfg-


I am trying to get the actual copy that is being stored in Database.
I am not trying to parse using CAST. As data type is of LONG, i am using CAST to convert it into char.What is the correct way to get it done?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 02, 2011 7:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

CHAN wrote:
I am trying to get the actual copy that is being stored in Database.
I am not trying to parse using CAST. As data type is of LONG, i am using CAST to convert it into char.What is the correct way to get it done?

Code:

SET OutputRoot.XMLNSC = CAST(row1.MESSAGE_CONTENT AS CHAR CCSID 1208);


That doesn't do what you think it does.
Back to top
View user's profile Send private message
CHAN
PostPosted: Wed Mar 02, 2011 9:13 am    Post subject: Reply with quote

Novice

Joined: 22 Mar 2010
Posts: 12

Can u please suggest the way to get it done.Thanks in advance
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 02, 2011 9:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I suggest you search for PARSE.
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 » reterieving data from Oracle database
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.