KD SOAP: KDSoapMessage Class Reference

| KD SOAP 2.0.0

Public Member Functions | List of all members
KDSoapMessage Class Reference

`#include <KDSoapMessage.h>`

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

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

## Additional Inherited Members
Public Types inherited from KDSoapValue
enum | Use { LiteralUse, EncodedUse }

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ KDSoapMessage() [1/2]

KDSoapMessage::KDSoapMessage | ( |  | ) |

Constructs an empty KDSoapMessage object.

## ◆ ~KDSoapMessage()

KDSoapMessage::~KDSoapMessage | ( |  | ) |

Destructs the KDSoapMessage object.

## ◆ KDSoapMessage() [2/2]

KDSoapMessage::KDSoapMessage | ( | const KDSoapMessage & | other | ) |

Constructs a copy of the object given by `other`.

## Member Function Documentation

## ◆ operator=() [1/2]

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

Copies the contents of the object given by `other`.

## ◆ operator=() [2/2]

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

Fills in KDSoapMessage from a KDSoapValue.

## ◆ operator==()

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

Compares two KDSoapMessages

## ◆ operator!=()

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

Compares two KDSoapMessages

## ◆ setUse()

void KDSoapMessage::setUse | ( | Use | use | ) |

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

## ◆ use()

KDSoapMessage::Use KDSoapMessage::use | ( |  | ) | const

Returns the value passed to setUse().

## ◆ addArgument() [1/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

  argumentName | the argument name (which corresponds to the element or attribute name in the XML)
  argumentValue | this 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)
  typeNameSpace | namespace of the type of this value; this is only useful if using KDSoapMessage::EncodedUse
  typeName | localname of the type of this value; this is only useful if using KDSoapMessage::EncodedUse

Equivalent to

arguments().addArgument(argumentName, argumentValue [, typeNameSpace, typeName] );

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

## ◆ addArgument() [2/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

  argumentName | the argument name (which corresponds to the element or attribute name in the XML)
  argumentValueList | KDSoapValueList of child values.
  typeNameSpace | namespace of the type of this value; this is only useful if using KDSoapMessage::EncodedUse
  typeName | localname of the type of this value; this is only useful if using KDSoapMessage::EncodedUse

Equivalent to

arguments().append(KDSoapValue(argumentName, argumentValueList [, typeNameSpace, typeName] ));

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

## ◆ arguments() [1/2]

KDSoapValueList & KDSoapMessage::arguments | ( |  | ) |

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

## ◆ arguments() [2/2]

const KDSoapValueList & KDSoapMessage::arguments | ( |  | ) | const

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

## ◆ 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.

## ◆ faultAsString()

QString KDSoapMessage::faultAsString | ( |  | ) | const

Returns
  the fault message as a string that can be shown to the user.

## ◆ 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.

## ◆ 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

## ◆ 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

## ◆ hasMessageAddressingProperties()

bool KDSoapMessage::hasMessageAddressingProperties | ( |  | ) | const

Return whether a KDSoapMessageAddressingProperties has been set for this KDSoapMessage

Since
  1.5

## ◆ messageAddressingProperties()

KDSoapMessageAddressingProperties KDSoapMessage::messageAddressingProperties | ( |  | ) | const

Return the messageAddressingProperties related to the KDSoapMessage

See also
  KDSoapMessageAddressingProperties

Since
  1.5

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

- /home/allen/projects/kdsoap/src/KDSoapClient/KDSoapMessage.h
- /home/allen/projects/kdsoap/src/KDSoapClient/KDSoapMessage.cpp

QList::append
void append(const T &value)
KDSoapValueList::addArgument
void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
Definition: KDSoapValue.cpp:458
KDSoapMessage::arguments
KDSoapValueList & arguments()
Definition: KDSoapMessage.cpp:101
KDSoapValue::KDSoapValue
KDSoapValue()
Definition: KDSoapValue.cpp:60

© 2010-2021 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 Wed Jun 30 2021 18:19:27 for KD SOAP by doxygen 1.8.20