Supported component types  Custom datatypes and mappings

Chapter 3: Components, Datatypes, and Type Mappings

Supported datatypes

This section describes the datatypes supported in WST. The datatype must belong to a supported component type for it to be available as a Web service. Supported datatypes include:

Table 3-1 lists the datatypes supported in WST and EAServer by default, and the equivalent XML XSD types.

Table 3-1: Java datatype and XML equivalents

XML XSD type

Java datatypes

xsd:boolean

org.omg.CORBA.BooleanHolder

xsd:byte

org.omg.CORBA.ByteHolder

xsd:double

org.omg.CORBA.DoubleHolder

xsd:float

org.omg.CORBA.FloatHolder

xsd:int

org.omg.CORBA.IntHolder

xsd:long

org.omg.CORBA.LongHolder

xsd:short

org.omg.CORBA.ShortHolder

xsd:string

org.omg.CORBA.StringHolder

xsd:byte

BCD.BinaryHolder

xsd:decimal

BCD.Decimal

xsd:decimal

BCD.DecimalHolder

xsd:base64Binary (same as byte[])

BCD.Money

xsd:base64Binary (same as byte[])

BCD.MoneyHolder

xsd:double

MJD.Date

xsd:double

MJD.Time

xsd:double

MJD.Timestamp


Additional datatype support

In addition to the datatypes described in Table 3-1, Web services supports java.sql.ResultSet and TabularResults.ResultSet, which maps to a complex schema element that contains the resultset data and the schema for the resultset:

For java.sql.ResultSet:

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="jdbc.wst.sybase.com">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
   <complexType name="DataReturn">
     <sequence>
         <element name="XML" nillable="true" type="xsd:string" />
         <element name="updateCount" type="xsd:int" />
         <element name="DTD" nillable="true" type="xsd:string" />
         <element name="schema" nillable="true" type="xsd:string" />
     </sequence>
  </complexType>
</schema>
</wsdl:types>

For TabularResults.ResultSet:

<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="TabularResults.wst.sybase.com">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
   <complexType name="DataReturn">
      <sequence>
         <element name="XML" nillable="true" type="xsd:string" />
         <element name="updateCount" type="xsd:int" />
         <element name="DTD" nillable="true" type="xsd:string" />
         <element name="schema" nillable="true" type="xsd:string" />
      </sequence>
   </complexType>
</schema>
</wsdl:types>

Client-side generation of holder classes

When you expose a component that uses EAServer-specific holder types as a Web service, the convention for generating the client-side holders classes is that they are always generated under a package.holders.type hierarchy. For example, when you expose a component as a Web service that uses holder type BCD.MoneyHolder, the conversion on the client-side results in a JAX-RPC specific holder contained under BCD.holders.MoneyHolder. You cannot use EAServer specific types on the Web service client side.





Copyright © 2005. Sybase Inc. All rights reserved. Custom datatypes and mappings