KD SOAP API Documentation: KDSoapNamespacePrefixes.cpp Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10#include "KDSoapClientInterface_p.h"
11#include "KDSoapNamespaceManager.h"
12#include "KDSoapNamespacePrefixes_p.h"
13
14 void KDSoapNamespacePrefixes::writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version, bool messageAddressingEnabled,
15 KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace)
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}
KDSoapClientInterface_p.h
KDSoapNamespaceManager.h
KDSoapNamespacePrefixes_p.h
KDSoapMessageAddressingProperties::KDSoapAddressingNamespace
KDSoapAddressingNamespace
Definition KDSoapMessageAddressingProperties.h:101
KDSoapMessageAddressingProperties::addressingNamespaceToString
static QString addressingNamespaceToString(KDSoapAddressingNamespace addressingNamespace)
Definition KDSoapMessageAddressingProperties.cpp:254
KDSoapNamespaceManager::soapEncoding
static QString soapEncoding()
Definition KDSoapNamespaceManager.cpp:46
KDSoapNamespaceManager::soapEnvelope
static QString soapEnvelope()
Definition KDSoapNamespaceManager.cpp:36
KDSoapNamespaceManager::xmlSchema1999
static QString xmlSchema1999()
Definition KDSoapNamespaceManager.cpp:16
KDSoapNamespaceManager::xmlSchemaInstance1999
static QString xmlSchemaInstance1999()
Definition KDSoapNamespaceManager.cpp:26
KDSoapNamespaceManager::xmlSchemaInstance2001
static QString xmlSchemaInstance2001()
Definition KDSoapNamespaceManager.cpp:31
KDSoapNamespaceManager::xmlSchema2001
static QString xmlSchema2001()
Definition KDSoapNamespaceManager.cpp:21
KDSoapNamespaceManager::soapEnvelope200305
static QString soapEnvelope200305()
Definition KDSoapNamespaceManager.cpp:41
KDSoapNamespaceManager::soapEncoding200305
static QString soapEncoding200305()
Definition KDSoapNamespaceManager.cpp:51
KDSoapNamespacePrefixes::writeStandardNamespaces
void writeStandardNamespaces(QXmlStreamWriter &writer, KDSoap::SoapVersion version=KDSoap::SOAP1_1, bool messageAddressingEnabled=false, KDSoapMessageAddressingProperties::KDSoapAddressingNamespace messageAddressingNamespace=KDSoapMessageAddressingProperties::Addressing200508)
Definition KDSoapNamespacePrefixes.cpp:14
KDSoapNamespacePrefixes::writeNamespace
void writeNamespace(QXmlStreamWriter &writer, const QString &ns, const QString &prefix)
Definition KDSoapNamespacePrefixes_p.h:26
KDSoap::SoapVersion
SoapVersion
Definition KDSoapValue.h:40
KDSoap::SOAP1_1
@ SOAP1_1
Definition KDSoapValue.h:42
KDSoap::SOAP1_2
@ SOAP1_2
Definition KDSoapValue.h:44
QLatin1String
QMap< QString, QString >::insert
QMap::iterator insert(const Key &key, const T &value)
QString
QString::fromLatin1
QString fromLatin1(const char *str, int size)
QXmlStreamWriter

© 2010-2024 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 Sun Jan 7 2024 11:47:36 for KD SOAP API Documentation by doxygen 1.9.8