Using Java to Handle Custom WSDL Data Types : Page 2
What happens when neither the default WSDL type system nor the default encoding meet your application's needs? Don't worry, you can use custom data types and encoding formats in conjunction with Java to solve the problem.
by Jeff Hanson
Sep 20, 2005
Page 2 of 4
WSDL and the XML Schema Specification
Even though you can use any encoding format for WSDL type definitions, the WSDL specification suggests using XML Schema Definitions (XSD). XSD or XML Schema is a W3C standard that seeks to supersede the document type definition (DTD) standard for defining structure within an XML document. XML Schema defines a comprehensive set of programming-language independent, primitive/simple data types, such as doubles, strings, and integers, as well as a mechanism for creating complex types using the predefined simple types (see Table 1).
Table 1. XML Schema Simple Types: The table shows a list of the simple types predefined in XSD.
The WSDL <types> element defines data types that are to be exchanged between service consumers and providers. If the service defined by the WSDL document uses only the built-in XML Schema simple types, you don't have to include a <types> element; instead, you can use the element to define your own types. Listing 1 shows a simple WSDL document that includes a <types> element: