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

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

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

Equivalent to

append(KDSoapValue(argumentName, argumentValue [, typeNameSpace, typeName] ));
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.

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
nameSpacenamespace of the type of this value
typelocalname of the type of this value
QString KDSoapValueList::arrayTypeNs ( ) const

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

QString KDSoapValueList::arrayType ( ) const

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

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.

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

Read-only getter for the attributes.


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/