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 » Creating a MRM message set with choice composition.

Post new topic  Reply to topic
 Creating a MRM message set with choice composition. « View previous topic :: View next topic » 
Author Message
visasimbu
PostPosted: Sat Jun 26, 2010 1:22 am    Post subject: Creating a MRM message set with choice composition. Reply with quote

Disciple

Joined: 06 Nov 2009
Posts: 171

I need to create message flow with input as MRM and the output will be XML.

I already have one message set with five set of records. Now i have to create another five set of records. But as of my business requirement any one of the five set of record will come as input.

Is it possible to create a message set with choice composition in inbound ?

I have tried, but i am getting a parser exception.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sat Jun 26, 2010 12:47 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The MRM parser can almost certainly parse your input messages.

If you want more help than that, you will need to
- describe your input message format, in detail, with at least one example
- describe the structure of the message tree that you want the MRM parser to produce

If you have tried already, and you want us to tell you what you did wrong, then you need to
- tell us what you did
- quote any error messages ( in full, please - not just the summary line ).
Back to top
View user's profile Send private message
eshwarttf
PostPosted: Thu May 26, 2011 10:42 pm    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

I have to get fixed length message of name ViewRouteDetailsReply which will contain a repeating sub-element Route_Details(route id, origin,destination) or an sub-element ErrorMessage(Reason,Code) and the output is XML. I tried using choice with closed validation and open/open defined , but when I try to parse input using MQGet it throws an error
ParserException
File:CHARACTER:F:\build\S000_P\src\cpi\pwf\nxd\nxdworker.cpp
Line:INTEGER:462
Function:CHARACTER:NXDWorker::parseNext
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:5421
Text:CHARACTER:TDS General Error
Insert
Type:INTEGER:5
Text:CHARACTER:ViewRouteDetailsReply
Insert
Type:INTEGER:5
Text:CHARACTER:/ViewRouteDetailsReply/RouteDetails
Insert
Type:INTEGER:2
Text:CHARACTER:0
ParserException
File:CHARACTER:F:\build\S000_P\src\cpi\pwf\nxd\nxdinflexible.cpp
Line:INTEGER:470
Function:CHARACTER:NXDInflexible::calculateChildLength
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPv610
Severity:INTEGER:3
Number:INTEGER:5458
Text:CHARACTER:Repeat to Identifiable point found in a fixed length choice, where it is not supported.
Insert
Type:INTEGER:5
Text:CHARACTER:111^RouteDetails
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 26, 2011 11:34 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please describe your data format in more detail. Ideally, please provide some example data.

The MRM parser needs to know how to identify the Route_Details or ErrorMessage element in the data. What are the rules for resolving that choice?

The TDS parser outputs some very useful information in the user trace, if you set it to debug level.
Back to top
View user's profile Send private message
eshwarttf
PostPosted: Fri May 27, 2011 12:13 am    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

The data to MQGet node is
17-Reference number length
06252011165555001- ReferenceNum
03-Route id length
TT1-Routeid
03-travel mode length
CAR-travel
07-origin len
CHENNAI-origin
06-destination length
MUMBAI-destination
05-start time length
13:10-start time
05-end time length
06:55-end time
07-travel type length
SLEEPER-traveltype
01-seats avalbl length
7-seats avalbl

The message actually looks like this : 170625201116555500103TT103CAR07CHENNAI06MUMBAI0513:100506:5507SLEEPER017

The output message after converting from MRM to XML shud b lik either of the following:
<ViewRouteDetailsRep>
<ReferenceNum></..>
<Routedetails>
<RotueId>
<Origin> and other details
</Routedetails>
.......
</ViewRouteDetailsRep>

or

<ViewRouteDetailsRep>
<ReferenceNum></..>
<ErrorMessage>
<Errortext></Errortext>
<ErrorCode> </ErrorCode>
</ErrorMessage>

</ViewRouteDetailsRep>
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri May 27, 2011 7:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This question is an important one:
Quote:
The MRM parser needs to know how to identify the Route_Details or ErrorMessage element in the data. What are the rules for resolving that choice?
Maybe you could post an example of an input message that contains the ErrorMessage element?
Back to top
View user's profile Send private message
eshwarttf
PostPosted: Sun May 29, 2011 11:08 pm    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

Messages to MQGet will be MRM.. where I have set the MRM Parser options
SAMPLE ERROR MESSAGE

