KD SOAP API Documentation: KDSoapNamespacePrefixes_p.h Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
KDSoapNamespacePrefixes_p.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Soap project.
4**
5** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10#ifndef KDSOAPNAMESPACEPREFIXES_P_H
11#define KDSOAPNAMESPACEPREFIXES_P_H
12
13#include <QtCore/QMap>
14#include <QtCore/QXmlStreamWriter>
15
16#include "KDSoapClientInterface.h"
17#include "KDSoapMessageAddressingProperties.h"
18
19 class KDSoapNamespacePrefixes : public QMap<QString /*ns*/, QString /*prefix*/>
20{
21public:
22 void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version = KDSoap::SOAP1_1, bool messageAddressingEnabled = false,
23 KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace =
24 KDSoapMessageAddressingProperties::Addressing200508);
25
26 void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix)
27 {
28 // qDebug() << "writeNamespace" << ns << prefix;
29 insert(ns, prefix);
30 writer.writeNamespace(ns, prefix);
31 }
32 QString resolve(const QString &ns, const QString &localName) const
33 {
34 const QString prefix = value(ns);
35 if (prefix.isEmpty()) {
36 qWarning("ERROR: Namespace not found: %s (for localName %s)", qPrintable(ns), qPrintable(localName));
37 }
38 return prefix + QLatin1Char(':') + localName;
39 }
40};
41
42#endif // KDSOAPNAMESPACESPREFIXES_H
KDSoapClientInterface.h
KDSoapMessageAddressingProperties.h
KDSoapMessageAddressingProperties::KDSoapAddressingNamespace
KDSoapAddressingNamespace
Definition KDSoapMessageAddressingProperties.h:101
KDSoapMessageAddressingProperties::Addressing200508
@ Addressing200508
Definition KDSoapMessageAddressingProperties.h:105
KDSoapNamespacePrefixes
Definition KDSoapNamespacePrefixes_p.h:20
KDSoapNamespacePrefixes::writeStandardNamespaces
void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version=KDSoap::SOAP1_1, bool messageAddressingEnabled=false, KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace=KDSoapMessageAddressingProperties::Addressing200508)
Definition KDSoapNamespacePrefixes.cpp:14
KDSoapNamespacePrefixes::writeNamespace
void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix)
Definition KDSoapNamespacePrefixes_p.h:26
KDSoapNamespacePrefixes::resolve
QString resolve(const QString &ns, const QString &localName) const
Definition KDSoapNamespacePrefixes_p.h:32
KDSoap::SoapVersion
SoapVersion
Definition KDSoapValue.h:40
KDSoap::SOAP1_1
@ SOAP1_1
Definition KDSoapValue.h:42
QLatin1Char
QMap
QMap< QString, QString >::insert
QMap::iterator insert(const Key &key, const T &value)
QMap< QString, QString >::value
const T value(const Key &key, const T &defaultValue) const const
QString
QString::isEmpty
bool isEmpty() const const
QXmlStreamWriter
QXmlStreamWriter::writeNamespace
void writeNamespace(const QString &namespaceUri, const QString &prefix)

© 2010-2024 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 Sun Jan 7 2024 11:47:36 for KD SOAP API Documentation by doxygen 1.9.8