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 » Inserting complete message

Post new topic  Reply to topic
 Inserting complete message « View previous topic :: View next topic » 
Author Message
alvinlimtc
PostPosted: Wed Feb 15, 2006 4:00 am    Post subject: Inserting complete message Reply with quote

Apprentice

Joined: 22 Dec 2005
Posts: 29
Location: Singapore

Hi,

I have a simple XML message of the format coming in via the MQInput node:

<Message>
<Element1>value1</Element1>
<Element2>value2</Element2>
<Message>

The question is how do I retrieve the whole message, with formatting intact and insert into the database. I require to insert all incoming messages into the database for audit purposes.

Thought it would be something like this, but this returns the whole logical tree.

INSERT INTO Database.AUDIT(MSG_DETAIL)
VALUES(CAST(BITSTREAM(Root) AS CHAR));

Thanks.
Back to top
View user's profile Send private message Visit poster's website
jsware
PostPosted: Wed Feb 15, 2006 4:54 am    Post subject: Re: Inserting complete message Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

alvinlimtc wrote:
Thought it would be something like this, but this returns the whole logical tree.

INSERT INTO Database.AUDIT(MSG_DETAIL)
VALUES(CAST(BITSTREAM(Root) AS CHAR));


Try

CAST(BITSTREAM(Body) AS CHAR CCSID Root.Properties.CodedCharSetId)

instead. I might have got the name of the CCSID element wrong (I can't check I'm away from my dev machine).

I have done something similar with embedding the body of a message in the an "OriginalData" element of a diagnostic XML.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 15, 2006 5:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

BITSTREAM IS DEPRECATED.

Has been since 2.1.

Use ASBITSTREAM instead.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
alvinlimtc
PostPosted: Wed Feb 15, 2006 6:20 am    Post subject: Reply with quote

Apprentice

Joined: 22 Dec 2005
Posts: 29
Location: Singapore

Great! It works.

Much appreciated.
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Feb 15, 2006 6:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

alvinlimtc wrote:
Great! It works.

Much appreciated.


Really. Use ASBITSTREAM.
_________________
I am *not* the model of the modern major general.
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 » Inserting complete message
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.