XML:-
<ViewRouteDetailsRep>
<ReferenceNum>30062011151330033</ReferenceNum>
<ErrorMessage>
<Errortext>NoSuchRoute</Errortext>
<ErrorCode>0500</ErrorCode>
</ErrorMessage>
</ViewRouteDetailsRep>

MRM:-
173006201115133003311NoSuchRoute040500

SAMPLE SUCCESS MESSAGE

XML:-
<ViewRouteDetailsRep>
<ReferenceNum>30062011151330033</ReferenceNum>
<Routedetails>
<RotueId>TT100</RouteId>
<Origin> CHENNAI</Origin>
<Destination>CBE</Destination>
<SeatsAvailable>22</SeatsAvailable>
</Routedetails>
<Routedetails>
<RotueId>TT101</RouteId>
<Origin>MUMBAI</Origin>
<Destination>BLORE</Destination>
<SeatsAvailable>20</SeatsAvailable>
</Routedetails>
</ViewRouteDetailsRep>

MRM:-
173006201115133003305TT10007CHENNAI03CBE022205TT10106MUMBAI05BLORE0220
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon May 30, 2011 3:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So...I still have questions.
Code:
RouteDetails
173006201115133003305TT10007CHENNAI03CBE022205TT10106MUMBAI05BLORE0220
ErrorMessage:
173006201115133003311NoSuchRoute040500


I am now going to make some assumptions. Please tell me which ones are incorrect, if any:
1. Every message begins with 17<referenceNum
2. An ErrorMessage always contains the exact string '11NoSuchRoute' after the ReferenceNum
3. If the message is not an ErrorMessage then it is always a RouteDetails message

Please think carefully before replying. In your reply, please describe how you have modelled your message. That means that you have to open the message definition file and look at the MRM settings. In your reply, please state
a) whether you are using tags in your message definition
b) what the property 'Data Element Separation' is set to on each complex type in your message defintion.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon May 30, 2011 3:36 am    Post subject: Reply with quote

Grand High Poobah

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

This seems really challenging as each field seems to be preceded only by it's length and you will have to determine the message by the field content.

Is there a definite structure that is always followed between a success and a failure message. In other words is the failure message you showed (route ref , no such route, errcode) the only type of failure message you would get?

As well how do you determine the travel mode after the routeId as it does not seem to be present in the examples you have provided in your last response.


Please also take into account Kimbert's question.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
eshwarttf
PostPosted: Mon May 30, 2011 4:14 am    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

All ur assumptions are correct.

Am not using any data element separators. Have not specified any values for tag.Am confused how to differentiate these two messages so parser can find.
What is the property or settings required , for the parser to differentiate these two messages.I mean how to make parser to know about the difference.

This is the first time am trying choice
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon May 30, 2011 1:09 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Warning : I have not tested the model that I have listed below.

...but I think this might work. Please note:
- It is your responsibility to test your model with a set of example data to check that it really does work.
- if you need more help, you will need to start providing a lot more information about what you have done, and what went wrong.

Code:

element name="message"
    complexType dataElementSeparation="Tagged Delimited" tagLength=2
        element name="referenceNumber" Tag="17" length=17
        choice dataElementSeparation="Tagged Delimited" tagLength=2
            sequence  dataElementSeparation="Tagged Fixed Length" tagLength=2 GroupInitiator="11NoSuchElement"
                element name="choiceDetails" Tag="04"
                    complexType dataElementSeparation="Fixed Length"
                        element name="errorCode" length=4
            sequence   dataElementSeparation="Tagged Fixed Length" tagLength=2 GroupInitiator=""
                element name="RouteDetails"
                    complexType dataElementSeparation="Fixed Length"
                        element name="routeIdLength" length=2
                        element name="routeId" lengthReference="routeIdLength"
                        ...etc for the other members of routeDetails
Back to top
View user's profile Send private message
eshwarttf
PostPosted: Mon May 30, 2011 8:50 pm    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

If I have to use length encoded format. What will be the change required. Now I am asked to drop fixed length and use length encoded format

But really thank u very much for ur help and suggestions..
Back to top
View user's profile Send private message Send e-mail
eshwarttf
PostPosted: Mon May 30, 2011 9:36 pm    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

I changed it as Fxed Length. and I used '11NoSuchRoute' as group indicator.
But its throwing an error MTI. Buffer is not completely used while reading the message
Back to top
View user's profile Send private message Send e-mail
eshwarttf
PostPosted: Mon May 30, 2011 10:43 pm    Post subject: Reply with quote

Novice

Joined: 12 Jan 2011
Posts: 11

It worked thanks . thank u very much
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating a MRM message set with choice composition.
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.