KD SOAP API Documentation  2.1
Public Member Functions | List of all members
KDSoapValueList Class Reference

#include <KDSoapValue.h>

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

Public Member Functions

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

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.

Definition at line 320 of file KDSoapValue.h.

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
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] ));

Definition at line 452 of file KDSoapValue.cpp.

Referenced by KDSoapMessage::createFaultMessage().

◆ arrayType()

QString KDSoapValueList::arrayType ( ) const

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

Definition at line 447 of file KDSoapValue.cpp.

◆ arrayTypeNs()

QString KDSoapValueList::arrayTypeNs ( ) const

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

Definition at line 442 of file KDSoapValue.cpp.

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

Definition at line 375 of file KDSoapValue.h.

Referenced by operator<<(), and parseElement().

◆ attributes() [2/2]

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

Read-only getter for the attributes.

Definition at line 382 of file KDSoapValue.h.

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

Definition at line 427 of file KDSoapValue.cpp.

Referenced by KDSoapMessage::faultAsString().

◆ 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
nameSpacenamespace of the type of this value
typelocalname of the type of this value

Definition at line 437 of file KDSoapValue.cpp.


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

© 2010-2022 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 Tue Jun 13 2023 12:18:34 for KD SOAP API Documentation by doxygen 1.9.1