<element> element

SOAP/AM Server Development > Service Definition File Reference > Schema Reference >

<element> element

Previous pageReturn to chapter overviewNext page

This element represents an element of a <type>.

 

parents

type

children

none

Attributes

attribute name

data type

usage

default value

description

 

name

xsd:NCName

required

 

The name of the element. It must be unique within the parent <type>.

 

offset

xsd:nonNegativeInteger

required

 

The position of this element relative to the start of the containing <type>, in bytes.

 

size

xsd:positiveInteger

required

 

The storage size for the element.

 

type

xsd:NCName

required

 

The data type of the element. Must be one of the built-in types or the name of another <type> element defined within <types>.

 

dependsOn

xsd:NCName

optional

 

If the element represents an array, the name of the element (contained within the same <type> as this element) that indicates the actual number of array occurrences at runtime.

 

minOccurs

xsd:positiveInteger

optional

1

If the element represents an array, the minimum number of occurrences.

 

maxOccurs

xsd:positiveInteger

optional

1

If the element represents an array, the maximum number of occurrences.

 

variableArray

xsd:integer

optional

0

Indicates whether the array is variable a variable length array. Valid values are "0" (no) and "1" (yes). This attribute is ignored if the element has not been declared as an array using the minOccurs/maxOccurs attributes.

 

stringPadding

xsd:token

optional

 

Controls the way elements of type string are treated. The default value is inherited from the containing <type> or the <server> whose request or reply type contains this element. Valid values are "zeros" and "spaces".

 

sizeIs

xsd:NCName

optional

 

The name of an element (contained within the same <type> as this element) that indicates the actual size of this element at runtime.

 

 

xsdType

xsd:NCName

optional

 

Indicates an alternate, standard XML schema type that should be used when serializing/deserializing this element to/from the SOAP envelope. If omitted, the SOAP envelope type is determined by the standard NSK/XSD type translation. A list of standard type translations can be found in built-in types.

 

 

encoding

xsd:NCName

optional

 

Indicates the character encoding that should be used when serializing/deserializing this element to/from the SOAP envelope. If omitted, the default encoding is the server's default encoding which is typically ISO-8859-1. This value may be altered by Server startup options. A list of available encoding names can be found in Character Encoding Names.

 

access

xsd:NCName

optional

public

Indicates whether or not the element will appear in the WSDL. Valid values are "public" or "private". A value of "public" will cause the element to appear in the WSDL and will be accessible to client applications. A value of "private" will cause the element to be omitted from the WSDL and will be inaccessible to client applications. Note that an element marked as "private" will still be initialized properly in the IPM and can still act as an initializer target.

 

Although the default value of the attribute is "public", this default can be altered by the defaultAccess attribute of this element's parent <type> element.

 

Remarks

stringPadding controls the way elements of type "string" are treated when SOAP/AM converts request input parameters to server interprocess request messages ("deserialization") and server reply interprocess messages to SOAP response output parameters ("serialization"). A stringPadding value of "zeros" causes the string to be padded with zeros to the maximum field length (aka "null-terminated") in server request messages and expected to be zero-terminated (not necessarily padded) in the server reply message. A stringPadding value of "spaces" causes the string to be padded with spaces in the server request and expected to be padded with spaces in the server reply. It is usually easier to specify the stringPadding setting on the containing <type> or on the <server> that will use the type rather than on every string element. However, it may be useful to set stringPadding on a small number of elements to override the default for the entire <type> which applies to the remainder of the elements.

 

On deserialization, SOAP/AM will automatically calculate a value for the 'dependsOn' element based on the number of array elements present in the request. On serialization, SOAP/AM expects the dependsOn element to have been set correctly by the server. It serializes to the response only the number of array elements indicated by the dependsOn element.

 

On deserialization, SOAP/AM will automatically calculate a value for the 'sizeIs' element based on the size, in bytes, of the subject element in the request. On serialization, SOAP/AM expects the sizeIs element to have been set correctly by the server. It serializes to the response only the number of bytes indicated by the sizeIs element.

 

Example

<type name=MyReplyMessage" size="5004">

   <element name="ReplyCode" type="short" offset="0" size="2"/>

   <element name="MyArrayCount" type="short" offset="2" size="2"/>

   <element name="MyArray" type="MyArrayType" offset="4" size="50"

         minOccurs="1" maxOccurs="100" dependsOn="MyArrayCount"/>

</type>

<type name="MyArrayType" size="50">

   <element name="MyLongInteger type="long" offset="0" size="4"/>

   <element name="MyLongString type="string" offset="4" size="46"/>

</type>