Qt-based BB10 API Examples Documentation

Contents

QtSoapQName Class Reference

The QtSoapQName class provides a wrapper for QNames (names with namespaces). More...

    #include <QtSoapQName>

Public Functions

QtSoapQName ( const QString & name = QString::null, const QString & uri = QString::null )
~QtSoapQName ()
QString name () const
QString uri () const
QtSoapQName & operator= ( const QString & s )

Related Non-Members

bool operator< ( const QtSoapQName & s1, const QtSoapQName & s2 )
bool operator== ( const QtSoapQName & s1, const QtSoapQName & s2 )

Detailed Description

The QtSoapQName class provides a wrapper for QNames (names with namespaces).

This class is used extensively in QtSoap to define and identify header and body elements, including method and argument names.

The QtSoapQName consists of a name and a URI. The URI is used as the name's namespace, i.e. the name is qualified (hence 'Q'-Name) by the URI. The name() and uri() functions return the QNames's name and URI.

The QtSoapQName can be empty. It can also have just a name with no URI. Special handling is often applied to a QtSoapQName that has no URI. Typically, if a QName with no namespace is used in an element in a SOAP document that already has a default namespace defined, then that namespace will be applied to the QName.

    QtSoapMessage message;

    message.setMethod(QtSoapQName("sendMessage", "http://messenging.example.com/"));
    message.addMethodArgument(QtSoapSimpleType(QtSoapQName("a"), 15));

Member Function Documentation

QtSoapQName::QtSoapQName ( const QString & name = QString::null, const QString & uri = QString::null )

Constructs a QName. Sets the QName name to name and the URI to uri.

QtSoapQName::~QtSoapQName ()

Destructs the QtSoapQName.

QString QtSoapQName::name () const

Returns QName's name.

QString QtSoapQName::uri () const

Returns the QName's URI.

QtSoapQName & QtSoapQName::operator= ( const QString & s )

Sets the QName's name to s, and sets the URI to an empty string.

Related Non-Members

bool operator< ( const QtSoapQName & s1, const QtSoapQName & s2 )

If s2 has a non-empty URI, this function returns true if the merge of the URI and the name of s1 is lexically less than that of s2; otherwise it returns false.

If s2 has an empty URI, this function returns true if the name of s1 is lexically less than the name of s2; otherwise it returns false.

The comparison is case-insensitive.

bool operator== ( const QtSoapQName & s1, const QtSoapQName & s2 )

If s2 has a non-empty URI, this function returns true if the merge of the URI and the name of s1 is equal to that of s2; otherwise it returns false.

If s2 has an empty URI, this function returns true if the name of s1 is equal to the name of s2; otherwise it returns false.

The comparison is case-insensitive.