KD SOAP API Documentation: KDSoapClientInterface.cpp Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
KDSoapClientInterface.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.h"
11#include "KDSoapClientInterface_p.h"
12#include "KDSoapMessageWriter_p.h"
13#include "KDSoapNamespaceManager.h"
14#ifndef QT_NO_SSL
15#include "KDSoapReplySslHandler_p.h"
16#include "KDSoapSslHandler.h"
17#endif
18#include "KDSoapPendingCall_p.h"
19#include <QAuthenticator>
20#include <QBuffer>
21#include <QDebug>
22#include <QNetworkProxy>
23#include <QNetworkReply>
24#include <QNetworkRequest>
25#include <QSslConfiguration>
26#include <QTimer>
27
28KDSoapClientInterface::KDSoapClientInterface(const QString &endPoint, const QString &messageNamespace)
29 : d(new KDSoapClientInterfacePrivate)
30{
31 d->m_endPoint = endPoint;
32 d->m_messageNamespace = messageNamespace;
33 d->m_version = KDSoap::SOAP1_1;
34}
35
36KDSoapClientInterface::~KDSoapClientInterface()
37{
38 d->m_thread.stop();
39 d->m_thread.wait();
40 delete d;
41}
42
43 void KDSoapClientInterface::setSoapVersion(KDSoapClientInterface::SoapVersion version)
44{
45 d->m_version = static_cast<KDSoap::SoapVersion>(version);
46}
47
48 KDSoapClientInterface::SoapVersion KDSoapClientInterface::soapVersion() const
49{
50 return static_cast<KDSoapClientInterface::SoapVersion>(d->m_version);
51}
52
53KDSoapClientInterfacePrivate::KDSoapClientInterfacePrivate()
54 : m_accessManager(nullptr)
55 , m_authentication()
56 , m_version(KDSoap::SOAP1_1)
57 , m_style(KDSoapClientInterface::RPCStyle)
58{
59#ifndef QT_NO_SSL
60 m_sslHandler = nullptr;
61#endif
62}
63
64KDSoapClientInterfacePrivate::~KDSoapClientInterfacePrivate()
65{
66#ifndef QT_NO_SSL
67 delete m_sslHandler;
68#endif
69}
70
71 QNetworkAccessManager *KDSoapClientInterfacePrivate::accessManager()
72{
73 if (!m_accessManager) {
74 m_accessManager = new QNetworkAccessManager(this);
75 connect(m_accessManager, &QNetworkAccessManager::authenticationRequired, this, &KDSoapClientInterfacePrivate::_kd_slotAuthenticationRequired);
76 }
77 return m_accessManager;
78}
79
80 QNetworkRequest KDSoapClientInterfacePrivate::prepareRequest(const QString &method, const QString &action)
81{
82 QNetworkRequest request(QUrl(this->m_endPoint));
83
84#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
85 // HTTP/2 (on by default since Qt 6) creates trouble, disable it for now (https://github.com/KDAB/KDSoap/issues/246)
86 request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
87#endif
88
89 QString soapAction = action;
90
91 if (soapAction.isNull()) {
92 // The automatic generation of SoapAction done in this block is a mistake going back to KDSoap 1.0.
93 // The spec says "there is no default value for SoapAction" (https://www.w3.org/TR/wsdl#_soap:operation)
94 // but we keep this for compatibility, when nothing was passed as argument (see the webcalls unittest)
95 soapAction = this->m_messageNamespace;
96 if (!soapAction.endsWith(QLatin1Char('/'))) {
97 soapAction += QLatin1Char('/');
98 }
99 soapAction += method;
100 }
101 // qDebug() << "soapAction=" << soapAction;
102
103 QString soapHeader;
104 if (m_version == KDSoap::SOAP1_1) {
105 soapHeader += QString::fromLatin1("text/xml;charset=utf-8");
106 request.setRawHeader("SoapAction", '\"' + soapAction.toUtf8() + '\"');
107 } else if (m_version == KDSoap::SOAP1_2) {
108 soapHeader += QString::fromLatin1("application/soap+xml;charset=utf-8");
109 if (m_sendSoapActionInHttpHeader)
110 soapHeader += QString::fromLatin1(";action=") + soapAction;
111 }
112
113 request.setHeader(QNetworkRequest::ContentTypeHeader, soapHeader.toUtf8());
114
115 // FIXME need to find out which version of Qt this is no longer necessary
116 // without that the server might respond with gzip compressed data and
117 // Qt 4.6.2 fails to decode that properly
118 //
119 // happens with retrieval calls in against SugarCRM 5.5.1 running on Apache 2.2.15
120 // when the response seems to reach a certain size threshold
121 request.setRawHeader("Accept-Encoding", "compress");
122
123 for (QMap<QByteArray, QByteArray>::const_iterator it = m_httpHeaders.constBegin(); it != m_httpHeaders.constEnd(); ++it) {
124 request.setRawHeader(it.key(), it.value());
125 }
126
127#ifndef QT_NO_SSL
128 if (!m_sslConfiguration.isNull()) {
129 request.setSslConfiguration(m_sslConfiguration);
130 }
131#endif
132
133 return request;
134}
135
136 QBuffer *KDSoapClientInterfacePrivate::prepareRequestBuffer(const QString &method, const KDSoapMessage &message, const QString &soapAction, const KDSoapHeaders &headers)
137{
138 KDSoapMessageWriter msgWriter;
139 msgWriter.setMessageNamespace(m_messageNamespace);
140 msgWriter.setVersion(m_version);
141 QBuffer *buffer = new QBuffer;
142 auto setBufferData = [&](const KDSoapMessage &msg) {
143 buffer->setData(msgWriter.messageToXml(msg,
144 (m_style == KDSoapClientInterface::RPCStyle) ? method : QString(),
145 headers, m_persistentHeaders,
146 m_authentication));
147 };
148
149 if (m_sendSoapActionInWsAddressingHeader || m_hasMessageAddressingProperties) {
150 KDSoapMessage messageCopy = message;
151 if (m_hasMessageAddressingProperties) {
152 messageCopy.setMessageAddressingProperties(m_messageAddressingProperties);
153 }
154 if (m_sendSoapActionInWsAddressingHeader) {
155 KDSoapMessageAddressingProperties prop = message.messageAddressingProperties();
156 if (!prop.action().isEmpty())
157 qWarning("Overwriting the action addressing parameter (%s) with the SOAP action (%s)",
158 prop.action().toLocal8Bit().constData(), soapAction.toLocal8Bit().constData());
159 prop.setAction(soapAction);
160 messageCopy.setMessageAddressingProperties(prop);
161 }
162 setBufferData(messageCopy);
163 } else {
164 setBufferData(message);
165 }
166 buffer->open(QIODevice::ReadOnly);
167 return buffer;
168}
169
170 KDSoapPendingCall KDSoapClientInterface::asyncCall(const QString &method, const KDSoapMessage &message, const QString &soapAction,
171 const KDSoapHeaders &headers)
172{
173 QBuffer *buffer = d->prepareRequestBuffer(method, message, soapAction, headers);
174 QNetworkRequest request = d->prepareRequest(method, soapAction);
175 QNetworkReply *reply = d->accessManager()->post(request, buffer);
176 d->setupReply(reply);
177 maybeDebugRequest(buffer->data(), reply->request(), reply);
178 KDSoapPendingCall call(reply, buffer);
179 call.d->soapVersion = d->m_version;
180 return call;
181}
182
183 KDSoapMessage KDSoapClientInterface::call(const QString &method, const KDSoapMessage &message, const QString &soapAction,
184 const KDSoapHeaders &headers)
185{
186 d->accessManager()->cookieJar(); // create it in the right thread, the secondary thread will use it
187 // Problem is: I don't want a nested event loop here. Too dangerous for GUI programs.
188 // I wanted a socket->waitFor... but we don't have access to the actual socket in QNetworkAccess.
189 // So the only option that remains is a thread and acquiring a semaphore...
190 KDSoapThreadTaskData *task = new KDSoapThreadTaskData(this, method, message, soapAction, headers);
191 task->m_authentication = d->m_authentication;
192 d->m_thread.enqueue(task);
193 if (!d->m_thread.isRunning()) {
194 d->m_thread.start();
195 }
196 task->waitForCompletion();
197 KDSoapMessage ret = task->response();
198 d->m_lastResponseHeaders = task->responseHeaders();
199 delete task;
200 return ret;
201}
202
203 void KDSoapClientInterface::callNoReply(const QString &method, const KDSoapMessage &message,
204 const QString &soapAction, const KDSoapHeaders &headers)
205{
206 QBuffer *buffer = d->prepareRequestBuffer(method, message, soapAction, headers);
207 QNetworkRequest request = d->prepareRequest(method, soapAction);
208 QNetworkReply *reply = d->accessManager()->post(request, buffer);
209 d->setupReply(reply);
210 maybeDebugRequest(buffer->data(), reply->request(), reply);
211 QObject::connect(reply, &QNetworkReply::finished, reply, &QNetworkReply::deleteLater);
212 QObject::connect(reply, &QNetworkReply::finished, buffer, &QBuffer::deleteLater);
213}
214
215void KDSoapClientInterfacePrivate::_kd_slotAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
216{
217 m_authentication.handleAuthenticationRequired(reply, authenticator);
218}
219
220 void KDSoapClientInterface::setAuthentication(const KDSoapAuthentication &authentication)
221{
222 d->m_authentication = authentication;
223}
224
225 QString KDSoapClientInterface::endPoint() const
226{
227 return d->m_endPoint;
228}
229
230 void KDSoapClientInterface::setEndPoint(const QString &endPoint)
231{
232 d->m_endPoint = endPoint;
233}
234
235 void KDSoapClientInterface::setHeader(const QString &name, const KDSoapMessage &header)
236{
237 d->m_persistentHeaders[name] = header;
238 d->m_persistentHeaders[name].setQualified(true);
239}
240
241 void KDSoapClientInterface::ignoreSslErrors()
242{
243 d->m_ignoreSslErrors = true;
244}
245
246#ifndef QT_NO_SSL
247 void KDSoapClientInterface::ignoreSslErrors(const QList<QSslError> &errors)
248{
249 d->m_ignoreErrorsList = errors;
250}
251#endif
252
253// Workaround for lack of connect-to-lambdas in Qt4
254// The pure Qt5 code could read like
255/*
256 QTimer *timeoutTimer = new QTimer(reply);
257 timeoutTimer->setSingleShot(true);
258 connect(timeoutTimer, &QTimer::timeout, reply, [reply]() { contents_of_the_slot });
259*/
260class TimeoutHandler : public QTimer // this way a single QObject is needed
261{
262 Q_OBJECT
263public:
264 TimeoutHandler(QNetworkReply *reply)
265 : QTimer(reply)
266 {
267 setSingleShot(true);
268 }
269public Q_SLOTS:
270 void replyTimeout()
271 {
272 QNetworkReply *reply = qobject_cast<QNetworkReply *>(parent());
273 Q_ASSERT(reply);
274
275 // contents_of_the_slot:
276 reply->setProperty("kdsoap_reply_timed_out", true); // see KDSoapPendingCall.cpp
277 reply->abort();
278 }
279};
280
281 void KDSoapClientInterfacePrivate::setupReply(QNetworkReply *reply)
282{
283#ifndef QT_NO_SSL
284 if (m_ignoreSslErrors) {
285 QObject::connect(reply, &QNetworkReply::sslErrors, reply, QOverload<>::of(&QNetworkReply::ignoreSslErrors));
286 } else {
287 reply->ignoreSslErrors(m_ignoreErrorsList);
288 if (m_sslHandler) {
289 // create a child object of the reply, which will forward to m_sslHandler.
290 // this is a workaround for the lack of the reply pointer in the signal,
291 // and sender() doesn't work for sync calls (from another thread) (SOAP-79/issue29)
292 new KDSoapReplySslHandler(reply, m_sslHandler);
293 }
294 }
295#endif
296 if (m_timeout >= 0) {
297 TimeoutHandler *timeoutHandler = new TimeoutHandler(reply);
298 connect(timeoutHandler, &TimeoutHandler::timeout, timeoutHandler, &TimeoutHandler::replyTimeout);
299 timeoutHandler->start(m_timeout);
300 }
301}
302
303 KDSoapHeaders KDSoapClientInterface::lastResponseHeaders() const
304{
305 return d->m_lastResponseHeaders;
306}
307
308 void KDSoapClientInterface::setStyle(KDSoapClientInterface::Style style)
309{
310 d->m_style = style;
311}
312
313 KDSoapClientInterface::Style KDSoapClientInterface::style() const
314{
315 return d->m_style;
316}
317
318 QNetworkCookieJar *KDSoapClientInterface::cookieJar() const
319{
320 return d->accessManager()->cookieJar();
321}
322
323 void KDSoapClientInterface::setCookieJar(QNetworkCookieJar *jar)
324{
325 QObject *oldParent = jar->parent();
326 d->accessManager()->setCookieJar(jar);
327 jar->setParent(oldParent); // see comment in QNAM::setCookieJar...
328}
329
330 void KDSoapClientInterface::setRawHTTPHeaders(const QMap<QByteArray, QByteArray> &headers)
331{
332 d->m_httpHeaders = headers;
333}
334
335 QNetworkProxy KDSoapClientInterface::proxy() const
336{
337 return d->accessManager()->proxy();
338}
339
340 void KDSoapClientInterface::setProxy(const QNetworkProxy &proxy)
341{
342 d->accessManager()->setProxy(proxy);
343}
344
345 int KDSoapClientInterface::timeout() const
346{
347 return d->m_timeout;
348}
349
350 void KDSoapClientInterface::setTimeout(int msecs)
351{
352 d->m_timeout = msecs;
353}
354
355 void KDSoapClientInterface::setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map)
356{
357 d->m_messageAddressingProperties = map;
358 d->m_hasMessageAddressingProperties = true;
359}
360
361 bool KDSoapClientInterface::sendSoapActionInHttpHeader() const
362{
363 return d->m_sendSoapActionInHttpHeader;
364}
365
366 void KDSoapClientInterface::setSendSoapActionInHttpHeader(bool sendInHttpHeader)
367{
368 d->m_sendSoapActionInHttpHeader = sendInHttpHeader;
369}
370
371 bool KDSoapClientInterface::sendSoapActionInWsAddressingHeader() const
372{
373 return d->m_sendSoapActionInWsAddressingHeader;
374}
375
376 void KDSoapClientInterface::setSendSoapActionInWsAddressingHeader(bool sendInWsAddressingHeader)
377{
378 d->m_sendSoapActionInWsAddressingHeader = sendInWsAddressingHeader;
379}
380
381#ifndef QT_NO_OPENSSL
382 QSslConfiguration KDSoapClientInterface::sslConfiguration() const
383{
384 return d->m_sslConfiguration;
385}
386
387 void KDSoapClientInterface::setSslConfiguration(const QSslConfiguration &config)
388{
389 d->m_sslConfiguration = config;
390}
391
392 KDSoapSslHandler *KDSoapClientInterface::sslHandler() const
393{
394 if (!d->m_sslHandler) {
395 d->m_sslHandler = new KDSoapSslHandler;
396 }
397 return d->m_sslHandler;
398}
399#endif
400
401#include "KDSoapClientInterface.moc"
402#include "moc_KDSoapClientInterface_p.cpp"
KDSoapClientInterface.h
KDSoapClientInterface_p.h
KDSoapMessageWriter_p.h
KDSoapNamespaceManager.h
maybeDebugRequest
void maybeDebugRequest(const QByteArray &data, const QNetworkRequest &request, QNetworkReply *reply)
Definition KDSoapPendingCall.cpp:81
KDSoapPendingCall_p.h
KDSoapReplySslHandler_p.h
KDSoapSslHandler.h
KDSoapAuthentication
Definition KDSoapAuthentication.h:31
KDSoapClientInterfacePrivate
Definition KDSoapClientInterface_p.h:29
KDSoapClientInterfacePrivate::m_endPoint
QString m_endPoint
Definition KDSoapClientInterface_p.h:38
KDSoapClientInterfacePrivate::m_version
KDSoap::SoapVersion m_version
Definition KDSoapClientInterface_p.h:44
KDSoapClientInterfacePrivate::m_accessManager
QNetworkAccessManager * m_accessManager
Definition KDSoapClientInterface_p.h:37
KDSoapClientInterfacePrivate::m_style
KDSoapClientInterface::Style m_style
Definition KDSoapClientInterface_p.h:45
KDSoapClientInterfacePrivate::m_sslHandler
KDSoapSslHandler * m_sslHandler
Definition KDSoapClientInterface_p.h:51
KDSoapClientInterfacePrivate::m_persistentHeaders
QMap< QString, KDSoapMessage > m_persistentHeaders
Definition KDSoapClientInterface_p.h:42
KDSoapClientInterfacePrivate::KDSoapClientInterfacePrivate
KDSoapClientInterfacePrivate()
Definition KDSoapClientInterface.cpp:53
KDSoapClientInterfacePrivate::setupReply
void setupReply(QNetworkReply *reply)
Definition KDSoapClientInterface.cpp:281
KDSoapClientInterfacePrivate::prepareRequest
QNetworkRequest prepareRequest(const QString &method, const QString &action)
Definition KDSoapClientInterface.cpp:80
KDSoapClientInterfacePrivate::m_lastResponseHeaders
KDSoapHeaders m_lastResponseHeaders
Definition KDSoapClientInterface_p.h:47
KDSoapClientInterfacePrivate::m_ignoreSslErrors
bool m_ignoreSslErrors
Definition KDSoapClientInterface_p.h:54
KDSoapClientInterfacePrivate::accessManager
QNetworkAccessManager * accessManager()
Definition KDSoapClientInterface.cpp:71
KDSoapClientInterfacePrivate::m_timeout
int m_timeout
Definition KDSoapClientInterface_p.h:53
KDSoapClientInterfacePrivate::m_sslConfiguration
QSslConfiguration m_sslConfiguration
Definition KDSoapClientInterface_p.h:50
KDSoapClientInterfacePrivate::m_authentication
KDSoapAuthentication m_authentication
Definition KDSoapClientInterface_p.h:41
KDSoapClientInterfacePrivate::m_hasMessageAddressingProperties
bool m_hasMessageAddressingProperties
Definition KDSoapClientInterface_p.h:57
KDSoapClientInterfacePrivate::m_httpHeaders
QMap< QByteArray, QByteArray > m_httpHeaders
Definition KDSoapClientInterface_p.h:43
KDSoapClientInterfacePrivate::m_messageAddressingProperties
KDSoapMessageAddressingProperties m_messageAddressingProperties
Definition KDSoapClientInterface_p.h:46
KDSoapClientInterfacePrivate::m_messageNamespace
QString m_messageNamespace
Definition KDSoapClientInterface_p.h:39
KDSoapClientInterfacePrivate::prepareRequestBuffer
QBuffer * prepareRequestBuffer(const QString &method, const KDSoapMessage &message, const QString &soapAction, const KDSoapHeaders &headers)
Definition KDSoapClientInterface.cpp:136
KDSoapClientInterfacePrivate::~KDSoapClientInterfacePrivate
~KDSoapClientInterfacePrivate()
Definition KDSoapClientInterface.cpp:64
KDSoapClientInterfacePrivate::m_sendSoapActionInHttpHeader
bool m_sendSoapActionInHttpHeader
Definition KDSoapClientInterface_p.h:55
KDSoapClientInterfacePrivate::m_sendSoapActionInWsAddressingHeader
bool m_sendSoapActionInWsAddressingHeader
Definition KDSoapClientInterface_p.h:56
KDSoapClientInterfacePrivate::m_ignoreErrorsList
QList< QSslError > m_ignoreErrorsList
Definition KDSoapClientInterface_p.h:49
KDSoapClientInterfacePrivate::m_thread
KDSoapClientThread m_thread
Definition KDSoapClientInterface_p.h:40
KDSoapClientInterface
Definition KDSoapClientInterface.h:51
KDSoapClientInterface::setMessageAddressingProperties
void setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map)
Definition KDSoapClientInterface.cpp:355
KDSoapClientInterface::setSoapVersion
void setSoapVersion(KDSoapClientInterface::SoapVersion version)
Definition KDSoapClientInterface.cpp:43
KDSoapClientInterface::ignoreSslErrors
void ignoreSslErrors()
Definition KDSoapClientInterface.cpp:241
KDSoapClientInterface::callNoReply
void callNoReply(const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders())
Definition KDSoapClientInterface.cpp:203
KDSoapClientInterface::setProxy
void setProxy(const QNetworkProxy &proxy)
Definition KDSoapClientInterface.cpp:340
KDSoapClientInterface::sslConfiguration
QSslConfiguration sslConfiguration() const
Definition KDSoapClientInterface.cpp:382
KDSoapClientInterface::asyncCall
KDSoapPendingCall asyncCall(const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders())
Definition KDSoapClientInterface.cpp:170
KDSoapClientInterface::sslHandler
KDSoapSslHandler * sslHandler() const
Definition KDSoapClientInterface.cpp:392
KDSoapClientInterface::setRawHTTPHeaders
void setRawHTTPHeaders(const QMap< QByteArray, QByteArray > &headers)
Definition KDSoapClientInterface.cpp:330
KDSoapClientInterface::style
Style style() const
Definition KDSoapClientInterface.cpp:313
KDSoapClientInterface::proxy
QNetworkProxy proxy() const
Definition KDSoapClientInterface.cpp:335
KDSoapClientInterface::endPoint
QString endPoint() const
Definition KDSoapClientInterface.cpp:225
KDSoapClientInterface::sendSoapActionInHttpHeader
bool sendSoapActionInHttpHeader() const
sendActionInHTTP_Header
Definition KDSoapClientInterface.cpp:361
KDSoapClientInterface::sendSoapActionInWsAddressingHeader
bool sendSoapActionInWsAddressingHeader() const
sendSoapActionInWsAddressingHeader
Definition KDSoapClientInterface.cpp:371
KDSoapClientInterface::timeout
int timeout() const
Definition KDSoapClientInterface.cpp:345
KDSoapClientInterface::~KDSoapClientInterface
~KDSoapClientInterface()
Definition KDSoapClientInterface.cpp:36
KDSoapClientInterface::setCookieJar
void setCookieJar(QNetworkCookieJar *jar)
Definition KDSoapClientInterface.cpp:323
KDSoapClientInterface::cookieJar
QNetworkCookieJar * cookieJar() const
Definition KDSoapClientInterface.cpp:318
KDSoapClientInterface::KDSoapClientInterface
KDSoapClientInterface(const QString &endPoint, const QString &messageNamespace)
Definition KDSoapClientInterface.cpp:28
KDSoapClientInterface::SoapVersion
SoapVersion
Definition KDSoapClientInterface.h:58
KDSoapClientInterface::setSslConfiguration
void setSslConfiguration(const QSslConfiguration &config)
Definition KDSoapClientInterface.cpp:387
KDSoapClientInterface::lastResponseHeaders
KDSoapHeaders lastResponseHeaders() const
Definition KDSoapClientInterface.cpp:303
KDSoapClientInterface::Style
Style
Definition KDSoapClientInterface.h:255
KDSoapClientInterface::RPCStyle
@ RPCStyle
the method name is sent as an xml element wrapping the message parameters
Definition KDSoapClientInterface.h:256
KDSoapClientInterface::setEndPoint
void setEndPoint(const QString &endPoint)
Definition KDSoapClientInterface.cpp:230
KDSoapClientInterface::setStyle
void setStyle(Style style)
Definition KDSoapClientInterface.cpp:308
KDSoapClientInterface::call
KDSoapMessage call(const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders())
Definition KDSoapClientInterface.cpp:183
KDSoapClientInterface::setSendSoapActionInHttpHeader
void setSendSoapActionInHttpHeader(bool sendInHttpHeader)
setSendSoapActionInHttpHeader
Definition KDSoapClientInterface.cpp:366
KDSoapClientInterface::setSendSoapActionInWsAddressingHeader
void setSendSoapActionInWsAddressingHeader(bool sendInWsAddressingHeader)
setSendSoapActionInWsAddressingHeader
Definition KDSoapClientInterface.cpp:376
KDSoapClientInterface::setAuthentication
void setAuthentication(const KDSoapAuthentication &authentication)
Definition KDSoapClientInterface.cpp:220
KDSoapClientInterface::setHeader
void setHeader(const QString &name, const KDSoapMessage &header)
Definition KDSoapClientInterface.cpp:235
KDSoapClientInterface::soapVersion
KDSoapClientInterface::SoapVersion soapVersion() const
Definition KDSoapClientInterface.cpp:48
KDSoapClientInterface::setTimeout
void setTimeout(int msecs)
Definition KDSoapClientInterface.cpp:350
KDSoapClientThread::stop
void stop()
Definition KDSoapClientThread.cpp:113
KDSoapClientThread::enqueue
void enqueue(KDSoapThreadTaskData *taskData)
Definition KDSoapClientThread.cpp:31
KDSoapHeaders
Definition KDSoapMessage.h:185
KDSoapMessageAddressingProperties
Definition KDSoapMessageAddressingProperties.h:76
KDSoapMessageAddressingProperties::setAction
void setAction(const QString &action)
Definition KDSoapMessageAddressingProperties.cpp:69
KDSoapMessageAddressingProperties::action
QString action() const
Definition KDSoapMessageAddressingProperties.cpp:64
KDSoapMessageWriter
Definition KDSoapMessageWriter_p.h:31
KDSoapMessageWriter::messageToXml
QByteArray messageToXml(const KDSoapMessage &message, const QString &method, const KDSoapHeaders &headers, const QMap< QString, KDSoapMessage > &persistentHeaders, const KDSoapAuthentication &authentication=KDSoapAuthentication()) const
Definition KDSoapMessageWriter.cpp:33
KDSoapMessageWriter::setMessageNamespace
void setMessageNamespace(const QString &ns)
Definition KDSoapMessageWriter.cpp:28
KDSoapMessageWriter::setVersion
void setVersion(KDSoap::SoapVersion version)
Definition KDSoapMessageWriter.cpp:23
KDSoapMessage
Definition KDSoapMessage.h:29
KDSoapMessage::setMessageAddressingProperties
void setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map)
Definition KDSoapMessage.cpp:179
KDSoapMessage::messageAddressingProperties
KDSoapMessageAddressingProperties messageAddressingProperties() const
Definition KDSoapMessage.cpp:174
KDSoapPendingCall
Definition KDSoapPendingCall.h:39
KDSoapReplySslHandler
Definition KDSoapReplySslHandler_p.h:25
KDSoapSslHandler
A class for handling SSL errors during SOAP calls.
Definition KDSoapSslHandler.h:31
KDSoapThreadTaskData
Definition KDSoapClientThread_p.h:30
KDSoapThreadTaskData::m_authentication
KDSoapAuthentication m_authentication
Definition KDSoapClientThread_p.h:56
KDSoapThreadTaskData::waitForCompletion
void waitForCompletion()
Definition KDSoapClientThread_p.h:42
KDSoapThreadTaskData::response
KDSoapMessage response() const
Definition KDSoapClientThread_p.h:46
KDSoapThreadTaskData::responseHeaders
KDSoapHeaders responseHeaders() const
Definition KDSoapClientThread_p.h:50
KDSoap
Definition KDSoapValue.h:33
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
QAuthenticator
QBuffer
QBuffer::data
const QByteArray & data() const const
QBuffer::open
virtual bool open(QIODevice::OpenMode flags) override
QBuffer::setData
void setData(const QByteArray &data)
QByteArray::constData
const char * constData() const const
QIODevice::ReadOnly
ReadOnly
QLatin1Char
QList
QMap::const_iterator
QMap
QMap::constBegin
QMap::const_iterator constBegin() const const
QMap::constEnd
QMap::const_iterator constEnd() const const
QNetworkAccessManager
QNetworkAccessManager::authenticationRequired
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator)
QNetworkAccessManager::cookieJar
QNetworkCookieJar * cookieJar() const const
QNetworkAccessManager::post
QNetworkReply * post(const QNetworkRequest &request, QIODevice *data)
QNetworkAccessManager::proxy
QNetworkProxy proxy() const const
QNetworkAccessManager::setCookieJar
void setCookieJar(QNetworkCookieJar *cookieJar)
QNetworkAccessManager::setProxy
void setProxy(const QNetworkProxy &proxy)
QNetworkCookieJar
QNetworkProxy
QNetworkReply
QNetworkReply::abort
virtual void abort()=0
QNetworkReply::finished
void finished()
QNetworkReply::ignoreSslErrors
virtual void ignoreSslErrors()
QNetworkReply::ignoreSslErrors
void ignoreSslErrors(const QList< QSslError > &errors)
QNetworkReply::request
QNetworkRequest request() const const
QNetworkReply::sslErrors
void sslErrors(const QList< QSslError > &errors)
QNetworkRequest
QNetworkRequest::Http2AllowedAttribute
Http2AllowedAttribute
QNetworkRequest::ContentTypeHeader
ContentTypeHeader
QNetworkRequest::setAttribute
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value)
QNetworkRequest::setHeader
void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
QNetworkRequest::setRawHeader
void setRawHeader(const QByteArray &headerName, const QByteArray &headerValue)
QNetworkRequest::setSslConfiguration
void setSslConfiguration(const QSslConfiguration &config)
QObject
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::Q_SLOTS
Q_SLOTSQ_SLOTS
QObject::connect
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::deleteLater
void deleteLater()
QObject::parent
QObject * parent() const const
QObject::qobject_cast
T qobject_cast(QObject *object)
QObject::setParent
void setParent(QObject *parent)
QObject::setProperty
bool setProperty(const char *name, const QVariant &value)
QSslConfiguration
QSslConfiguration::isNull
bool isNull() const const
QString
QString::endsWith
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
QString::fromLatin1
QString fromLatin1(const char *str, int size)
QString::isEmpty
bool isEmpty() const const
QString::isNull
bool isNull() const const
QString::toLocal8Bit
QByteArray toLocal8Bit() const const
QString::toUtf8
QByteArray toUtf8() const const
QThread::isRunning
bool isRunning() const const
QThread::start
void start(QThread::Priority priority)
QThread::wait
bool wait(QDeadlineTimer deadline)
QTimer
QTimer::setSingleShot
void setSingleShot(bool singleShot)
QTimer::timeout
void timeout()
QUrl

© 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