KD SOAP API Documentation 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDSoapMessage Class Reference

#include <KDSoapMessage.h>

Inheritance diagram for KDSoapMessage:
Inheritance graph
[legend]
Collaboration diagram for KDSoapMessage:
Collaboration graph
[legend]

Public Member Functions

 KDSoapMessage ()
 
 KDSoapMessage (const KDSoapMessage &other)
 
 ~KDSoapMessage ()
 
void addArgument (const QString &argumentName, const KDSoapValueList &argumentValueList, const QString &typeNameSpace=QString(), const QString &typeName=QString())
 
void addArgument (const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
 
KDSoapValueListarguments ()
 
const KDSoapValueListarguments () const
 
void createFaultMessage (const QString &faultCode, const QString &faultText, KDSoap::SoapVersion soapVersion)
 
QString faultAsString () const
 
bool hasMessageAddressingProperties () const
 
bool isFault () const
 
KDSoapMessageAddressingProperties messageAddressingProperties () const
 
bool operator!= (const KDSoapMessage &other) const
 
KDSoapMessageoperator= (const KDSoapMessage &other)
 
KDSoapMessageoperator= (const KDSoapValue &other)
 
bool operator== (const KDSoapMessage &other) const
 
void setFault (bool fault)
 
void setMessageAddressingProperties (const KDSoapMessageAddressingProperties &map)
 
void setUse (Use use)
 
Use use () const
 
- Public Member Functions inherited from KDSoapValue
 KDSoapValue ()
 
 KDSoapValue (const KDSoapValue &other)
 
 KDSoapValue (const QString &name, const KDSoapValueList &childValues, const QString &typeNameSpace=QString(), const QString &typeName=QString())
 
 KDSoapValue (const QString &name, const QVariant &valueVariant, const QString &typeNameSpace=QString(), const QString &typeName=QString())
 
 ~KDSoapValue ()
 
void addNamespaceDeclaration (const QXmlStreamNamespaceDeclaration &namespaceDeclaration)
 
KDSoapValueListchildValues () const
 
QXmlStreamNamespaceDeclarations environmentNamespaceDeclarations () const
 
bool isNil () const
 
bool isNull () const
 
bool isQualified () const
 
QString name () const
 
QXmlStreamNamespaceDeclarations namespaceDeclarations () const
 
QString namespaceUri () const
 
bool operator!= (const KDSoapValue &other) const
 
KDSoapValueoperator= (const KDSoapValue &other)
 
bool operator== (const KDSoapValue &other) const
 
void setEnvironmentNamespaceDeclarations (const QXmlStreamNamespaceDeclarations &environmentNamespaceDeclarations)
 
void setNamespaceDeclarations (const QXmlStreamNamespaceDeclarations &namespaceDeclarations)
 
void setNamespaceUri (const QString &ns)
 
void setNillable (bool nillable)
 
void setQualified (bool qualified)
 
void setType (const QString &nameSpace, const QString &type)
 
void setValue (const QVariant &value)
 
KDSoapValueList split () const
 
void swap (KDSoapValue &other)
 
QByteArray toXml (Use use=LiteralUse, const QString &messageNamespace=QString()) const
 
QString type () const
 
QString typeNs () const
 
QVariant value () const
 

Additional Inherited Members

- Public Types inherited from KDSoapValue
enum  Use { LiteralUse , EncodedUse }
 
- Protected Member Functions inherited from KDSoapValue
void setName (const QString &name)
 

Detailed Description

The KDSoapMessage class represents one message sent or received via SOAP.

Definition at line 28 of file KDSoapMessage.h.

Constructor & Destructor Documentation

◆ KDSoapMessage() [1/2]

KDSoapMessage::KDSoapMessage ( )

Constructs an empty KDSoapMessage object.

Definition at line 34 of file KDSoapMessage.cpp.

Referenced by createFaultMessage().

◆ ~KDSoapMessage()

KDSoapMessage::~KDSoapMessage ( )

Destructs the KDSoapMessage object.

Definition at line 68 of file KDSoapMessage.cpp.

◆ KDSoapMessage() [2/2]

KDSoapMessage::KDSoapMessage ( const KDSoapMessage other)

Constructs a copy of the object given by other.

Definition at line 39 of file KDSoapMessage.cpp.

Member Function Documentation

◆ addArgument() [1/2]

void KDSoapMessage::addArgument ( const QString argumentName,
const KDSoapValueList argumentValueList,
const QString typeNameSpace = QString(),
const QString typeName = QString() 
)

Adds a complex-type argument to the message.

Parameters
argumentNamethe argument name (which corresponds to the element or attribute name in the XML)
argumentValueListKDSoapValueList of child values.
typeNameSpacenamespace of the type of this value; this is only useful if using KDSoapMessage::EncodedUse
typeNamelocalname of the type of this value; this is only useful if using KDSoapMessage::EncodedUse

Equivalent to

arguments().append(KDSoapValue(argumentName, argumentValueList [, typeNameSpace, typeName] ));
KDSoapValueList & arguments()
void append(const T &value)

If the message isQualified(), the value will be set to qualified as well, for convenience.

Definition at line 81 of file KDSoapMessage.cpp.

References QList::append(), KDSoapValue::childValues(), KDSoapValue::isQualified(), and KDSoapValue::setQualified().

◆ addArgument() [2/2]

void KDSoapMessage::addArgument ( const QString argumentName,
const QVariant argumentValue,
const QString typeNameSpace = QString(),
const QString typeName = QString() 
)

Adds an argument to the message.

Parameters
argumentNamethe argument name (which corresponds to the element or attribute name in the XML)
argumentValuethis QVariant can hold either a simple value, or a KDSoapValueList of child values. (the KDSoapValueList support is mostly for the convenience of the kdwsdl2cpp generated code)
typeNameSpacenamespace of the type of this value; this is only useful if using KDSoapMessage::EncodedUse
typeNamelocalname of the type of this value; this is only useful if using KDSoapMessage::EncodedUse

Equivalent to

arguments().addArgument(argumentName, argumentValue [, typeNameSpace, typeName] );
void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())

