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 » Strange problem

Post new topic  Reply to topic
 Strange problem « View previous topic :: View next topic » 
Author Message
wmqiadmin
PostPosted: Fri Mar 09, 2007 4:26 pm    Post subject: Strange problem Reply with quote

Disciple

Joined: 19 Jun 2005
Posts: 163
Location: epping UK

Hi All,

I have created an error handler message flow. In this I am handling messages on Q generated by System errors.

In my main flow I have a subflow which generates an error message (XML structure) with the error details, error codes error description and original message. In original message I am setting <OriginalMessage>InputRoot</OriginalMessage>

Now when I parse the error message in my error handler message flow and try to remove the original message from the original xml element the actual problem arises...
It works fine with XML structure messages but when I parse the TDS or CWF messages I get those messages in XML structure not in thier original Structure.
i.e.
my TDS message looks like this
[quote]<Value1>1234</Value1><Value2>984798</Value2><Value3>984732<Value3>

Instaed of
Quote:

1234|984798|984732


Any suggestions on this how can I change this XML structure to original TDS structure.

Thanks
wmqiadmin
Back to top
View user's profile Send private message
doubt_master
PostPosted: Sun Mar 11, 2007 9:12 am    Post subject: Reply with quote

Novice

Joined: 02 Mar 2007
Posts: 10

For transforming the XML structure to TDS structure you need to create the MessageDefnition file for the TDS format.

Then you need to parse the values .
Then you have to map the elements
Back to top
View user's profile Send private message
wmqiadmin
PostPosted: Sun Mar 11, 2007 11:22 am    Post subject: Reply with quote

Disciple

Joined: 19 Jun 2005
Posts: 163
Location: epping UK

Thanks dobt-master for your response, as i said I am parsing this TDS message format in the main flow and attaching the inputRoot in the Exceptional message handler flow to get the original message in case of some problem.

At this point the message in stored in the Broker as XML structure and it is saved as XML structure in the InputRoot. Is there any way i can store the message in TDS format in the broker after it has been parsed by the broker in the main flow??

Highly appriciate your inputs.

Thanks
wmqiadmin
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 12, 2007 2:13 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If your message flow has already hit an error, I would not trust it to accurately recreate the original bitstream. If you need to return the original message, then save the bitstream in the environment ( as a BLOB ) before you parse it.
Back to top
View user's profile Send private message
wmqiadmin
PostPosted: Mon Mar 12, 2007 11:10 am    Post subject: Reply with quote

Disciple

Joined: 19 Jun 2005
Posts: 163
Location: epping UK

kimbert wrote:
If your message flow has already hit an error, I would not trust it to accurately recreate the original bitstream. If you need to return the original message, then save the bitstream in the environment ( as a BLOB ) before you parse it.


Thanks Kimbert,

Can i revert the message once it is parsed by the broker? In this case can i revert the message in the subflow once it is parsed in the main flow?

Thanks
wmqiadmin
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 12, 2007 4:39 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Can i revert the message once it is parsed by the broker?

You can parse and re-serialize your message as many times as you like. You can even do it within the same Compute ( or Java Compute) node using CREATE...PARSE and ASBITSTREAM.

However, in your case I would advise you to
- parse the message in the BLOB domain
- copy the original bitstream (InputRoot.BLOB.BLOB) to the environment tree
- Re-parse using your message set ( RCD node, or CREATE...PARSE )
- Use your copy of the original bitstream if you need to report it in an error message.
Back to top
View user's profile Send private message
wmqiadmin
PostPosted: Tue Mar 13, 2007 10:10 am    Post subject: Reply with quote

Disciple

Joined: 19 Jun 2005
Posts: 163
Location: epping UK

Thanks a lot kimbert and every buddy else,

i'll look through this perspective.

wmqiadmin
Back to top
View user's profile Send private message
wmqiadmin
PostPosted: Fri Mar 30, 2007 10:15 am    Post subject: Reply with quote

Disciple

Joined: 19 Jun 2005
Posts: 163
Location: epping UK

kimbert wrote:
Quote:
Can i revert the message once it is parsed by the broker?

You can parse and re-serialize your message as many times as you like. You can even do it within the same Compute ( or Java Compute) node using CREATE...PARSE and ASBITSTREAM.

However, in your case I would advise you to
- parse the message in the BLOB domain
- copy the original bitstream (InputRoot.BLOB.BLOB) to the environment tree
- Re-parse using your message set ( RCD node, or CREATE...PARSE )
- Use your copy of the original bitstream if you need to report it in an error message.


Hi,

I used RCD node converted XML message to BLOB, put the message in the XML Element, in the second flow I am extracting the message from the XML element and putting it on the output queue.

DECLARE origMsg BLOB;
SET origMsg = FIELDVALUE(InputRoot.XMLNS.Message.Error.OriginalMessage);

SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;


--SET OutputRoot.MQMD.CodedCharSetId = 1208;
--SET OutputRoot.MQMD.Encoding = 850;
--SET OutputRoot.MQMD.Format = MQFMT_STRING;

SET OutputRoot."BLOB"."UnknownParserName" = '';
OutputRoot.BLOB.BLOB = origMsg;

and in the output node i am getting this value

3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0d0a3c464d4d6573736167653e0d0a203c464d4865616465723e0d0a20203c536f75726365436f6d706f6e656e743e437265646974204465636973696f6e2052657175657374204e6f6e2d43616e6f6e6963616c20584d4c205478666d20666c6f773c2f536f75726365

can you please help me here ?

thanks
wmqiadmin
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 » Strange problem
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.