Poco::RemotingNG::SOAP

class Serializer

File Information

Library: RemotingNG/SOAP
Package: SOAP
Header: Poco/RemotingNG/SOAP/Serializer.h

Description

The Serializer implementation for the SOAP Transport.

The serializer creates an XML stream according to SOAP 1.1/1.2 Document/Literal message format.

The serializer can also be used to serialize plain XML. To do so, instead of serializeMessageBegin() and serializeMessageEnd(), call serializeStructBegin() and serializeStructEnd(), respectively, at the root level, after calling setup().

Inheritance

Direct Base Classes: Poco::RemotingNG::Serializer

All Base Classes: Poco::RemotingNG::Serializer, Poco::RemotingNG::SerializerBase

Member Summary

Member Functions: createMTOMContentType, enableMTOM, getOptions, getSOAPVersion, isMTOMEnabled, pushAttribute, registerNamespace, resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeOptionalBegin, serializeOptionalEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, setOptions, setSOAPVersion, setupImpl

Inherited Functions: clearProperties, getProperty, hasProperty, popProperty, pushAttribute, pushProperty, registerNamespace, reset, resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeOptionalBegin, serializeOptionalEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, setup, setupImpl

Enumerations

Anonymous

MIN_MTOM_SIZE = 64

Options

OPT_PRETTY_PRINT = 0x01

Pretty-print XML messages.

OPT_DECLARE_SOAPENC_NAMESPACE = 0x02

Add a namespace prefix declaration for the "http://schemas.xmlsoap.org/soap/encoding/" namespace to the SOAP envelope.

OPT_NO_ENCODINGSTYLE_ATTRIBUTE = 0x04

Do not include the "encodingStyle" attribute in the SOAP envelope.

SOAPVersion

SOAP_1_1 = 11

SOAP_1_2 = 12

Constructors

Serializer

Serializer(
    int options = 0
);

Creates the Serializer for SOAP 1.1.

Serializer

Serializer(
    SOAPVersion soapVersion,
    int options = 0
);

Creates the Serializer for the given SOAP version.

Destructor

~Serializer virtual

~Serializer();

Destroys the Serializer.

Member Functions

createMTOMContentType

std::string createMTOMContentType(
    const std::string & action = EMPTYSTRING
);

Creates the Content-Type value for an MTOM message containing the MIME boundary and start content ID.

enableMTOM

void enableMTOM(
    bool enable
);

Enables or disables MTOM.

getOptions inline

int getOptions() const;

Returns the serializer option flags. See the Options enum for supported flags.

getSOAPVersion inline

SOAPVersion getSOAPVersion() const;

Returns the SOAP version used for serialization.

isMTOMEnabled

bool isMTOMEnabled() const;

Returns true iff MTOM is enabled.

pushAttribute virtual

void pushAttribute(
    const std::string & ns,
    const std::string & attrName
);

registerNamespace virtual

void registerNamespace(
    const std::string & ns
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int8 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt8 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int16 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt16 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int32 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt32 val
);

serialize virtual

void serialize(
    const std::string & name,
    long val
);

serialize virtual

void serialize(
    const std::string & name,
    unsigned long val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::Int64 val
);

serialize virtual

void serialize(
    const std::string & name,
    Poco::UInt64 val
);

serialize virtual

void serialize(
    const std::string & name,
    float val
);

serialize virtual

void serialize(
    const std::string & name,
    double val
);

serialize virtual

void serialize(
    const std::string & name,
    bool val
);

serialize virtual

void serialize(
    const std::string & name,
    char val
);

serialize virtual

void serialize(
    const std::string & name,
    const std::string & val
);

serialize virtual

void serialize(
    const std::string & name,
    const std::vector < char > & val
);

serialize virtual

void serialize(
    const std::string & name,
    const Poco::DateTime & val
);

serialize virtual

void serialize(
    const std::string & name,
    const Poco::LocalDateTime & val
);

serializeFaultMessage virtual

void serializeFaultMessage(
    const std::string & name,
    const Poco::Exception & exc
);

