KD SOAP API Documentation  2.1
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-2022 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"
18 
19 class KDSoapNamespacePrefixes : public QMap<QString /*ns*/, QString /*prefix*/>
20 {
21 public:
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
@ SOAP1_1
Definition: KDSoapValue.h:42

© 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