NonStop SOAP 4.1 User's Manual
Example 7 An XML Message-I for a Sample DDL file with the @SOAP_OPTIONAL Tag
<patient_data>
<id></id>
<age></age>
</patient_data>
In Example 7, the hospital element is not present; however, it is valid because the HOSPITAL
field is optional.
Example 8 An XML Message-II for a Sample DDL file with the @SOAP_OPTIONAL Tag
<patient_data>
<id></id>
<age></age>
<hospital>
<hosp_name></hosp_name>
<county>
<code></code>
<details>
<county_name></county_name>
<status></status>
</details>
<description></description>
</county>
</hospital>
</patient_data>
In Example 8, the ADDRESS element is not present; however, it is valid because the parent element
is hospital, which is an optional element.
Exposing DDL Fields as XML Attributes
Each DDL field in the DDL file is mapped to a corresponding element in the XML schema. As a
result of the mapping, the size of the SOAP messages exchanged between the client and the
NonStop SOAP 4 server increases and impacts the runtime performance.
Example 9 A Sample XML file with DDL fields mapped to the Corresponding Elements
<AccountDetails>
<AccountNumber>120012</AccountNumber>
<MemberName>
<First>John</First>
<Middle>K</Middle>
<Last>Doe</Last>
</MemberName>
</AccountDetails>
NonStop SOAP 4 allows you to specify a DDL field as an XML attribute, which helps reduce the
size of the SOAP message.
Example 10 A Sample XML file with DDL fields represented as XML attributes
<AccountDetails AccountNumber="120012">
<MemberName First="John" Middle="K" Last="Doe"/>
</AccountDetails>
The DDL fields can be represented in XML as attributes or elements by doing one of the following:
• “Setting the SoapDDLAttribute in the SDL File” (page 222)
• “Flagging a DDL Field with SOAP DDL Comment Tags” (page 222)
DDL Comments 221










