MQRFH2 XML data and schema examples

Example XML data that contains MQRFH2 parameters

Note the following characteristics about the example XML data:
  • ParameterA contains only properties.
  • ParameterB contains groups with properties.
  • ParameterC contains both a group and a property.
  • Property4 repeats several times within groupDtl.

Example XML Data that Contains MQRFH2 Parameters:

<?xml version="1.0" encoding="UTF-8"?>

<NameValueData>

    <parameterA>

        <property1>value</property1>

        <property2 datatype="nt">345</property2>

    </parameterA>

    <parameterB>

        <groupHeader>

            <property3>true</property3>

        </groupHeader>

        <groupDtl>

            <property4>ANR</property4>

            <property4>BYC</property4>

            <property4>ENN</property4>

        </groupDtl>

    </parameterB>

    <parameterC>

        <groupNew>

            <property5>01/15/2004</property5>

        </groupNew>

        <property1>value</property1>

    </parameterC>

</NameValueData>

Example XML Schema that defines MQRFH2 parameters

The following example XML Schema defines the three parameters displayed in Example XML data that contains MQRFH2 parameters. The type for all of the property elements: MQRFH2PropertyType, provides the datatype attribute shown on property2 in the preceding example. The MQRFH2PropertyType type also ensures that the elements can contain values.

The repetition for property4 in groupDtl is handled with the minOccurs and maxOccurs attributes. You can also set maxOccurs to unbounded to allow an unlimited number of repetitions.

An Example XML Schema that defines MQRFH2 Parameters:

<xsd:schema elementFormDefault="qualified"

  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

  xmlns:rfh="http://www.approuter.com/samples/MQ"

  targetNamespace="http://www.approuter.com/samples/MQ">

  <xsd:complexType name="MQRFH2PropertyType">

    <xsd:simpleContent>

      <xsd:extension base="xsd:string">

        <xsd:attribute name="dt" type="xsd:string" use="optional"/>

      </xsd:extension>

    </xsd:simpleContent>

  </xsd:complexType>

  <xsd:element name="NameValueData">

    <xsd:complexType>

      <xsd:sequence>

        <xsd:element name="parameterA">

          <xsd:complexType>

            <xsd:sequence>

              <xsd:element name="property1" type="rfh:MQRFH2PropertyType"/>

              <xsd:element name="property2" type="rfh:MQRFH2PropertyType"/>

            </xsd:sequence>

          </xsd:complexType>

        </xsd:element>

        <xsd:element name="parameterB">

          <xsd:complexType>

            <xsd:sequence>

              <xsd:element name="groupHeader">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="property3" type="rfh:MQRFH2PropertyType"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

              <xsd:element name="groupDtl">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="property4" type="rfh:MQRFH2PropertyType" minOccurs="1"

                      maxOccurs="5"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

            </xsd:sequence>

          </xsd:complexType>

        </xsd:element>

        <xsd:element name="parameterC">

          <xsd:complexType>

            <xsd:sequence>

              <xsd:element name="groupNew">

                <xsd:complexType>

                  <xsd:sequence>

                    <xsd:element name="property5" type="rfh:MQRFH2PropertyType"/>

                  </xsd:sequence>

                </xsd:complexType>

              </xsd:element>

              <xsd:element name="property1" type="rfh:MQRFH2PropertyType"/>

            </xsd:sequence>

          </xsd:complexType>

        </xsd:element>

      </xsd:sequence>

    </xsd:complexType>

  </xsd:element>

</xsd:schema>




Feedback | Notices


Timestamp icon Last updated: Thursday, December 17, 2015


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/MQ_MQRFH2_Schema_Fragment_Examples.html