Java Tutorial - Java Scipt : Data-Type Marshaling

Java Tutorial - Java Scipt :

Data-Type Marshaling


Data-type marshaling is still tricky with SOAP. Serializers handle common data types such as strings, floats, integers, and so on. However, there are still potential compatibility problems when serializing and deserializing complex types across different platforms. To be safe, try to compose complex types from the common data types. Otherwise, you may end up with having to troubleshoot cross-platform issues! Table 11.1 lists the XML Schema and Java data types.

Nillable values, the WSDL version of a Java variable that can be null, are always represented by the Java object equivalent (that is, a nillable xsd:int maps to an Integer object).

Care must be taken as far as what objects can be serialized in a SOAP message. Naturally, objects that refer to local resources should never be passed. These include GUI objects, I/O handles, and database objects. It’s important to note that just because an object is Java serializable doesn’t imply that it can be used in a cross-platform, interoperable manner