You can convert objects to a wire format, or serialize the objects, before transmitting them. You can serialize objects for applications that use the Service Component Architecture (SCA) default binding.
To use non-JAXB serializable objects, you must specify a different wire format in the composite definition file. Specify the default binding element wireFormat.javaObject as a child element.
When wireFormat.javaObject is used, objects use Java™ serialization instead of XML and travel as a stream of bytes over the wire. This enables you to use, for example, non-JAXB serializable Enterprise JavaBeans™ with the default binding.
Using the incorrect wire format might cause a runtime exception in your application.
The following composite definition file configures Java serialization in the SCA default binding:
<?xml version="1.0" encoding="UTF-8"?> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://scajavaserialize" xmlns:sca="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06" name="sca-java-serialize-backend"> <component name="SCAJavaSerializationBackendComponent"> <implementation.java class="test.bindings.sca.SerializeBackendImpl"/> <service name="SerializeBackendService"> <interface.java interface="test.bindings.sca.SerializeBackendService" callbackInterface="test.bindings.sca.SerializeCallback"> <binding.sca> <sca:wireFormat.javaObject/> </binding.sca> <callback> <binding.sca> <sca:wireFormat.javaObject/> </binding.sca> </callback> </service> </component> </composite>
In this information ...Related concepts
| IBM Redbooks, demos, education, and more(Index) |