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: addHeaderInterceptor, createMTOMContentType, enableMTOM, getOptions, getSOAPVersion, isMTOMEnabled, pushAttribute, registerNamespace, removeHeaderInterceptor, 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
Nested Classes
class HeaderInterceptor
Subclasses of this class can be registered with the Serializer (via the Transport) to add additional elements to the SOAP envelope header.
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.
OPT_DECLARE_WSSE_NAMESPACE = 0x08
Add a namespace prefix declaration for the "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" and "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" namespaces to 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
~Serializer();
Destroys the Serializer.
Member Functions
addHeaderInterceptor
void addHeaderInterceptor(
HeaderInterceptor::Ptr pInterceptor
);
Adds a header interceptor which can be used to manipulate the SOAP Header element content, e.g. for adding a WS-Security header.
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
int getOptions() const;
Returns the serializer option flags. See the Options enum for supported flags.
getSOAPVersion
SOAPVersion getSOAPVersion() const;
Returns the SOAP version used for serialization.
isMTOMEnabled
bool isMTOMEnabled() const;
Returns true iff MTOM is enabled.
pushAttribute
void pushAttribute(
const std::string & ns,
const std::string & attrName
);
registerNamespace
void registerNamespace(
const std::string & ns
);
removeHeaderInterceptor
void removeHeaderInterceptor(
HeaderInterceptor::Ptr pInterceptor
);
Removes the given header interceptor.
serialize
void serialize(
const std::string & name,
Poco::Int8 val
);
serialize
void serialize(
const std::string & name,
Poco::UInt8 val
);
serialize
void serialize(
const std::string & name,
Poco::Int16 val
);
serialize
void serialize(
const std::string & name,
Poco::UInt16 val
);
serialize
void serialize(
const std::string & name,
Poco::Int32 val
);
serialize
void serialize(
const std::string & name,
Poco::UInt32 val
);
serialize
void serialize(
const std::string & name,
long val
);
serialize
void serialize(
const std::string & name,
unsigned long val
);
serialize
void serialize(
const std::string & name,
Poco::Int64 val
);
serialize
void serialize(
const std::string & name,
Poco::UInt64 val
);
serialize
void serialize(
const std::string & name,
float val
);
serialize
void serialize(
const std::string & name,
double val
);
serialize
void serialize(
const std::string & name,
bool val
);
serialize
void serialize(
const std::string & name,
char val
);
serialize
void serialize(
const std::string & name,
const std::string & val
);
serialize
void serialize(
const std::string & name,
const std::vector < char > & val
);
serialize
void serialize(
const std::string & name,
const Poco::DateTime & val
);
serialize
void serialize(
const std::string & name,
const Poco::LocalDateTime & val
);
serializeFaultMessage
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
void serializeNullableBegin(
const std::string & name,
bool isNull
);
serializeNullableEnd
void serializeNullableEnd(
const std::string & name
);
serializeOptionalBegin
void serializeOptionalBegin(
const std::string & name,
bool isOptional
);
serializeOptionalEnd
void serializeOptionalEnd(
const std::string & name
);
serializeSequenceBegin
void serializeSequenceBegin(
const std::string & name,
Poco::UInt32 numElems
);
serializeSequenceEnd
void serializeSequenceEnd(
const std::string & name
);
serializeStructBegin
void serializeStructBegin(
const std::string & name
);
serializeStructEnd
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
void resetImpl();
setupImpl
void setupImpl(
std::ostream & out
);
Variables
CODE
static const std::string CODE;
CODEVALUERECEIVER
static const std::string CODEVALUERECEIVER;
CODE_VALUE
static const std::string CODE_VALUE;
DETAIL
static const std::string DETAIL;
DETAIL12
static const std::string DETAIL12;
DETAIL_CODE
static const std::string DETAIL_CODE;
DETAIL_EXCEPTION
static const std::string DETAIL_EXCEPTION;
DETAIL_MESSAGE
static const std::string DETAIL_MESSAGE;
DETAIL_TYPE
static const std::string DETAIL_TYPE;
EMPTYATTRIBUTES
static const XML::AttributesImpl EMPTYATTRIBUTES;
EMPTYSTRING
static const std::string EMPTYSTRING;
ENCODINGSTYLE
static const std::string ENCODINGSTYLE;
ENVELOPE
static const std::string ENVELOPE;
FAULT
static const std::string FAULT;
FAULTCODE
static const std::string FAULTCODE;
FAULTCODESERVER
static const std::string FAULTCODESERVER;
FAULTSTRING
static const std::string FAULTSTRING;
LANG
static const std::string LANG;
REASON
static const std::string REASON;
REASON_TEXT
static const std::string REASON_TEXT;
REMOTINGNAMESPACE
static const std::string REMOTINGNAMESPACE;
REMOTINGPREFIX
static const std::string REMOTINGPREFIX;
REPLY
static const std::string REPLY;
SOAP11NAMESPACE
static const std::string SOAP11NAMESPACE;
SOAP12NAMESPACE
static const std::string SOAP12NAMESPACE;
SOAPBODY
static const std::string SOAPBODY;
SOAPENCODINGNAMESPACE
static const std::string SOAPENCODINGNAMESPACE;
SOAPENCPREFIX
static const std::string SOAPENCPREFIX;
SOAPHEADER
static const std::string SOAPHEADER;
SOAPPREFIX
static const std::string SOAPPREFIX;
VAL_FALSE
static const std::string VAL_FALSE;
VAL_TRUE
static const std::string VAL_TRUE;
WSSENAMESPACE
static const std::string WSSENAMESPACE;
WSSEPREFIX
static const std::string WSSEPREFIX;
WSUNAMESPACE
static const std::string WSUNAMESPACE;
WSUPREFIX
static const std::string WSUPREFIX;
XOPHREF
static const std::string XOPHREF;
XOPINCLUDE
static const std::string XOPINCLUDE;
XOPNAMESPACE
static const std::string XOPNAMESPACE;
XSINAMESPACE
static const std::string XSINAMESPACE;
XSINIL
static const std::string XSINIL;
XSIPREFIX
static const std::string XSIPREFIX;