If the message isQualified(), the value will be set to qualified as well, for convenience.

Definition at line 72 of file KDSoapMessage.cpp.

References QList::append(), KDSoapValue::childValues(), KDSoapValue::isQualified(), and KDSoapValue::setQualified().

Referenced by createFaultMessage().

◆ arguments() [1/2]

KDSoapValueList & KDSoapMessage::arguments ( )

Returns the arguments for the message. The list can be modified, in order to modify the message.

Definition at line 95 of file KDSoapMessage.cpp.

References KDSoapValue::childValues().

◆ arguments() [2/2]

const KDSoapValueList & KDSoapMessage::arguments ( ) const

Returns the arguments for the message. The list is readonly; useful for inspecting a response.

Definition at line 100 of file KDSoapMessage.cpp.

References KDSoapValue::childValues().

◆ createFaultMessage()

void KDSoapMessage::createFaultMessage ( const QString faultCode,
const QString faultText,
KDSoap::SoapVersion  soapVersion 
)

Turns this message into a "fault" message, using the given code and description. This encapsulates the differences between SOAP 1.1 and 1.2. Used internally, and by server implementations that handle dynamic calls

Since
1.8

Definition at line 154 of file KDSoapMessage.cpp.

References KDSoapMessage(), addArgument(), KDSoapValueList::addArgument(), QString::fromLatin1(), KDSoapValue::setName(), KDSoapValue::setNamespaceUri(), KDSoap::SOAP1_2, KDSoapNamespaceManager::soapEnvelope(), and KDSoapNamespaceManager::soapEnvelope200305().

Referenced by KDSoapPendingCall::Private::parseReply(), KDSoapServerObjectInterface::processRequest(), KDSoapServerObjectInterface::processRequestWithPath(), and KDSoapMessageReader::xmlToMessage().

◆ faultAsString()

QString KDSoapMessage::faultAsString ( ) const

◆ hasMessageAddressingProperties()

bool KDSoapMessage::hasMessageAddressingProperties ( ) const

Return whether a KDSoapMessageAddressingProperties has been set for this KDSoapMessage

Since
1.5

Definition at line 185 of file KDSoapMessage.cpp.

Referenced by KDSoapMessageWriter::messageToXml().

◆ isFault()

bool KDSoapMessage::isFault ( ) const
Returns
true if this message is a "fault" message, or if an error occurred while parsing the XML.

A fault message is the message returned by a SOAP server when an error occurred in the processing of the request.

Definition at line 110 of file KDSoapMessage.cpp.

Referenced by KDSoapMessageWriter::messageToXml(), and KDSoapPendingCall::Private::parseReply().

◆ messageAddressingProperties()

KDSoapMessageAddressingProperties KDSoapMessage::messageAddressingProperties ( ) const

Return the messageAddressingProperties related to the KDSoapMessage

See also
KDSoapMessageAddressingProperties
Since
1.5

Definition at line 174 of file KDSoapMessage.cpp.

Referenced by KDSoapMessageWriter::messageToXml(), and KDSoapClientInterfacePrivate::prepareRequestBuffer().

◆ operator!=()

bool KDSoapMessage::operator!= ( const KDSoapMessage other) const

Compares two KDSoapMessages

Definition at line 63 of file KDSoapMessage.cpp.

◆ operator=() [1/2]

KDSoapMessage & KDSoapMessage::operator= ( const KDSoapMessage other)

Copies the contents of the object given by other.

Definition at line 45 of file KDSoapMessage.cpp.

References KDSoapValue::operator=().

◆ operator=() [2/2]

KDSoapMessage & KDSoapMessage::operator= ( const KDSoapValue other)

Fills in KDSoapMessage from a KDSoapValue.

Definition at line 52 of file KDSoapMessage.cpp.

References KDSoapValue::operator=().

◆ operator==()

bool KDSoapMessage::operator== ( const KDSoapMessage other) const

Compares two KDSoapMessages

Definition at line 58 of file KDSoapMessage.cpp.

References KDSoapValue::operator==().

◆ setFault()

void KDSoapMessage::setFault ( bool  fault)

Turns this message into a "fault" message. Normally this is only used in server implementations that handle dynamic calls.

Definition at line 149 of file KDSoapMessage.cpp.

Referenced by KDSoapMessageReader::xmlToMessage().

◆ setMessageAddressingProperties()

void KDSoapMessage::setMessageAddressingProperties ( const KDSoapMessageAddressingProperties map)

Attach to a KDSoapMessage the message addressing properties that will be written in its header. Calling this will make hasMessageAddressingProperties() return true.

Since
1.5

Definition at line 179 of file KDSoapMessage.cpp.

Referenced by KDSoapClientInterfacePrivate::prepareRequestBuffer(), and KDSoapMessageReader::xmlToMessage().

◆ setUse()

void KDSoapMessage::setUse ( Use  use)

Define the way the message should be serialized. The default value is LiteralUse.

Definition at line 195 of file KDSoapMessage.cpp.

References use().

◆ use()

KDSoapMessage::Use KDSoapMessage::use ( ) const

Returns the value passed to setUse().

Definition at line 190 of file KDSoapMessage.cpp.

Referenced by KDSoapMessageWriter::messageToXml(), and setUse().


The documentation for this class was generated from the following files:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/
Generated on Sat Apr 20 2024 00:04:25 for KD SOAP API Documentation by doxygen 1.9.8