org.apache.wsif.providers.soap.apachesoap
Class JROMSerializer

java.lang.Object
  |
  +--org.apache.wsif.providers.soap.apachesoap.JROMSerializer
All Implemented Interfaces:
org.apache.soap.util.xml.Deserializer, org.apache.soap.util.xml.Serializer

public class JROMSerializer
extends java.lang.Object
implements org.apache.soap.util.xml.Serializer, org.apache.soap.util.xml.Deserializer

A JROMSerializer can be used to serialize and deserialize JROM Values using the SOAP-ENC encoding style. All JROMValues are created with their parent by using the factory's creator methods that take the parent as an argument. This is to allow top-down creation of JROM Values.

Author:
Rania Y. Khalaf , Owen Burroughs

Constructor Summary
JROMSerializer()
           
JROMSerializer(com.ibm.jrom.factory.JROMFactory factory)
           
 
Method Summary
 void marshall(java.lang.String inScopeEncStyle, java.lang.Class javaType, java.lang.Object src, java.lang.Object context, java.io.Writer sink, org.apache.soap.util.xml.NSStack nsStack, org.apache.soap.util.xml.XMLJavaMappingRegistry xjmr, org.apache.soap.rpc.SOAPContext ctx)
          Serialize JROMValues.
 org.apache.soap.util.Bean unmarshall(java.lang.String inScopeEncStyle, org.apache.soap.util.xml.QName elementType, org.w3c.dom.Node src, org.apache.soap.util.xml.XMLJavaMappingRegistry xjmr, org.apache.soap.rpc.SOAPContext ctx)
          Deserializer for JROM values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JROMSerializer

public JROMSerializer()

JROMSerializer

public JROMSerializer(com.ibm.jrom.factory.JROMFactory factory)
Method Detail

marshall

public void marshall(java.lang.String inScopeEncStyle,
                     java.lang.Class javaType,
                     java.lang.Object src,
                     java.lang.Object context,
                     java.io.Writer sink,
                     org.apache.soap.util.xml.NSStack nsStack,
                     org.apache.soap.util.xml.XMLJavaMappingRegistry xjmr,
                     org.apache.soap.rpc.SOAPContext ctx)
              throws java.lang.IllegalArgumentException,
                     java.io.IOException
Serialize JROMValues. For JROMSimpleValues, the internal JAVA value is extracted and is then serialized using the built-in schema to SOAP mappings and deserializers. For JROMComplexValues, a new element is formed with the type name as its type attribute, and its elements subsequently serialized and set as child elements
Specified by:
marshall in interface org.apache.soap.util.xml.Serializer

unmarshall

public org.apache.soap.util.Bean unmarshall(java.lang.String inScopeEncStyle,
                                            org.apache.soap.util.xml.QName elementType,
                                            org.w3c.dom.Node src,
                                            org.apache.soap.util.xml.XMLJavaMappingRegistry xjmr,
                                            org.apache.soap.rpc.SOAPContext ctx)
                                     throws java.lang.IllegalArgumentException
Deserializer for JROM values. For simple types, the deserializing is handed to the parent SOAPMappingRegistry of the xjmr, which contains the internal schema to java mappings. Otherwise, a JROMComplexValue is created with the elementType as its type name, and the namespaceURI and tagName of the src as its name. The children of the src node are then also deserialized into JROMValues and set as that JROMComplexValue's Elements. Attributes are ignored.
Specified by:
unmarshall in interface org.apache.soap.util.xml.Deserializer
Parameters:
elementType - QName containing type information.
xjmr - should be a SOAPMappingRegistry instance.


Copyright © 2002, 2002 Apache XML Project. All Rights Reserved.