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
18
19class KDSoapNamespacePrefixes : public QMap<QString /*ns*/, QString /*prefix*/>
20{
21public:
22 void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version = KDSoap::SOAP1_1, bool messageAddressingEnabled = false,
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
void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version=KDSoap::SOAP1_1, bool messageAddressingEnabled=false, KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace=KDSoapMessageAddressingProperties::Addressing200508)
void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix)
QString resolve(const QString &ns, const QString &localName) const
QMap::iterator insert(const Key &key, const T &value)
const T value(const Key &key, const T &defaultValue) const const
bool isEmpty() const const
void writeNamespace(const QString &namespaceUri, const QString &prefix)

© 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 Sat Apr 20 2024 00:04:25 for KD SOAP API Documentation by doxygen 1.9.8