Author |
Message
|
PravinG |
Posted: Wed May 28, 2008 3:58 pm Post subject: Message archive and resubmission |
|
|
Newbie
Joined: 16 Oct 2006 Posts: 9 Location: India
|
Hi,
Our project requires the input message archiving for resubmission (if original message processing fails then we need to use this archived messages for reprocessing).
We are using an archive subflow which archives the input message(Complete InputRoot) as a BLOB into the database column before any further processing.
We are now developing a resubmission flow which requires this BLOB message to be converted back in proper format and resend it to the respective queues.
The problem we are facing is: How to convert this blob to the proper output message (OutputRoot) (with all headers and bodies properly formated) ?
With the below line, we are getting MQMD from the BLOB message but how to get the last child ?
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD') PARSE(Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG,InputProperties.Encoding,InputProperties.CodedCharSetId);
Our environment details - WMB 6.1,WMQ 6.0 on Windows.
Any other way of achiving this 'Archiving and Resubmitting' of message ?
Thanks in advance,
Pravin. |
|
Back to top |
|
 |
AkankshA |
Posted: Wed May 28, 2008 7:00 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Code: |
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN('MQMD') PARSE(Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG,InputProperties.Encoding,InputProperties.CodedCharSetId); |
You tried creating MQMD here and got that...
now create the further elements(message body) and you shall get them too...
something like
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN('.... ') NAME('...') PARSE(Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG,InputProperties.Encoding,InputProperties.CodedCharSetId); _________________ Cheers |
|
Back to top |
|
 |
PravinG |
Posted: Wed May 28, 2008 11:32 pm Post subject: |
|
|
Newbie
Joined: 16 Oct 2006 Posts: 9 Location: India
|
Hello Akansha, Thanks for your reply.
We have tried getting the last child using :CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN('.... ') NAME('...') PARSE(Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG,InputProperties.Encoding,InputProperties.CodedCharSetId);
But it gives XML parsing errors. That may be because the original BLOB message starts with Rfh2 and MQMD Header and we are trying to parse this message using XML parser.
How can we extract and parse that "After MQMD" (i.e. "Last child") portion of BLOB message ?
Thanks,
Pravin. |
|
Back to top |
|
 |
AkankshA |
Posted: Wed May 28, 2008 11:38 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
parse out for all the headers u hv in initial message... _________________ Cheers |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed May 28, 2008 11:57 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
why do you want to segregate and create the XML output, you can create in one shot. isnt it.
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
PravinG |
Posted: Thu May 29, 2008 12:10 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2006 Posts: 9 Location: India
|
Hi Gayatri,
I dont want to segregate the xml message. Rather I want the complete OutputRoot message (with all headers and body). But I am not getting a way to achive this.
I have the complete message (with all headers and body) in BLOB format. Could you please let me know how can I map this BLOB message to OutputRoot ? Following line doesnt work for me ;-(
SET OutputRoot = Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG;
Thanks,
Pravin. |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu May 29, 2008 12:18 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
PravinG wrote: |
SET OutputRoot = Environment.Variables.Coeint.MW_AUDIT_LOG.ORIG_MSG;
|
I assume that you need, XML as the output right, the above code wont work.
try what AkankshA told you to do so, thats the way to dynamically parse
and better than RCD node too.
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
vallu |
Posted: Thu May 29, 2008 10:57 am Post subject: |
|
|
Apprentice
Joined: 29 Jun 2002 Posts: 31
|
To Summarize, if the BLOB obtained from the database has MQMD and XML body as part of it,
CREATE NEXTSIBLING with both the parsers still works. Is the understanding correct?
Or should we store the MQMD and XML as 2 seperate BLOBs in the database? |
|
Back to top |
|
 |
|