Problem in Message Modeling - Websphere

This is a discussion on Problem in Message Modeling - Websphere ; I am quite new to Message Broker Development. I am trying to model a delimited message as follows: AAAAA,BBBBB,CCCCC EEEEE,FFF,GG IIIIIII,JJ,KK MMMMM,NNNNN,OO QQQQ,RRRRR,SSSS UUUU,VVVV,WWW YYYY,ZZZZ,ABCD IIIIIII,JJ,KK There are two substrcture in the message - name and address. Each has, furtgher ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Problem in Message Modeling

  1. Problem in Message Modeling

    I am quite new to Message Broker Development. I am trying to model a delimited message as follows:

    AAAAA,BBBBB,CCCCC
    EEEEE,FFF,GG
    IIIIIII,JJ,KK
    MMMMM,NNNNN,OO
    QQQQ,RRRRR,SSSS
    UUUU,VVVV,WWW
    YYYY,ZZZZ,ABCD
    IIIIIII,JJ,KK

    There are two substrcture in the message - name and address. Each has, furtgher three subfields, firstname, MI, lastName and address has houseNo, Street, City.


    I have defined the message as follows:

    Message : customer (CustomerType- complextype)

    Type
    CustomerType- complextype ( physical prop: delimiter
    local element Name ( nametype
    local element addredd ( addressType

    Nametype (Complextype)( delimiter , (comma
    local element firstname : strinig
    local element MI " string
    local element lastname string

    AddressType( complextype) delimiter , (comma)

    lpcal element houseNo string
    local element street string
    local element city string


    result:

    It can process upto second last field of the sedond line, that means upto street, then the last field takes everything remaining. The result given below:


    (0x0100001B):MRM = (
    (0x01000013):Customer = (
    (0x01000013):Name = (
    (0x0300000B):FirstName = 'AAAAA'
    (0x0300000B):MI = 'BBBBB'
    (0x0300000B):LastName = 'CCCCC'
    )
    (0x01000013):Address = (
    (0x0300000B):HouseNo = 'EEEEE'
    (0x0300000B):Street = 'FFF'
    (0x0300000B):City = 'GG
    IIIIIII,JJ,KK
    MMMMM,NNNNN,OO
    QQQQ,RRRRR,SSSS
    UUUU,VVVV,WWW
    YYYY,ZZZZ,ABCD
    IIIIIII,JJ,KK
    )
    )
    )
    )




    I went through the red book, and message set tutorials. Also, tried the video rental example of sample program. There is not exact example.

    I found example either with tagged delimited, or with group indicator, such as [,{ or ( and ), } or ] at the beginning and end.


    My questins:

    Can not the message as I gave above modeled? If, what is mistake am I making?

    Please help me as I am stuck there.


    Thank you very much in advance,



  2. Re: Problem in Message Modeling

    AAAAA,BBBBB,CCCCC
    EEEEE,FFF,GG
    IIIIIII,JJ,KK
    MMMMM,NNNNN,OO
    QQQQ,RRRRR,SSSS
    UUUU,VVVV,WWW
    YYYY,ZZZZ,ABCD
    IIIIIII,JJ,KK

    Is this your input?

    Nametype (Complextype)( delimiter , (comma

    local element firstname : strinig
    local element MI " string
    local element lastname string

    AddressType( complextype) delimiter , (comma)

    lpcal element houseNo string
    local element street string
    local element city string

    Instead of setting Nametype (Complextype)(delimiter,commma), model your whole message as complex type and delimiter comma then while building your output send what ever expected.

    OutputRoot.XML.Name.FirstName = InputRoot.MRM.tns:FirstName
    --
    ---
    OutputRoot.XML.Address.City = InputRoot.MRM.tns:City

  3. Re: Problem in Message Modeling

    Once i can define a message set which reads my message, i can do t he rest. So, can you pleaase tell me more clearly what is the mistake and what should I do?

    1 rec

    AAAAA,BBBBB,CCCCC
    EEEEE,FFF,GG

    2 rec

    IIIIIII,JJ,KK
    MMMMM,NNNNN,OO
    3 rec

    QQQQ,RRRRR,SSSS
    UUUU,VVVV,WWW
    4 rec

    YYYY,ZZZZ,ABCD
    IIIIIII,JJ,KK

    lets say these are 4 records. I want to read these as follwos

    first line name -> firstname, mi, lastname ( but no tag and not GI in real data
    second line addredd-> houseNo, street, city

    repeat until finish

    can u please give steps how i can define a message definition file ( message) understand this physical message and reads it.

    thanks




  4. Re: Problem in Message Modeling

    1 rec

    AAAAA,BBBBB,CCCCC
    EEEEE,FFF,GG

    2 rec

    IIIIIII,JJ,KK
    MMMMM,NNNNN,OO
    3 rec

    QQQQ,RRRRR,SSSS
    UUUU,VVVV,WWW
    4 rec

    YYYY,ZZZZ,ABCD
    IIIIIII,JJ,KK
    How your input will exactly look like? Do you have any special delimiters between each record? Are you getting more than one person information in your input, if so do you have any group indicator?


  5. Re: Problem in Message Modeling

    Hi,

    Thank you for the reply. I am going to repeat my need and I would appreciate your answer.

    I need to process record like this

    name
    address

    name has
    fname,lname
    address
    houseNo,Street,city

    or we can combine these like

    fname,lname,houseno,street,city

    the input scenario would be like this:

    fname,lname,houseno,street,city
    fname,lname,houseno,street,city
    fname,lname,houseno,street,city
    fname,lname,houseno,street,city
    fname,lname,houseno,street,city
    fname,lname,houseno,street,city
    fname,lname,houseno,street,city


    can this be modelled without changing data ( adding indicator or tag? That is my first question. If yes, how? I am unable to model this message? after the last field of the fistr line, it takes up everything. I can not produce 2 record in parser.

    appreciate ur answer

    thanks


  6. Re: Problem in Message Modeling

    It sounds as if you have two styles of input
    a)
    fname,lnamehouseno,street,city

    b)
    fname,lname,houseno,street,city

    In other words, the delimiter between lname and houseno is either a comma or .

    Please tell me whether that analysis is correct. If it is correct, I can tell you how to model your message.

  7. Re: Problem in Message Modeling

    kimbert,

    Your analysis is correct. In fact, the input is name and address. name has two sub elements -> Fname,Lname and address has three sbu elements HouseNo,Street,City.

    Now, I can parse all in one line but still I can not read if the input is as follows

    Fname,Lname
    HouseNo,Street,City
    Fname,Lname
    HouseNo,Street,City
    Fname,Lname
    HouseNo,Street,City

    There are multiple records in a message.

    As I said, I can read if i put all in one line as

    Fname,Lname,HouseNo,Street,City
    Fname,Lname,HouseNo,Street,City

    My output has to be in fixed length format which I am having problem putting this message in fixed length format.

    The details of the project is as follows:

    1. Read the comma delimited input as follows:

    AAAAA,BBBB
    11111,CCCC
    DDDDD,EEEE
    FFFFF,2222
    GGGGG,HHHH
    XXXXX,YYYY
    33333,IIII
    JJJJJ,OOOO
    KKKKK,LLLL
    44444,MMMM

    and convert it to a fixed length message as follows:
    AAAAABBBB
    11111CCCC
    DDDDDEEEE
    FFFFF2222
    GGGGGHHHH
    XXXXXYYYY
    33333IIII
    JJJJJOOOO
    KKKKKLLLL
    44444MMMM

    I developed a TDS message set for reading input message. It works fine but the message set for converting the message to fixed length format is producing a parse error. Can anyone give any suggestions for resolving?

    input root structure looks as follows:
    Inputroot
    MRM
    Record
    Name
    firstname
    lastname

    and I want the message in the same format except with fixed lengths instead of comma delimited data

    The output message set is as follows:

    Message :CustomerOut
    Record ( local element reference, this repeats)

    properties:

    physical

    Repeating Element Delimiter

    logical
    Max Occurs -1

    Type
    CustomerOutType : complexType

    NameType
    FirstName local element
    Lastname local element

    properties

    logical

    physical
    Length 5
    Length 4
    Left Justified
    Padding Character 0


    RecordType
    NameOut (local element)

    Questions:

    When we walked through the debug, it works fine till the end but I can not execute the following line:

    SET OutputRoot = InputRoot,

    My belief was that both the input message and output message has a similar structure so that the input message could be copied to the output message. But it is producing the following error message,

    Text = Mandatory element has no value or default value assigned

    Using the following esql :

    SET OutputRoot = InputRoot;
    SET OutputRoot.Properties.MessageSet = 'Fixed_Msg_Set';
    SET OutputRoot.Properties.MessageType = 'CustomerOut';
    SET OutputRoot.Properties.MessageFormat = 'TDS1';


    Thank you very much


  8. Re: Problem in Message Modeling

    This thread has moved to the MQSeries.Net forum http://www.mqseries.net/phpBB2/viewtopic.php?t=34260. To avoid duplication, please do not post any more updates here.

+ Reply to Thread