KD SOAP: KDSoapValueList Class Reference

| KD SOAP 1.9.1

Public Member Functions | List of all members
KDSoapValueList Class Reference

`#include <KDSoapValue.h>`

Inherits QList< KDSoapValue >.

## Public Member Functions
void | addArgument (const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
KDSoapValue | child (const QString &name) const
void | setArrayType (const QString &nameSpace, const QString &type)
QString | arrayTypeNs () const
QString | arrayType () const
QList< KDSoapValue > & | attributes ()
const QList< KDSoapValue > & | attributes () const

## Detailed Description

KDSoapValueList represents a list of arguments passed to a SOAP message.

In other words, it corresponds to a list of XML elements in a SOAP message. It also supports XML attributes.

## Member Function Documentation

## ◆ addArgument()

void KDSoapValueList::addArgument | ( | const QString & | argumentName,
|  | const QVariant & | argumentValue,
|  | const QString & | typeNameSpace = `QString()`,
|  | const QString & | typeName = `QString()`
| ) |  |

Convenience method for adding an argument to the list.

Parameters

  argumentName | the argument name (which corresponds to the element or attribute name in the XML)
  argumentValue | the value of the argument
  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

Note that this doesn't allow to call KDSoapValue::setQualified() or KDSoapValue::setNamespaceUri() on the value.

Equivalent to

append(KDSoapValue(argumentName, argumentValue [, typeNameSpace, typeName] ));

## ◆ child()

KDSoapValue KDSoapValueList::child | ( | const QString & | name | ) | const

Convenience method for extracting a child argument by `name`. If multiple arguments have the same name, the first match is returned. This method mostly makes sense for the case where only one argument uses `name`.

If no such argument can be found, returns a null KDSoapValue.

## ◆ setArrayType()

void KDSoapValueList::setArrayType | ( | const QString & | nameSpace,
|  | const QString & | type
| ) |  |

Sets the type of the elements in this array.

This is sent as the `soap-enc`:arrayType attribute in the XML.

Parameters

  nameSpace | namespace of the type of this value
  type | localname of the type of this value

## ◆ arrayTypeNs()

QString KDSoapValueList::arrayTypeNs | ( |  | ) | const

Return the namespace of the type of elements in the array.

## ◆ arrayType()

QString KDSoapValueList::arrayType | ( |  | ) | const

Return the localname of the type of elements in the array.

## ◆ attributes() [1/2]

QList<KDSoapValue>& KDSoapValueList::attributes | ( |  | ) |
| inline

Returns the list of attributes. Just like the QList which is KDSoapValueList contains the child elements for a parent XML element; the attributes QList is the attributes for that same parent XML element. Note that this is rarely used in SOAP messages though.

The returned list can be modified, e.g. to append new attributes.

## ◆ attributes() [2/2]

const QList<KDSoapValue>& KDSoapValueList::attributes | ( |  | ) | const
| inline

Read-only getter for the attributes.

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

- src/KDSoapClient/KDSoapValue.h
- src/KDSoapClient/KDSoapValue.cpp

KDSoapValue
Definition: KDSoapValue.h:77

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/