KD SOAP 2.0.0
Loading...
Searching...
No Matches
KDSoapNamespacePrefixes_p.h
1/****************************************************************************
2**
3** This file is part of the KD Soap library.
4**
5** SPDX-FileCopyrightText: 2010-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8**
9** Licensees holding valid commercial KD Soap licenses may use this file in
10** accordance with the KD Soap Commercial License Agreement provided with
11** the Software.
12**
13** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14**
15****************************************************************************/
16#ifndef KDSOAPNAMESPACEPREFIXES_P_H
17#define KDSOAPNAMESPACEPREFIXES_P_H
18
19#include <QtCore/QMap>
20#include <QtCore/QXmlStreamWriter>
21
22#include "KDSoapClientInterface.h"
23#include "KDSoapMessageAddressingProperties.h"
24
25class KDSoapNamespacePrefixes : public QMap<QString /*ns*/, QString /*prefix*/>
26{
27public:
28 void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version = KDSoap::SOAP1_1, bool messageAddressingEnabled = false,
30 KDSoapMessageAddressingProperties::Addressing200508);
31
32 void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix)
33 {
34 // qDebug() << "writeNamespace" << ns << prefix;
35 insert(ns, prefix);
36 writer.writeNamespace(ns, prefix);
37 }
38 QString resolve(const QString &ns, const QString &localName) const
39 {
40 const QString prefix = value(ns);
41 if (prefix.isEmpty()) {
42 qWarning("ERROR: Namespace not found: %s (for localName %s)", qPrintable(ns), qPrintable(localName));
43 }
44 return prefix + QLatin1Char(':') + localName;
45 }
46};
47
48#endif // KDSOAPNAMESPACESPREFIXES_H
KDSoapAddressingNamespace
Definition: KDSoapMessageAddressingProperties.h:107

© 2010-2021 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 Fri May 1 2026 02:54:14 for KD SOAP by doxygen 1.9.6