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 » Converting the CLOB Getting from OracleDB to XML in WBIMB

Post new topic  Reply to topic Goto page 1, 2  Next
 Converting the CLOB Getting from OracleDB to XML in WBIMB « View previous topic :: View next topic » 
Author Message
ravi_ishere
PostPosted: Mon Jan 28, 2008 6:04 am    Post subject: Converting the CLOB Getting from OracleDB to XML in WBIMB Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Hi,

Can any one assist on converting the clob returning from stored procedure to xml in ESQL.

Details:

I am returning the CLOB contains the XML elements from OUT. Wheni am attaching it to input xml it is considering it as CHARACTER. How can we convert that CLOB to XML elements using ESQL.

Thanks,
R
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 28, 2008 7:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to read about CREATE FIELD.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Mon Jan 28, 2008 8:52 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

sorry i did'nt understood. Can you explain briefly.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 28, 2008 9:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes.

You need to go read stuff.

The stuff you need to go read is the documentation.

The documentation you need to go read is the documentation about the ESQL statement "CREATE FIELD".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Mon Jan 28, 2008 9:44 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

As per the docs we need to create element by element but not reading as a whole xml from CLOB.

CALL mySP(IN var CHAR, OUT var1 CHARACTER)

this is the stored procedure call and the var1 is CLOB in database. Is it notb possible it as whole xml by looping element by element.

Thanks,
R
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 28, 2008 10:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I really don't understand what you're saying.

You can use the CREATE FIELD statement to turn (by a process called 'parsing') a CHARACTER field that represents an XML document into a logical message tree that represents the XML document.

You can't pass a logical message tree using Character fields.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Mon Jan 28, 2008 5:20 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

i.e casting the CLOB getting from DB as CHARACTER to XML tree structure in Message Broker.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 28, 2008 6:02 pm    Post subject: Reply with quote

Grand High Poobah

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

There is no casting for what you are trying to do.
Lookup CREATE FIELD PARSE in the documentation already!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ravi_ishere
PostPosted: Mon Jan 28, 2008 10:12 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Sorry for the making confusion and thanks alot for helping. excuse me for asking it again.

OUT12 is declared as CHARACTER which is a returned as CHARACTER from DB(in DB it is CLOB)

DECLARE inBitstream BLOB ASBITSTREAM(OUT12, inEncoding, inCCSID);

CREATE FIELD OutputRoot.XMLNS.TestCase.Root DOMAIN('XMLNSC') PARSE(inBitstream , InputProperties.Encoding, InputProperties.CodedCharSetId);

can anyone validate these statements.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 29, 2008 1:27 am    Post subject: Reply with quote

Grand High Poobah

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

So you cast your character to a BLOB! Do you know what CCSID it is in?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Jan 29, 2008 2:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
CREATE FIELD OutputRoot.XMLNS.TestCase.Root DOMAIN('XMLNSC') PARSE(inBitstream , InputProperties.Encoding, InputProperties.CodedCharSetId);
You cannot use DOMAIN('XMLNSC') to create OutputRoot.XMLNS.

Everything you have been told so far is available by pressing the Search button and spending some time ( your time )
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Wed Jan 30, 2008 1:29 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Hi,

Thanks for all for help i am able to convert to xml and added the same to message tree.

Here is the code working for me

Still i have one more query that Is the XML will recognize as XMLNSC message?


DECLARE blobMSG BLOB;

CALL HEADERS ('TEST',blobMSG,ERROR1,ERROR2 );

SET Environment.Variables.TEST12 = blobMSG;

DECLARE inCCSID INT InputProperties.CodedCharSetId;
DECLARE inEncoding INT InputProperties.Encoding;

DECLARE creationPtr REFERENCE TO Environment.Variables.TestCase.Root;
CREATE FIELD creationPtr IDENTITY (XML.ParserRoot)Root;
CREATE LASTCHILD OF creationPtr DOMAIN('XML') PARSE(blobMSG, inEncoding,inCCSID);

SET OutputRoot.XMLNSC.mySoapNS:Envelope.mySoapNS:Header."TestHeader" = Environment.XML."soapenv:TestHeader";
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 30, 2008 2:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ravi_ishere wrote:
Still i have one more query that Is the XML will recognize as XMLNSC message?


There's no such thing as an XMLNSC messages; only an XML message parsed into the XMLNSC domain. The difference between XMLNS & XMLNSC is documented, as are the reasons you shouldn't use the XML domain in WMBv6.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ravi_ishere
PostPosted: Wed Jan 30, 2008 3:15 am    Post subject: Reply with quote

Apprentice

Joined: 20 Jan 2008
Posts: 29

Yes i got it thanks. how can we make the XML message tree to recognize as XMLNSC
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 30, 2008 3:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ravi_ishere wrote:
Yes i got it thanks. how can we make the XML message tree to recognize as XMLNSC


I suspect we have a language mismatch here. Your question doesn't make sense as asked, and if you're asking what I think you're asking then you've got the answer. Especially if you have, as you say, "got it".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Converting the CLOB Getting from OracleDB to XML in WBIMB
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.