Author |
Message
|
john arden |
Posted: Wed Mar 01, 2006 5:20 am Post subject: Reading CWF Messages |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
People
We are using MQ Broker 5.3
I have a requirement to read an CMF message and am having problems. The message that I place appears to be correct in length and format but in all instances as soon as I go near the MRM parser it gives the following error.
imbRecoverableException caught from worker ->Initialize Parse/Set FI Header.
and the body of the message is MRM without any contents.
I have tried the following:
1 read the message as BLOB and then converting it using a ResetContentDescriptor node, this gives the correct BLOB in the first phase but as soon as it reaches the but immediately after the ResetContent Descriptot Node the error as outlined above rears it sugly head.
2 Read the message as MRM and upon exit from the MQInput node the error is already shown.
How have others gotten over the problem, I was hoping not to have to cast the message to character and then distribute this.
Thanks in anticipation
John Arden _________________ John Arden |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 01, 2006 5:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It should give you more information about why the error is occuring.
To be honest, the most likely reason is that your model is not correct.
The second most likely reason is that the data isn't correct.
If you put a trace node on the catch terminal of your MQ Input node, and include ${ExceptionList} in the trace pattern, you should get a report of what's going on. Also look in the system log on your broker machine to see if there is more information there.
How did you create your model? By hand? From an import? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
john arden |
Posted: Wed Mar 01, 2006 6:18 am Post subject: Further Data |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
The schema was created from an XML schema and the field lengths added manually. All fields are straight :string.
I have looked using Debug and then the message contents of MRM is blank and the exception list is also blank.
No validation is used on the input node.
I use rfhUtil to place the message on the queue.
Thanks
John Arden _________________ John Arden |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 01, 2006 6:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't think you can successfully model XML based data using Custom Wire Format...
You could use Tagged - Delimited Strings, with some effort...
But really you should be using the XML physical format, not CWF or TDS, if you want to model XML data.
If you aren't validating against the model, though, it's probably simpler to not use MRM at all and use the XMLNS domain and take advantage of the self-describing nature of XML.
Or are you trying to read in a flatfile format message, like a C record or a COBOL copybook, and then output XML? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
john arden |
Posted: Wed Mar 01, 2006 6:53 am Post subject: Additional Explanations |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
Jefflowery
I am reading a flat file type message (CWF) from an external system. The aim is to convert this to XML in the first instance so as to enable the use of a normal XML Transformation node, the stylesheet for which has been prepared on the basis of XML input, to output XML.
The schema was prepared for the XML Stylesheet as a copy of the flat COBOL type layout and then I added the field lengths and set the possible modes to XML and CWF.
thanks
John Arden _________________ John Arden |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 01, 2006 7:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, well. That's a little roundabout way to do it - I would have just imported the copybook directly - but it should work.
Have you seen additional errors in the system log on the broker?
What does the trace of the ExceptionList show? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 01, 2006 7:45 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Are you definitely using v5 CSD3 of the message broker? Or did you mean MQSeries v5.3? If the former, then you will definitely get a lot more information than you have posted so far. Either way, if you post the full text of the error message, including the unique number (e.g. 'BIP9999E') then I will probably be able to help.
One more question:
Quote: |
then I added the field lengths |
How and where did you 'add the field lengths'? |
|
Back to top |
|
 |
john arden |
Posted: Fri Mar 03, 2006 4:55 am Post subject: More Data |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
Gentlemen
Answers Are:
1 I used the workbench to add the field lengths, i.e. I imported the XML Schema to get the field names enabling both XML and CWF formats, then using the properties of the CWF for each field I added in the field length. All fields are string.
2 When reading the message immediately after the MQInput node the problem showed up with an MRM part of the message but no contents of this whatsover and immediately below this the following:
ImbRecoverableException caught from worker -> initialise Parse / Set FiHandler
this was obtained using debug. The exception tree was empty and no other errors appeared to show up as fas as I can see.
As far as I know I have followed all but it appears as if I must have missed out some switch or other in the input queue or message set setup. I have set the following:
Domain = MRM
Message Set = Msg_Set_FPI__Input_FX (JO6ACQ4002001)
Message Format = CWF1
Message Type = (Blank)
Validation = None
Transaction Mode = Yes.
The message set is definately deployed in the same execution group as the messge flow. the default wire type, on the message set, is set to CWF1.
Any ideas or if not what have others done to read CWF type messages directly into the MRM domain.
Thanks
John Arden _________________ John Arden |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Mar 03, 2006 5:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't think you will see the ExceptionList along the connection from the 'out' terminal of the MQInput node. You should see it along the 'catch' terminal.
Also, look at the broker system logs.
In general, if the MRM is having an issue parsing a message, you will only see as much data as it has been able to parse successfully.
So seeing only the "MRM" element means one of two things. Either the first parts of your data do not match the message, or you have not caused parsing to occur yet! Remember that Broker usings delayed parsing.
Set the MQInput node to validate. This will force a full parse, and should also increase the error information you are receiving.
Again - Look at the Broker System Logs. There will be information there! _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Mar 03, 2006 5:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your problem is
Quote: |
Message Type = (Blank) |
The MRM parser cannot parse your message unless you tell it which message definition you want to use. |
|
Back to top |
|
 |
john arden |
Posted: Mon Mar 06, 2006 2:19 am Post subject: MOre Questions |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
Kimbert
The requirement for message type appears valid and the book definately states that it should be entered. However I have a problem in that when I use these messge sets, and I have regenerated another version of the message set from cobol style copybook, no applicable type shows.
From the books I am reading there appears to be no mention of how to achieve this and the things I have tried such as entering prefixes do not appear to work.
Can you inform me where and when I can create this "Type" please.
Thanks
John Arden
Jefflowery
The Parser error shows on the Fail node and states Message Id not in CWF File. I assume this is due to the blank Type and thus the question repeats, how can I set this in the message sets.
Thanks
John Arden _________________ John Arden |
|
Back to top |
|
 |
kimbert |
Posted: Mon Mar 06, 2006 3:13 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
no applicable type shows |
When you import a COBOL copybook ( or an XML Schema, for that matter) one of the screens in the importer wizard asks you to identify which global elements you want to use as messages. So, did you ask for any messages to be created when you did the COBOL import?
Once you have done that, you should enter the name of the appropriate message definition as the Message Type. |
|
Back to top |
|
 |
john arden |
Posted: Mon Mar 06, 2006 4:15 am Post subject: Result - solved |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
Thank you gentlemen
the answer is in the Message Type.
The book says that this should come from a drop down list, when entering this in the MQInput node, but this does not appear to do so. Once I entered the message name in the field the MRM parser problem resolved itself.
Once again Thanks
John Arden _________________ John Arden |
|
Back to top |
|
 |
|