Library: RemotingNG/SOAP
Package: SOAP
Header: Poco/RemotingNG/SOAP/Serializer.h
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().
Direct Base Classes: Poco::RemotingNG::Serializer
All Base Classes: Poco::RemotingNG::Serializer, Poco::RemotingNG::SerializerBase
Member Functions: createMTOMContentType, enableMTOM, getSOAPVersion, isMTOMEnabled, pushAttribute, registerNamespace, resetImpl, serialize, serializeFaultMessage, serializeMessageBegin, serializeMessageEnd, serializeNullableBegin, serializeNullableEnd, serializeOptionalBegin, serializeOptionalEnd, serializeSequenceBegin, serializeSequenceEnd, serializeStructBegin, serializeStructEnd, 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
MIN_MTOM_SIZE = 64
SOAP_1_1 = 11
SOAP_1_2 = 12
Serializer(
bool prettyPrint = false
);
Creates the Serializer for SOAP 1.1.
If prettyPrint is true, XML messages will be pretty-printed.
Serializer(
SOAPVersion soapVersion,
bool prettyPrint = false
);
Creates the Serializer for the given SOAP version.
If prettyPrint is true, XML messages will be pretty-printed.
~Serializer();
Destroys the Serializer.
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.
void enableMTOM(
bool enable
);
Enables or disables MTOM.
SOAPVersion getSOAPVersion() const;
Returns the SOAP version used for serialization.
bool isMTOMEnabled() const;
Returns true if and only if MTOM is enabled.
void pushAttribute(
const std::string & ns,
const std::string & attrName
);
void registerNamespace(
const std::string & ns
);
void serialize(
const std::string & name,
Poco::Int8 val
);
void serialize(
const std::string & name,
Poco::UInt8 val
);
void serialize(
const std::string & name,
Poco::Int16 val
);
void serialize(
const std::string & name,
Poco::UInt16 val
);
void serialize(
const std::string & name,
Poco::Int32 val
);
void serialize(
const std::string & name,
Poco::UInt32 val
);
void serialize(
const std::string & name,
long val
);
void serialize(
const std::string & name,
unsigned long val
);
void serialize(
const std::string & name,
float val
);
void serialize(
const std::string & name,
double val
);
void serialize(
const std::string & name,
bool val
);
void serialize(
const std::string & name,
char val
);
void serialize(
const std::string & name,
const char * pVal
);
void serialize(
const std::string & name,
const std::string & val
);
void serialize(
const std::string & name,
const std::vector < char > & val
);
void serializeFaultMessage(
const std::string & name,
Poco::Exception & exc
);
void serializeMessageBegin(
const std::string & name,
Poco::RemotingNG::SerializerBase::MessageType type
);
void serializeMessageEnd(
const std::string & name,
Poco::RemotingNG::SerializerBase::MessageType type
);
void serializeNullableBegin(
const std::string & name,
bool isNull
);
void serializeNullableEnd(
const std::string & name
);
void serializeOptionalBegin(
const std::string & name,
bool isOptional
);
void serializeOptionalEnd(
const std::string & name
);
void serializeSequenceBegin(
const std::string & name,
Poco::UInt32 numElems
);
void serializeSequenceEnd(
const std::string & name
);
void serializeStructBegin(
const std::string & name
);
void serializeStructEnd(
const std::string & name
);
void setSOAPVersion(
SOAPVersion version
);
Sets the SOAP version used for serialization.
Note that this method must not be called after serialization has started.
void resetImpl();
void setupImpl(
std::ostream & out
);
static const std::string CODE;
static const std::string CODEVALUERECEIVER;
static const std::string CODE_VALUE;
static const XML::AttributesImpl EMPTYATTRIBUTES;
static const std::string EMPTYSTRING;
static const std::string ENCODINGSTYLE;
static const std::string ENVELOPE;
static const std::string FAULT;
static const std::string FAULTCODE;
static const std::string FAULTCODESERVER;
static const std::string FAULTSTRING;
static const std::string LANG;
static const std::string REASON;
static const std::string REASON_TEXT;
static const std::string REPLY;
static const std::string SOAP11NAMESPACE;
static const std::string SOAP12NAMESPACE;
static const std::string SOAPBODY;
static const std::string SOAPENCODINGNAMESPACE;
static const std::string SOAPHEADER;
static const std::string SOAPPREFIX;
static const std::string VAL_FALSE;
static const std::string VAL_TRUE;
static const std::string XOPHREF;
static const std::string XOPINCLUDE;
static const std::string XOPNAMESPACE;
static const std::string XSINAMESPACE;
static const std::string XSINIL;
static const std::string XSIPREFIX;