KD SOAP  1.10.0
KDSoapMessageAddressingProperties.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 2010-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8 **
9 ** Licensees holding valid commercial KD Soap licenses may use this file in
10 ** accordance with the KD Soap Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 #ifndef KDSOAPMESSAGEADDRESSINGPROPERTIES_H
17 #define KDSOAPMESSAGEADDRESSINGPROPERTIES_H
18 
19 #include <QtCore/QSharedDataPointer>
20 #include "KDSoapGlobal.h"
21 
22 #include "KDSoapEndpointReference.h"
23 #include "KDSoapValue.h"
24 
25 QT_BEGIN_NAMESPACE
26 class QString;
27 QT_END_NAMESPACE
28 
29 class KDSoapNamespacePrefixes;
30 class KDSoapMessageAddressingPropertiesData;
31 
40 {
41 
42 struct Relationship {
46  Relationship() {}
47 
55  Relationship(const QString &URI, const QString &type = QString())
56  : uri(URI), relationshipType(type) {}
57 
58  QString uri;
59  QString relationshipType;
60 };
61 
62 } // namespace
63 
77 {
78 public:
79  friend class KDSoapMessageWriter;
80  friend class KDSoapMessageReader;
81 
88  None,
89  Anonymous,
90  Reply,
91  Unspecified
92  };
93 
101  Addressing200303,
102  Addressing200403,
103  Addressing200408,
104  Addressing200508
105  };
106 
111 
116 
121 
126 
130  QString destination() const;
131 
135  void setDestination(const QString &destination);
136 
140  QString action() const;
141 
145  void setAction(const QString &action);
146 
151  KDSoapEndpointReference sourceEndpoint() const;
152 
157  QString sourceEndpointAddress() const;
158 
163  void setSourceEndpoint(const KDSoapEndpointReference &sourceEndpoint);
164 
168  void setSourceEndpointAddress(const QString &sourceEndpoint);
169 
174  KDSoapEndpointReference replyEndpoint() const;
175 
179  QString replyEndpointAddress() const;
180 
185  void setReplyEndpoint(const KDSoapEndpointReference &replyEndpoint);
186 
190  void setReplyEndpointAddress(const QString &replyEndpoint);
191 
195  KDSoapEndpointReference faultEndpoint() const;
196 
200  QString faultEndpointAddress() const;
201 
206  void setFaultEndpoint(const KDSoapEndpointReference &faultEndpoint);
207 
211  void setFaultEndpointAddress(const QString &faultEndpoint);
212 
216  QString messageID() const;
217 
221  void setMessageID(const QString &id);
222 
228  QVector<KDSoapMessageRelationship::Relationship> relationships() const;
229 
236  void setRelationships(const QVector<KDSoapMessageRelationship::Relationship> &relationships);
237 
244  void addRelationship(const KDSoapMessageRelationship::Relationship &relationship);
245 
249  KDSoapValueList referenceParameters() const;
250 
254  void setReferenceParameters(const KDSoapValueList &values);
255 
259  void addReferenceParameter(const KDSoapValue &oneReferenceParameter);
260 
264  KDSoapValueList metadata() const;
265 
269  void setMetadata(const KDSoapValueList &metadataList);
270 
274  void addMetadata(const KDSoapValue &metadata);
275 
280  KDSoapAddressingNamespace addressingNamespace() const;
281 
288  void setAddressingNamespace(KDSoapAddressingNamespace addressingNamespace);
289 
293  static QString predefinedAddressToString(KDSoapAddressingPredefinedAddress address, KDSoapAddressingNamespace addressingNamespace = Addressing200508);
294 
298  static bool isWSAddressingNamespace(const QString& namespaceUri);
299 
304  static QString addressingNamespaceToString(KDSoapAddressingNamespace addressingNamespace);
305 
306 private:
310  void writeMessageAddressingProperties(KDSoapNamespacePrefixes &namespacePrefixes, QXmlStreamWriter &writer, const QString &messageNamespace, bool forceQualified) const;
311 
315  void readMessageAddressingProperty(const KDSoapValue& value);
316 
317 private:
318  QSharedDataPointer<KDSoapMessageAddressingPropertiesData> d;
319 };
320 
324 KDSOAP_EXPORT QDebug operator <<(QDebug dbg, const KDSoapMessageAddressingProperties &msg);
325 
326 #endif // KDSOAPMESSAGEADDRESSINGPROPERTIES_H
Definition: KDSoapMessageAddressingProperties.h:39
Definition: KDSoapEndpointReference.h:33
KDSoapAddressingNamespace
Definition: KDSoapMessageAddressingProperties.h:100
Definition: KDSoapValue.h:69
Definition: KDSoapMessageAddressingProperties.h:76
KDSoapAddressingPredefinedAddress
Definition: KDSoapMessageAddressingProperties.h:87
Definition: KDSoapValue.h:330

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/