J2EE Web Services - download pdf or read online

... jwsbook; public class PurchaseOrder { String accountName; int accountNumber; float total; // more stuff follows } Table 3-1. Comparing the Use of XML Schema Simple Types and Java Primitive Types XML Schema Built-in Simple Types (shown in bold) Java Primitive Types (shown in bold) The PurchaseOrder complex type declares three of its elements and an attribute using the XML schema built-in types: string , integer , and float .

A schema describes the structure of an XML document in terms of complex types and simple types. Complex types describe how elements are organized and nested. Simple types are the primitive data types contained by elements and attributes. For example, Listing 3-2 shows a portion of a schema that describes the Monson-Haefel Markup Language. Monson-Haefel Markup defines a set of XML schema types used by Monson-Haefel Books: USAddress , PurchaseOrder , Invoice , Shipping , and the like. At this point all the different types used by Monson-Haefel Books are combined into one schema; later you'll learn how to separate them into their own schemas and independent markup languages.

Org/TR/xmlschema-2/ . string A sequence of characters conforming to UCS normalizedString A string without carriage returns, line feeds, or tabs token A string without spaces, line feeds, or tabs NMTOKEN A token used in attributes byte A non-decimal number between –128 and 127 unsignedByte A non-decimal number between 0 and 255 base64Binary Base64-encoded binary data (RFC 2045)[a] hexBinary Hex-encoded binary data[b] integer A base-10-integer number of any size (…)[c] positiveInteger A base-10 integer greater then zero (1, 2, …) negativeInteger A base-10 integer less then zero (…, –2, –1) int A base-10 integer between –2,147,483,648 and 2,147,483,647 (–2 billion and 2 billion) unsignedInt A base-10 integer between 0 and 4,294,967,295 (zero and 4 billion) long A base-10 integer between –9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 (–9 quintillion and 9 quintillion) unsignedLong A base-10 integer between 0 and 18,446,744,073,709,551,615 (zero and 18 quintillion) short A base-10 integer between –32,767 and 32,767 unsignedShort A base-10 integer between 0 and 65,535 decimal A decimal number of any precision and size float A decimal number conforming to the IEEE single-precision 32-bit floating-point type[d] double A decimal number conforming to the IEEE double-precision 64-bit floating-point type[d] boolean A boolean value of "true" or "false" You can also use the values of "0" (false) or "1" (true); either convention is fine.

Download PDF sample

J2EE Web Services by Richard Monson-Haefel

by Brian

Rated 4.41 of 5 – based on 41 votes