22 #ifndef KDSOAPNAMESPACESPREFIXES_H
23 #define KDSOAPNAMESPACESPREFIXES_H
25 #include <QtCore/QMap>
26 #include <QtCore/QXmlStreamWriter>
28 #include "KDSoapClientInterface.h"
30 class KDSoapNamespacePrefixes :
public QMap<QString , QString >
33 void writeStandardNamespaces(QXmlStreamWriter& writer,
36 void writeNamespace(QXmlStreamWriter& writer,
const QString& ns,
const QString& prefix) {
39 writer.writeNamespace(ns, prefix);
41 QString resolve(
const QString& ns,
const QString& localName)
const {
42 const QString prefix = value(ns);
43 if (prefix.isEmpty()) {
44 qWarning(
"ERROR: Namespace not found: %s (for localName %s)", qPrintable(ns), qPrintable(localName));
46 return prefix + QLatin1Char(
':') + localName;
50 #endif // KDSOAPNAMESPACESPREFIXES_H