KD SOAP API Documentation  2.1
KDSoapNamespacePrefixes.cpp
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 ****************************************************************************/
11 #include "KDSoapNamespaceManager.h"
13 
14 void KDSoapNamespacePrefixes::writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version, bool messageAddressingEnabled,
16 {
17  if (version == KDSoap::SOAP1_1) {
18  writeNamespace(writer, KDSoapNamespaceManager::soapEnvelope(), QLatin1String("soap"));
19  writeNamespace(writer, KDSoapNamespaceManager::soapEncoding(), QLatin1String("soap-enc"));
20  } else if (version == KDSoap::SOAP1_2) {
21  writeNamespace(writer, KDSoapNamespaceManager::soapEnvelope200305(), QLatin1String("soap"));
22  writeNamespace(writer, KDSoapNamespaceManager::soapEncoding200305(), QLatin1String("soap-enc"));
23  }
24 
25  writeNamespace(writer, KDSoapNamespaceManager::xmlSchema2001(), QLatin1String("xsd"));
26  writeNamespace(writer, KDSoapNamespaceManager::xmlSchemaInstance2001(), QLatin1String("xsi"));
27 
28  if (messageAddressingEnabled) {
29  const QString addressingNS = KDSoapMessageAddressingProperties::addressingNamespaceToString(messageAddressingNamespace);
30  writeNamespace(writer, addressingNS, QLatin1String("wsa"));
31  }
32 
33  // Also insert known variants
34  insert(KDSoapNamespaceManager::xmlSchema1999(), QString::fromLatin1("xsd"));
35  insert(KDSoapNamespaceManager::xmlSchemaInstance1999(), QString::fromLatin1("xsi"));
36 }
static QString addressingNamespaceToString(KDSoapAddressingNamespace addressingNamespace)
static QString xmlSchemaInstance1999()
static QString xmlSchemaInstance2001()
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)
@ SOAP1_1
Definition: KDSoapValue.h:42
@ SOAP1_2
Definition: KDSoapValue.h:44

© 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