FileDocCategorySizeDatePackage
ElementSerializer.javaAPI DocApache Axis 1.42688Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding.ser

ElementSerializer

public class ElementSerializer extends Object implements org.apache.axis.encoding.Serializer
Serializer for DOM elements
author
Glen Daniels (gdaniels@apache.org) Modified by @author Rich scheuerle

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetMechanismType()

 return Constants.AXIS_SAX; 
public voidserialize(javax.xml.namespace.QName name, org.xml.sax.Attributes attributes, java.lang.Object value, org.apache.axis.encoding.SerializationContext context)
Serialize a DOM Element

        if (!(value instanceof Element))
            throw new IOException(Messages.getMessage("cantSerialize01"));

        MessageContext mc = context.getMessageContext();
        context.setWriteXMLType(null);
        boolean writeWrapper = (mc == null) ||
                mc.isPropertyTrue("writeWrapperForElements", true);
        if (writeWrapper)
            context.startElement(name, attributes);
        context.writeDOMElement((Element)value);
        if (writeWrapper)
            context.endElement();
    
public org.w3c.dom.ElementwriteSchema(java.lang.Class javaType, org.apache.axis.wsdl.fromJava.Types types)
Return XML schema for the specified type, suitable for insertion into the <types> element of a WSDL document, or underneath an <element> or <attribute> declaration.

param
javaType the Java Class we're writing out schema for
param
types the Java2WSDL Types object which holds the context for the WSDL being generated.
return
a type element containing a schema simpleType/complexType
see
org.apache.axis.wsdl.fromJava.Types

        return null;