NonStop SOAP 4.1 User's Manual

Example 18 A Sample DDL file with the @SOAP_OCCURS_DEP_ON Tag
?comments
DEFINITION REQ.
10 CH1 type character 2.
10 Bin32 type binary 32.
10 Complex1.
15 CH2 type character 4.
15 CH3 type character 1.
15 Bin2 type binary 32.
15 Complex2.
20 custnum PIC X(20) UPSHIFT.
* @SOAP_OCCURS_DEP_ON Bin2
20 Bin3 type binary 32 OCCURS 5 times.
END
Example 19 shows the corresponding XML schema generated by the SoapAdminCL tool.
Example 19 An XML Schema for a Sample DDL file with the @SOAP_OCCURS_DEP_ON Tag
<xsd:complexType name="complex2">
<xsd:sequence>
<xsd:element name="custnum" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- The following element occurs 0 to 5 times, depending upon the
value of the element:bin2:urn:cpq_tns_reflector-->
<xsd:element name="bin3" type="xsd:int" minOccurs="0" maxOccurs="5"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="complex1">
<xsd:sequence>
<xsd:element name="ch2" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ch3" minOccurs="1" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="bin2" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<xsd:element name="complex2" type="tns:complex2" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
Example 20 shows the corresponding SOAP message body that the NonStop SOAP 4 server
expects from the client.
228 NonStop SOAP 4 Features