Supported data contract types

Primitives

  • All C# simple types are mapped into Java primitives.
  • All nullable C# simple types are mapped into Java primitives object wrappers.
  • GUID is mapped into java.util.UUID
  • DateTime is mapped into java.util.Date
  • When UUID/Date type parameters pass null values and respectively GUID/DateTime value types are expected, NotNullableException is instantly thrown.
  • Decimal is mapped into double (planned mapping into BigDecimal )
The complete list of mappings:

C# type Java type
String String
Boolean boolean
Byte byte
Double double
Decimal double
Single float
Int16 short
Int32 int
Int64 long
Char char
Boolean? Boolean
Byte? Byte
Double? Double
Decimal? Double
Single? Float
Int16? Short
Int32? Integer
Int64? Long
Char? Character
DateTime, DateTime? Date
GUID, GUID? UUID

Collections

  • All collections containing elements of type T are mapped into java.util.List<T> (java.util.ArrayList<T> implementation)
  • Dictionary<TKey,TValue> is mapped into java.util.Map<TKey,TValue> (java.util.HashMap<TKey,TValue> implementation)

Exceptions

  • When service operation has FaultContract attribute attached to it, the service client generator creates a class of that particular fault in a way like typical data contract classes are created
  • Created fault class inherits from java.lang.Exception and is thrown on client side whenever it is generated on the server side

Inheritance

  • Multiple-level data contract classes inheritance is fully supported.

Generic types

  • n/a

Last edited Oct 15, 2012 at 12:11 PM by marochm, version 6

Comments

No comments yet.