Class StructMapSerializer
- All Implemented Interfaces:
CombinedSerializer,Initializable,JAXRPCDeserializer,JAXRPCSerializer,SerializerConstants,Serializable,javax.xml.rpc.encoding.Deserializer,javax.xml.rpc.encoding.Serializer
- Author:
- JAX-RPC Development Team
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.sun.xml.rpc.encoding.SerializerBase
encodeType, encodingStyle, isNullable, typeFields inherited from interface com.sun.xml.rpc.encoding.SerializerConstants
DONT_ENCODE_TYPE, DONT_SERIALIZE_AS_REF, ENCODE_TYPE, NOT_NULLABLE, NOT_REFERENCEABLE, NULLABLE, REFERENCEABLE, REFERENCED_INSTANCE, SERIALIZE_AS_REF, UNREFERENCED_INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionStructMapSerializer(QName type, boolean encodeType, boolean isNullable, String encodingStyle) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectdoDeserialize(SOAPDeserializationState state, XMLReader reader, SOAPDeserializationContext context) Deserialize each element coming out ofreaderintostatewith the aid ofcontextprotected voiddoSerializeInstance(Object instance, XMLWriter writer, SOAPSerializationContext context) Serialize each data member ofobjintowriterwith the aid ofcontextvoidinitialize(InternalTypeMappingRegistry registry) Allows the implementors to retrieve and cache serializers during system intializationMethods inherited from class com.sun.xml.rpc.encoding.ObjectSerializerBase
deserialize, doSerializeAttributes, registerWithMemberState, serialize, serializeNullMethods inherited from class com.sun.xml.rpc.encoding.SerializerBase
decodeBoolean, deserialize, getEncodeType, getEncodingStyle, getID, getInnermostSerializer, getMechanismType, getName, getNullStatus, getType, getXmlType, isAcceptableType, isNullable, skipEmptyContent, typeIsEmpty, verifyName, verifyType
-
Field Details
-
registry
-
-
Constructor Details
-
StructMapSerializer
-
-
Method Details
-
initialize
Description copied from interface:InitializableAllows the implementors to retrieve and cache serializers during system intialization- Specified by:
initializein interfaceInitializable- Throws:
Exception- This exception may be thrown if there is a problem initializing
-
doSerializeInstance
protected void doSerializeInstance(Object instance, XMLWriter writer, SOAPSerializationContext context) throws Exception Description copied from class:ObjectSerializerBaseSerialize each data member ofobjintowriterwith the aid ofcontext- Specified by:
doSerializeInstancein classObjectSerializerBase- Throws:
Exception
-
doDeserialize
protected Object doDeserialize(SOAPDeserializationState state, XMLReader reader, SOAPDeserializationContext context) throws Exception Description copied from class:ObjectSerializerBaseDeserialize each element coming out ofreaderintostatewith the aid ofcontextExample:
protected Object doDeserialize(SOAPDeserializationState state, XMLReader reader, SOAPDeserializationContext context) throws Exception { Foo instance = new Foo(); Foo_SOAPBuilder builder = null; Object member; boolean isComplete = true; QName elementName; reader.nextElementContent(); elementName = reader.getName(); if (elementName.equals(FooMember_QNAME)) { // check to see if this is the name of the next expected member member = FooMemberDeserializer.deserialize(FooMember_QNAME, reader, context); if (member instanceof SOAPDeserializationState) { if (builder == null) { builder = new FooMemberBuilder(); } state = registerWithMemberState(instance, state, member, MEMBER_INDEX, builder); // MEMBER_INDEX is the index of the member within the object isComplete = false; } else { instance.setMember((FooMember)member); // "setMember" is whatever setter is appropriate for the member } } reader.nextElementContent(); XMLReaderUtil.verifyReaderState(reader, XMLReader.END); return (isComplete ? (Object)instance : (Object)state); }- Specified by:
doDeserializein classObjectSerializerBase- Throws:
Exception
-