NonStop SOAP User's Manual
NonStop SOAP Features and Functions
NonStop SOAP User’s Manual—520501-012
4-33
Flagging a DDL Field with SOAP DDL Comment
Tags
*@SOAP_ATTRIBUTE
02 FIRST PIC X(20)
.....
.....
The presence of the @SOAP_ATTRIBUTE comment tag at a leaf level denotes that
the field is represented as an XML attribute and at the group level denotes that all the
child leaf fields are represented as XML attributes. The presence of the
@SOAP_ELEMENT comment tag works similar to the @SOAP_ATTRIBUTE comment
tag for the leaf and group levels, but represents the field(s) as XML elements rather
than attributes. A Service using a DDL definition with these comment tags should have
its ProcessSoapDDLComments attribute set to “yes” for NonStop SOAP to process
these comment tags.
To provide better flexibility in shaping the XML representation of the DDL fields these
comment tags can be mixed and matched within the same group level using these
rules:
•
A single DDL field cannot have both @SOAP_ATTRIBUTE and
@SOAP_ELEMENT comment tags present.
•
A Service using a DDL definition with the @SOAP_ATTRIBUTE or
@SOAP_ELEMENT comment tags should have its ProcessSoapDDLComments
attribute set to “yes” for NonStop SOAP to process the comment tags.
•
If the comments appear on a particular field then the entire hierarchy under that
field (if any) is treated as per that tag unless overridden by another tag at a child
level. The default value is controlled by the value of the SoapDDLAttribute.
•
If the SoapDDLAttribute is present and has a value of “yes”, then by default all leaf
fields are treated as attributes, unless a comment pertaining to a DDL hierarchy
changes it (provided the ProcessSoapDDLComments attribute is set to “yes”).
•
The NonStop SOAP Admin tool validates the @SOAP_ATTRIBUTE and
@SOAP_ELEMENT attributes and sends an error message (shown below)
whenever a service is added/updated into the SDR.
•
The comment tags (if present) for DDL leaf fields containing an OCCURS or
OCCURS DEPENDING ON clause are ignored.
•
The @SOAP_ATTRIBUTE and @SOAP_ELEMENT DDL comment tags are
ignored for Services having the SoapMessageType attribute set to “rpc” in the
SDR.
For information on the processing of this feature with respect to the SoapDDLAttribute
and DDL comment tags, see Table 4-2 on page 4-38.
SOAPADMIN ERROR >> Error processing DDL definition
<definition name> for Service <service name>. The SOAP DDL
comment tags "@SOAP_ATTRIBUTE" and "@SOAP_ELEMENT" cannot be
present for a single DDL field.