NonStop SOAP 4.1 User's Manual
Setting the SoapDDLAttribute in the SDL File
The SDL file provides SoapDDLAttribute at the Service element level that accepts a value of
yes or no. This enables you to flag all the DDL fields of a definition file without changing the DDL
dictionary.
• When set to yes, SoapDDLAttribute specifies that all the leaf fields of the request and
response DDL definitions of the service must be represented as XML attributes.
• When set to no, SoapDDLAttribute specifies that all the leaf fields of the request and
response DDL definitions of the service must be represented as XML elements.
• All DDL leaf fields, except the OCCURS and OCCURS_DEP_ON fields, are XML attributes.
The default value is no.
Example 11 shows a sample SDL file with SoapDDLAttribute.
Example 11 A Sample SDL File with SoapDDLAttribute
<sdl ...>
<Pathway ...>
...
<ServerClass Name="SC-1" ...>
<Service ServiceName="Service-A"
SoapMessageType="document"
SoapDDLAttribute="yes">
</Service>
</ServerClass>
</Pathway>
</sdl>
The SoapDDLAttribute attribute is not applicable for services when the SoapMessageType
attribute in the SDL file is set to rpc because the message format in the rpc style resembles a
function call.
In this message format, the order of the elements is important, which cannot be achieved when
the message fields are represented as XML attributes. Therefore, do not set the SoapDDLAttribute
to yes if a service in the SDL file has the SoapMessageType attribute set to rpc. The
SoapAdminCL tool validates this condition when adding or updating a service. Any validation
errors encountered are displayed as follows:
SOAPADMIN ERROR >> Error in definition of the service <service name>.
The attribute "SoapDDLAttribute" cannot have a value "yes"
when the attribute "SoapMessageType" is set to "rpc".
Flagging a DDL Field with SOAP DDL Comment Tags
DDL fields can be selectively represented as XML attributes or elements by tagging them
appropriately in the DDL dictionary. You can use the following DDL comment tags to flag the DDL
fields in the request/response definitions as attributes or elements:
@SOAP_ATTRIBUTE
Flags a DDL field(s) to be represented as XML attribute(s).
@SOAP_ELEMENT
Flags a DDL field(s) to be represented as XML element(s).
For example, a DDL file with the field tagged with the @SOAP_ATTRIBUTE will appear as:
?comments
DEF PATIENT.
02 PATIENT.
03 NAME.
*@SOAP_ATTRIBUTE
04 FIRST PIC X(20).
END
222 NonStop SOAP 4 Features










