|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reverse construct input CSV |
« View previous topic :: View next topic » |
Author |
Message
|
capellano |
Posted: Sat Mar 13, 2021 7:50 am Post subject: Reverse construct input CSV |
|
|
 Newbie
Joined: 13 Mar 2021 Posts: 3
|
Hello,
I have a message set within which there is a message definition. However an example of what the CSV looks like cannot be found. I have sent several CSV files through the message flow but the elements aren't all being picked up under the message assembly.
Is there a way to derive from the definition what the format of the CSV should be?
There is an mxsd file which I attach to this message. What else should I look for?
Code: |
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Emp">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsStructRep delimiter="@" messageSetDefaultRep="Text_CSV"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Ename" type="xsd:string"/>
<xsd:element name="Eid" type="xsd:int"/>
<xsd:element name="Esal" type="xsd:string"/>
<xsd:element name="Ecountry" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="complexType">
<xsd:sequence/>
</xsd:complexType>
<xsd:element name="IN" type="Emp">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<MRMessage messageDefinition="/0/IN;XSDElementDeclaration$MRObject"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:schema> |
Last edited by capellano on Sat Mar 13, 2021 1:36 pm; edited 2 times in total |
|
Back to top |
|
 |
capellano |
Posted: Sat Mar 13, 2021 1:35 pm Post subject: |
|
|
 Newbie
Joined: 13 Mar 2021 Posts: 3
|
Hello,
I opened the messageSet.mset using the message set editor. If you click on the Text_CSV then look under the Data Element separation settings it suggests the delimiter is a comma. But when I run the flow in debug mode it does not pick up the Elements (Eid, Esal & Ecountry). I sent this message to the flow Name,123,54000,UK.
Eventually I found the correct format of CSV file that fits the message definition. But only after I opened the message definition CSV_mdef.mxsd in text editor. Then I could see this line:
<tdsStructRep delimiter="@" messageSetDefaultRep="Text_CSV"/>
I think it is funny that when I open the message definition CSV_mdef.mxsd using the Message Definition Editor GUI the @ delimiter is nowhere to be seen.
Now I am sending Amit@123@54000@UK
Which produces:
<Emp><Ename>Amit</Ename><Eid>123</Eid><Esclor>54000</Esclor><Ecountry>UK
This is what I expected.
Do you think this is the best way to determine the correct input message?
Amit |
|
Back to top |
|
 |
timber |
Posted: Sun Mar 14, 2021 12:21 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Disclaimer: It's a very long time since I worked on MRM, so there may be simple answer that I'm missing.
Quote: |
I opened the messageSet.mset using the message set editor. If you click on the Text_CSV then look under the Data Element separation settings it suggests the delimiter is a comma. |
I agree with your expectation - if it displays the Delimiter property as a comma then it should use a comma when parsing.
Quote: |
I think it is funny that when I open the message definition CSV_mdef.mxsd using the Message Definition Editor GUI the @ delimiter is nowhere to be seen. |
I agree.
Quote: |
Do you think this is the best way to determine the correct input message? |
Well, I don't blame you for asking the question, but it's not really a reliable way to determine the correct input message. The only reliable method is to ask the sender to supply some example messages.
The problem with your current approach is that either of the following may be the case:
a) The correct delimiter is @. The Message Set editor is broken (possibly displaying the default delimiter from the .mset file ?)
or
b) the correct delimiter is comma, but the message set compiler is suffering from the same defect as the message set editor.
Unless somebody from IBM turns up to give you a definitive answer, I think I would open a ticket with IBM to get an official answer. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|