|
Article Excerpt Essential XML Quick Reference
A Programmer's Reference to XML, Xpath, XSLT, XML Schema, SOAP and More By Aaron Skonnard and Martin Gudgin Published by: Addison-Wesley Pub Co. Pages: 402 ISBN: 0201740958 List Price: $24.99
SOAP defines a set of serialization rules for encoding datatypes in XML. All data is serialized as elements rather than attributes. Attributes are only used for structural metadata; for example, when references are needed.
For simple types such as strings, numbers, dates, and so forth, the datatypes defined in "XML Schema Part II--Datatypes" are used. For types such as classes or structures, each field in the type is serialized using an element with the same name as the field. For array types, each array element is typically serialized using an element with the same name as the type, although other element names may be used. In both cases, if the field being serialized is itself a structure or an array, then nested elements are used. The top-level element in both the structure case and the array case is namespace qualified. Descendant elements should be unqualified.
The serialization rules apply to children of the Header element as well as children of the Body element. Such children are serialized types just like any other type. A request and any associated response are also treated as types, and are serialized according to the same rules.
Examples
For an example of serialization of a structured Java or VB type, see Listing 1.
LISTING 1 * SERIALIZATION OF A STRUCTURED JAVA OR VB TYPE package example.org.People; //Java class definition class Person { String name; float age; short height; } //VB Type definition Public Type Person name As String age As Single height As Integer End Type Martin 33 64
For an example of serialization...
|
|

More articles from XML Journal
XML in 2002 and beyond: a look at the past, present, and future of XML..., February 01, 2003 Special insert: Web Services Edges East Conference & Expo: featuring f..., February 01, 2003
Looking for additional articles?
Search our database of over 3 million articles.
Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication
name or publication date.
About Goliath
Whether you're looking for sales prospects, competitive information, company
analysis or best practices in managing your organization,
Goliath can help you meet your business needs.
Our extensive business information databases empower business
professionals with both the breadth and depth of credible,
authoritative information they need to support their business
goals. Whether it be strategic planning, sales prospecting,
company research or defining management best practices -
Goliath is your leading source for accurate information.
|
|