serializeMessageBegin

void serializeMessageBegin(
    const std::string & name,
    Poco::RemotingNG::SerializerBase::MessageType type
);

serializeMessageEnd

void serializeMessageEnd(
    const std::string & name,
    Poco::RemotingNG::SerializerBase::MessageType type
);

serializeNullableBegin virtual

void serializeNullableBegin(
    const std::string & name,
    bool isNull
);

serializeNullableEnd virtual

void serializeNullableEnd(
    const std::string & name
);

serializeOptionalBegin virtual

void serializeOptionalBegin(
    const std::string & name,
    bool isOptional
);

serializeOptionalEnd virtual

void serializeOptionalEnd(
    const std::string & name
);

serializeSequenceBegin virtual

void serializeSequenceBegin(
    const std::string & name,
    Poco::UInt32 numElems
);

serializeSequenceEnd virtual

void serializeSequenceEnd(
    const std::string & name
);

serializeStructBegin virtual

void serializeStructBegin(
    const std::string & name
);

serializeStructEnd virtual

void serializeStructEnd(
    const std::string & name
);

setOptions

void setOptions(
    int options
);

Sets the serializer option flags. See the Options enum for supported flags.

setSOAPVersion

void setSOAPVersion(
    SOAPVersion version
);

Sets the SOAP version used for serialization.

Note that this method must not be called after serialization has started.

resetImpl protected virtual

void resetImpl();

setupImpl protected virtual

void setupImpl(
    std::ostream & out
);

Variables

CODE static

static const std::string CODE;

CODEVALUERECEIVER static

static const std::string CODEVALUERECEIVER;

CODE_VALUE static

static const std::string CODE_VALUE;

DETAIL static

static const std::string DETAIL;

DETAIL12 static

static const std::string DETAIL12;

DETAIL_CODE static

static const std::string DETAIL_CODE;

DETAIL_EXCEPTION static

static const std::string DETAIL_EXCEPTION;

DETAIL_MESSAGE static

static const std::string DETAIL_MESSAGE;

DETAIL_TYPE static

static const std::string DETAIL_TYPE;

EMPTYATTRIBUTES static

static const XML::AttributesImpl EMPTYATTRIBUTES;

EMPTYSTRING static

static const std::string EMPTYSTRING;

ENCODINGSTYLE static

static const std::string ENCODINGSTYLE;

ENVELOPE static

static const std::string ENVELOPE;

FAULT static

static const std::string FAULT;

FAULTCODE static

static const std::string FAULTCODE;

FAULTCODESERVER static

static const std::string FAULTCODESERVER;

FAULTSTRING static

static const std::string FAULTSTRING;

LANG static

static const std::string LANG;

REASON static

static const std::string REASON;

REASON_TEXT static

static const std::string REASON_TEXT;

REMOTINGNAMESPACE static

static const std::string REMOTINGNAMESPACE;

REMOTINGPREFIX static

static const std::string REMOTINGPREFIX;

REPLY static

static const std::string REPLY;

SOAP11NAMESPACE static

static const std::string SOAP11NAMESPACE;

SOAP12NAMESPACE static

static const std::string SOAP12NAMESPACE;

SOAPBODY static

static const std::string SOAPBODY;

SOAPENCODINGNAMESPACE static

static const std::string SOAPENCODINGNAMESPACE;

SOAPENCPREFIX static

static const std::string SOAPENCPREFIX;

SOAPHEADER static

static const std::string SOAPHEADER;

SOAPPREFIX static

static const std::string SOAPPREFIX;

VAL_FALSE static

static const std::string VAL_FALSE;

VAL_TRUE static

static const std::string VAL_TRUE;

XOPHREF static

static const std::string XOPHREF;

XOPINCLUDE static

static const std::string XOPINCLUDE;

XOPNAMESPACE static

static const std::string XOPNAMESPACE;

XSINAMESPACE static

static const std::string XSINAMESPACE;

XSINIL static

static const std::string XSINIL;

XSIPREFIX static

static const std::string XSIPREFIX;