| KD SOAP 1.9.1

KDSoapMessageAddressingProperties.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 **
12 ** This file may be distributed and/or modified under the terms of the
13 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
14 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 **
16 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 **
19 ** Contact info@kdab.com if any conditions of this licensing are not
20 ** clear to you.
21 **
22 **********************************************************************/
23 #ifndef KDSOAPMESSAGEADDRESSINGPROPERTIES_H
24 #define KDSOAPMESSAGEADDRESSINGPROPERTIES_H
25
26 #include <QtCore/QSharedDataPointer>
27 #include "KDSoapGlobal.h"
28
29 #include "KDSoapEndpointReference.h"
30 #include "KDSoapValue.h"
31
32 QT_BEGIN_NAMESPACE
33 class QString;
34 QT_END_NAMESPACE
35
36 class KDSoapNamespacePrefixes;
37 class KDSoapMessageAddressingPropertiesData;
38
46 namespace KDSoapMessageRelationship
47 {
48
49 struct Relationship {
53 Relationship() {}
54
62 Relationship(const QString &URI, const QString &type = QString())
63 : uri(URI), relationshipType(type) {}
64
65 QString uri;
66 QString relationshipType;
67 };
68
69 } // namespace
70
83 class KDSOAP_EXPORT KDSoapMessageAddressingProperties
84 {
85 public:
86 friend class KDSoapMessageWriter;
87 friend class KDSoapMessageReader;
88
94 enum KDSoapAddressingPredefinedAddress {
95 None,
96 Anonymous,
97 Reply,
98 Unspecified
99 };
100
107 enum KDSoapAddressingNamespace {
108 Addressing200303,
109 Addressing200403,
110 Addressing200408,
111 Addressing200508
112 };
113
117 KDSoapMessageAddressingProperties();
118
122 ~KDSoapMessageAddressingProperties();
123
127 KDSoapMessageAddressingProperties(const KDSoapMessageAddressingProperties &other);
128
132 KDSoapMessageAddressingProperties &operator =(const KDSoapMessageAddressingProperties &other);
133
137 QString destination() const;
138
142 void setDestination(const QString &destination);
143
147 QString action() const;
148
152 void setAction(const QString &action);
153
158 KDSoapEndpointReference sourceEndpoint() const;
159
164 QString sourceEndpointAddress() const;
165
170 void setSourceEndpoint(const KDSoapEndpointReference &sourceEndpoint);
171
175 void setSourceEndpointAddress(const QString &sourceEndpoint);
176
181 KDSoapEndpointReference replyEndpoint() const;
182
186 QString replyEndpointAddress() const;
187
192 void setReplyEndpoint(const KDSoapEndpointReference &replyEndpoint);
193
197 void setReplyEndpointAddress(const QString &replyEndpoint);
198
202 KDSoapEndpointReference faultEndpoint() const;
203
207 QString faultEndpointAddress() const;
208
213 void setFaultEndpoint(const KDSoapEndpointReference &faultEndpoint);
214
218 void setFaultEndpointAddress(const QString &faultEndpoint);
219
223 QString messageID() const;
224
228 void setMessageID(const QString &id);
229
235 QVector<KDSoapMessageRelationship::Relationship> relationships() const;
236
243 void setRelationships(const QVector<KDSoapMessageRelationship::Relationship> &relationships);
244
251 void addRelationship(const KDSoapMessageRelationship::Relationship &relationship);
252
256 KDSoapValueList referenceParameters() const;
257
261 void setReferenceParameters(const KDSoapValueList &values);
262
266 void addReferenceParameter(const KDSoapValue &oneReferenceParameter);
267
271 KDSoapValueList metadata() const;
272
276 void setMetadata(const KDSoapValueList &metadataList);
277
281 void addMetadata(const KDSoapValue &metadata);
282
287 KDSoapAddressingNamespace addressingNamespace() const;
288
295 void setAddressingNamespace(KDSoapAddressingNamespace addressingNamespace);
296
300 static QString predefinedAddressToString(KDSoapAddressingPredefinedAddress address, KDSoapAddressingNamespace addressingNamespace = Addressing200508);
301
305 static bool isWSAddressingNamespace(const QString& namespaceUri);
306
311 static QString addressingNamespaceToString(KDSoapAddressingNamespace addressingNamespace);
312
313 private:
317 void writeMessageAddressingProperties(KDSoapNamespacePrefixes &namespacePrefixes, QXmlStreamWriter &writer, const QString &messageNamespace, bool forceQualified) const;
318
322 void readMessageAddressingProperty(const KDSoapValue& value);
323
324 private:
325 QSharedDataPointer<KDSoapMessageAddressingPropertiesData> d;
326 };
327
331 KDSOAP_EXPORT QDebug operator <<(QDebug dbg, const KDSoapMessageAddressingProperties &msg);
332
333 #endif // KDSOAPMESSAGEADDRESSINGPROPERTIES_H
KDSoapEndpointReference
Definition: KDSoapEndpointReference.h:41
KDSoapValue
Definition: KDSoapValue.h:77
KDSoapMessageAddressingProperties::KDSoapAddressingNamespace
KDSoapAddressingNamespace
Definition: KDSoapMessageAddressingProperties.h:107
KDSoapMessageAddressingProperties::KDSoapAddressingPredefinedAddress
KDSoapAddressingPredefinedAddress
Definition: KDSoapMessageAddressingProperties.h:94
KDSoapMessageAddressingProperties
Definition: KDSoapMessageAddressingProperties.h:84
KDSoapValueList
Definition: KDSoapValue.h:338
KDSoapMessageRelationship
Definition: KDSoapMessageAddressingProperties.h:47

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/