Dies ist der fünfte Abschnitt des Szenarios zum Ausführen einer
Erweiterung einfacher Nachrichteninhalte. In diesem Abschnitt wird veranschaulicht, wie Sie einen Nachrichtenfluss und ein Nachrichtenmodell für die Zuordnung einer komplexer verschachtelter, sich wiederholender Nachrichten entwickeln. Dabei inbegriffen ist auch die Entwicklung entsprechender Instanzdokumente.
- Erstellen Sie in der Nachrichtendefinition 'COMPLEX' im Namespace 'www.complex.net' die Nachricht 'addev3, mit folgender Struktur:
addev3
choice
sstr (xsd:string) lokales Element
intrep (xsd:int) lokales Element, minOcc=2, maxOcc=6
dur (xsd:duration) lokales Element
choice
comp1 lokales komplexes Element
dat1 (xsd:date) lokales Element
sval (xsd:string) lokales Element
comp2 lokales komplexes Element
bool1 (xsd:boolean) lokales Element
dat2 (xsd:date) lokales Element
comprep lokales komplexes Element, minOcc=1, maxOcc=4
int1 (xsd:int) lokales Element
dec1 (xsd:decimal) lokales Element
binel (xsd:hexBinary) lokales Element
lelem lokales komplexes Element, Basistyp xsd:string
latt (xsd:int) lokales Attribut
lcomp lokales komplexes Element
head (xsd:string) lokales Element
incomp lokales komplexes Element
count (xsd:int) lokales Element
comp:gcompel globales komplexes Element, minOcc=0, maxOcc=-1
fstr (xsd:string) lokales Element
multel lokales komplexes Element
in1 (xsd:boolean) lokales Element
in2 (xsd:string) lokales Element
in3 (xsd:float) lokales Element
footer (xsd:string) lokales Element
repstr (xsd:string) lokales Element, minOcc=1, maxOcc=-1
- Erstellen Sie den Nachrichtenfluss 'addev3' mit folgendem Zuordnungsinhalt: MQEmpfangsknoten > Zuordnungsknoten > MQSendeknoten.
- Öffnen Sie die Zuordnung, und wählen Sie 'addev3' als Quelle und Ziel aus.
- Ordnen Sie die Quellenelemente den jeweiligen Zielelementen zu.
sstr --- sstr
intrep --- intrep
dur --- dur
dat1 --- dat1
sval --- sval
bool1 --- bool1
dat2 --- dat2
int1 --- int1
dec1 --- dec1
binel --- binel
lelem --- lelem
latt --- latt
head --- head
count --- count
fstr --- fstr
multel --- multel
footer --- footer
repstr --- repstr
- Ändern Sie im Spreadsheetfenster für die erste Bedingung fn:true() in fn:exists($source/comp:addev3/sstr).
- Ändern Sie für die zweite Bedingung fn:true() in fn:exists($source/comp:addev3/intrep).
- Ändern Sie für die dritte Bedingung fn:true() in fn:exists($source/comp:addev3/dur).
- Ändern Sie für die erste komplexe Auswahlbedingung fn:true() in fn:xists($source/comp:addev3/comp1).
- Ändern Sie für die zweite komplexe Auswahlbedingung fn:true() in fn:xists($source/comp:addev3/comp2).
- Ändern Sie für die dritte komplexe Auswahlbedingung fn:true() in fn:xists($source/comp:addev3/comprep).
- Erstellen Sie folgende Instanznachrichten mit den entsprechenden RFH2-Headern:
<comp:addev3 xmlns:comp="http://www.complex.net">
<sstr>first</sstr>
<comp1>
<dat1>2005-06-24</dat1>
<sval>date value</sval>
</comp1>
<binel><![CDATA[3132333435]]></binel>
<lelem latt="24">twenty four</lelem>
<lcomp>
<head>nesting start</head>
<incomp>
<count>3</count>
<comp:gcompel>
<fstr>first</fstr>
<multel>
<in1>1</in1>
<in2>C</in2>
<in3>2.45E+1</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>second</fstr>
<multel>
<in1>1</in1>
<in2>D</in2>
<in3>7.625E+3</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>third</fstr>
<multel>
<in1>0</in1>
<in2>C</in2>
<in3>4.9E+0</in3>
</multel>
</comp:gcompel>
</incomp>
<footer>nesting end</footer>
</lcomp>
<repstr>abc</repstr>
<repstr>def</repstr>
<repstr>ghi</repstr>
<repstr>jkl</repstr>
<repstr>mno</repstr>
</comp:addev3>
<comp:addev3 xmlns:comp="http://www.complex.net">
<intrep>45</intrep>
<intrep>12</intrep>
<intrep>920</intrep>
<comp2>
<bool1>1</bool1>
<dat2>2005-06-24</dat2>
</comp2>
<binel><![CDATA[3132333435]]></binel>
<lelem latt="24">twenty four</lelem>
<lcomp>
<head>nesting start</head>
<incomp>
<count>5</count>
<comp:gcompel>
<fstr>first</fstr>
<multel>
<in1>1</in1>
<in2>C</in2>
<in3>2.45E+1</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>second</fstr>
<multel>
<in1>1</in1>
<in2>D</in2>
<in3>7.625E+3</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>third</fstr>
<multel>
<in1>0</in1>
<in2>C</in2>
<in3>4.9E+0</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>fourth</fstr>
<multel>
<in1>1</in1>
<in2>F</in2>
<in3>2.98E+1</in3>
</multel>
</comp:gcompel>
<comp:gcompel>
<fstr>fifth</fstr>
<multel>
<in1>0</in1>
<in2>D</in2>
<in3>8.57E-2</in3>
</multel>
</comp:gcompel>
</incomp>
<footer>nesting end</footer>
</lcomp>
<repstr>abc</repstr>
</comp:addev3>
<comp:addev3 xmlns:comp="http://www.complex.net">
<dur>P2Y2M</dur>
<comp3>
<int1>6</int1>
<dec1>2821.54</dec1>
</comp3>
<comp3>
<int1>41</int1>
<dec1>0.02</dec1>
</comp3>
<binel><![CDATA[3132333435]]></binel>
<lelem latt="24">twenty four</lelem>
<lcomp>
<head>nesting start</head>
<incomp>
<count>0</count>
</incomp>
<footer>nesting end</footer>
</lcomp>
<repstr>abc</repstr>
<repstr>def</repstr>
<repstr>ghi</repstr>
<repstr>jkl</repstr>
<repstr>mno</repstr>
<repstr>pqr</repstr>
<repstr>stu</repstr>
<repstr>vwx</repstr>
</comp:addev3>
Setzen Sie jetzt die Nachrichtengruppe und den Nachrichtenfluss ein.