KD SOAP
KDSoapClientInterface.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2016 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 KDSOAPCLIENTINTERFACE_H
24 #define KDSOAPCLIENTINTERFACE_H
25 
26 #include <QtCore/QtGlobal>
27 #include <QtCore/QString>
28 #include "KDSoapMessage.h"
29 #include "KDSoapPendingCall.h"
30 
32 class KDSoapSslHandler;
33 class KDSoapClientInterfacePrivate;
34 QT_BEGIN_NAMESPACE
35 class QSslError;
36 class QSslConfiguration;
37 class QNetworkCookieJar;
38 class QNetworkProxy;
39 QT_END_NAMESPACE
40 
63 class KDSOAP_EXPORT KDSoapClientInterface
64 {
65 public:
70  enum SoapVersion {
72  SOAP1_1 = 1,
74  SOAP1_2 = 2
75  };
76 
87  explicit KDSoapClientInterface(const QString &endPoint, const QString &messageNamespace);
93 
136  KDSoapPendingCall asyncCall(const QString &method, const KDSoapMessage &message,
137  const QString &soapAction = QString(),
138  const KDSoapHeaders &headers = KDSoapHeaders());
139 
152  KDSoapMessage call(const QString &method, const KDSoapMessage &message,
153  const QString &soapAction = QString(),
154  const KDSoapHeaders &headers = KDSoapHeaders());
155 
167  void callNoReply(const QString &method, const KDSoapMessage &message,
168  const QString &soapAction = QString(),
169  const KDSoapHeaders &headers = KDSoapHeaders());
170 
175  void setAuthentication(const KDSoapAuthentication &authentication);
176 
182  void setHeader(const QString &name, const KDSoapMessage &header);
183 
189  void setSoapVersion(SoapVersion version);
190 
194  SoapVersion soapVersion();
195 
200  QString endPoint() const;
201 
208  void setEndPoint(const QString &endPoint);
209 
216  QNetworkCookieJar *cookieJar() const;
217 
224  void setCookieJar(QNetworkCookieJar *jar);
225 
231  QNetworkProxy proxy() const;
232 
238  void setProxy(const QNetworkProxy &proxy);
239 
245  void setRawHTTPHeaders(const QMap<QByteArray, QByteArray> &headers);
246 
260  enum Style {
262  DocumentStyle
263  };
264 
269  void setStyle(Style style);
270 
275  Style style() const;
276 
282  KDSoapHeaders lastResponseHeaders() const;
283 
288  void ignoreSslErrors();
289 
290 #ifndef QT_NO_OPENSSL
291 
300  void ignoreSslErrors(const QList<QSslError> &errors);
301 #endif
302 
313  KDSoapSslHandler *sslHandler() const;
314 
315 #ifndef QT_NO_OPENSSL
316 
320  QSslConfiguration sslConfiguration() const;
321 
326  void setSslConfiguration(const QSslConfiguration &config);
327 #endif
328 
329 private:
330  friend class KDSoapThreadTask;
331 
332  KDSoapClientInterfacePrivate *const d;
333 };
334 
335 #endif // KDSOAPCLIENTINTERFACE_H
Style
Definition: KDSoapClientInterface.h:260
the method name is sent as an xml element wrapping the message parameters
Definition: KDSoapClientInterface.h:261
Definition: KDSoapPendingCall.h:51
Definition: KDSoapMessage.h:187
Definition: KDSoapAuthentication.h:40
A class for handling SSL errors during SOAP calls.
Definition: KDSoapSslHandler.h:43
Definition: KDSoapMessage.h:41
Definition: KDSoapClientInterface.h:63
SoapVersion
Definition: KDSoapClientInterface.h:70

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-soap/