#include <KDSoapClientInterface.h>
|
| KDSoapClientInterface (const QString &endPoint, const QString &messageNamespace) |
|
| ~KDSoapClientInterface () |
|
KDSoapPendingCall | asyncCall (const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders()) |
|
KDSoapMessage | call (const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders()) |
|
void | callNoReply (const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders()) |
|
void | setAuthentication (const KDSoapAuthentication &authentication) |
|
void | setHeader (const QString &name, const KDSoapMessage &header) |
|
void | setSoapVersion (KDSoapClientInterface::SoapVersion version) |
|
KDSoapClientInterface::SoapVersion | soapVersion () const |
|
QString | endPoint () const |
|
void | setEndPoint (const QString &endPoint) |
|
QNetworkCookieJar * | cookieJar () const |
|
void | setCookieJar (QNetworkCookieJar *jar) |
|
QNetworkProxy | proxy () const |
|
void | setProxy (const QNetworkProxy &proxy) |
|
void | setRawHTTPHeaders (const QMap< QByteArray, QByteArray > &headers) |
|
void | setStyle (Style style) |
|
Style | style () const |
|
KDSoapHeaders | lastResponseHeaders () const |
|
void | ignoreSslErrors () |
|
void | ignoreSslErrors (const QList< QSslError > &errors) |
| ignoreSslErrors If this function is called, the SSL errors given in errors will be ignored. Note that you can set the expected certificate in the SSL error. See QNetworkReply::ignoreSslErrors() for more information. More...
|
|
KDSoapSslHandler * | sslHandler () const |
|
QSslConfiguration | sslConfiguration () const |
|
void | setSslConfiguration (const QSslConfiguration &config) |
|
int | timeout () const |
|
void | setTimeout (int msecs) |
|
void | setSendSoapActionInHttpHeader (bool sendInHttpHeader) |
| setSendSoapActionInHttpHeader More...
|
|
bool | sendSoapActionInHttpHeader () const |
| sendActionInHTTP_Header More...
|
|
void | setSendSoapActionInWsAddressingHeader (bool sendInWsAddressingHeader) |
| setSendSoapActionInWsAddressingHeader More...
|
|
bool | sendSoapActionInWsAddressingHeader () const |
| sendSoapActionInWsAddressingHeader More...
|
|
KDSoapClientInterface is a generic accessor class that is used to place calls to remote SOAP objects. This class is useful for dynamic access to remote objects: that is, when you do not have a generated code that represents the remote interface.
const int year = 2009;
qDebug("Looking up the date of Valentine's Day in %i...", year);
◆ SoapVersion
Version of the SOAP protocol to use when sending requests.
- See also
- setSoapVersion()
Enumerator |
---|
SOAP1_1 | Use format version 1.1 of the SOAP specification
|
SOAP1_2 | Use format version 1.2 of the SOAP specification
|
◆ Style
WSDL style. See the "style" attribute for soap:binding, in the WSDL file. See https://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ for a discussion on the pros and cons of both styles.
In RPC style, the method name passed to call() or asyncCall() is sent as an xml element wrapping the message parameters.
In Document style, the KDSoapMessage represents the entire "document" to be sent, so the the method name passed to call() or asyncCall() is ignored, and the name of the KDSoapMessage is used as the main xml element name. This difference is mostly useful in the case of generated code, so that it can serialize existing complex types, and send them as messages.
Enumerator |
---|
RPCStyle | the method name is sent as an xml element wrapping the message parameters
|
DocumentStyle | the message is sent as is, the method name is usually the name of the message
|
◆ KDSoapClientInterface()
KDSoapClientInterface::KDSoapClientInterface |
( |
const QString & |
endPoint, |
|
|
const QString & |
messageNamespace |
|
) |
| |
|
explicit |
Creates a KDSoapClientInterface object associated with the end point endPoint
.
- Note
- No connection is done yet at this point, the parameters are simply stored for later use.
- Parameters
-
endPoint | the URL of the SOAP service, including http or https scheme, port number if needed, and path. Example: http://server/path/soap.php |
messageNamespace | the namespace URI used for the message and its arguments. Example: http://server/path, but could be any URI, it doesn't have to exist or even to be http, this is really just a namespace, which is part of the specification of the SOAP service. |
◆ ~KDSoapClientInterface()
KDSoapClientInterface::~KDSoapClientInterface |
( |
| ) |
|
Destroys the object interface and frees up any resource used.
- Warning
- Any running asynchronous calls will be canceled.
◆ asyncCall()
Calls the method method
on this interface and passes the arguments specified in message
to the method.
- Parameters
-
method | the method name, without arguments. For instance "addContact" . Only used in RPC style. |
message | arguments for the method call |
soapAction | optional "SoapAction" header, see the specification of the SOAP service. You are strongly encouraged to pass a value here, even if it's just "", given that by default (for a null string) KDSoap will generate a SOAPAction for backwards compatibility reasons. |
headers | optional arguments which will be passed as <soap:Header> . |
This is an asynchronous call, so this function returns immediately. The returned KDSoapPendingCall object can be used to find out information about the reply. You should create a KDSoapPendingCallWatcher to connect to the finished() signal.
- Warning
- The returned KDSoapPendingCall object (or a copy of it) must stay alive for the whole duration of the call. If you do not want to wait for a response, use callNoReply instead.
const int year = 2009;
qDebug("Looking up the date of Valentine's Day in %i...", year);
this, &MyClass::pendingCallFinished);
{
}
◆ call()
Calls the method method
on this interface and passes the parameters specified in message
to the method.
- Parameters
-
method | the method name, without arguments. For instance "addContact" . Only used in RPC style. |
message | arguments for the method call |
soapAction | optional "SoapAction" header, see the specification of the SOAP service. You are strongly encouraged to pass a value here, even if it's just "", given that by default (for a null string) KDSoap will generate a SOAPAction for backwards compatibility reasons. |
headers | optional arguments which will be passed as <soap:Header> . |
- Warning
- This is a blocking call. It is NOT recommended to use this in the main thread of graphical applications, since it will block the event loop for the duration of the call. Use this only in threads, or in non-GUI programs.
◆ callNoReply()
Calls the method method
on this interface and passes the parameters specified in message
to the method.
- Parameters
-
method | the method name, without arguments. For instance "addContact" . Only used in RPC style. |
message | arguments for the method call |
soapAction | optional "SoapAction" header, see the specification of the SOAP service. You are strongly encouraged to pass a value here, even if it's just "", given that by default (for a null string) KDSoap will generate a SOAPAction for backwards compatibility reasons. |
headers | optional arguments which will be passed as <soap:Header> . |
This is an asynchronous call, where the caller does not want to wait for a response. The method returns immediately, the call is performed later. No error handling is possible.
◆ setAuthentication()
Provide the necessary authentication for this service.
- Parameters
-
authentication | the authentication data |
◆ setHeader()
Sets a persistent header, which will be sent with any subsequent SOAP call.
- Parameters
-
name | internal name, used to replace any existing header previously set with this name |
header | the actual message to be sent |
◆ setSoapVersion()
Sets the SOAP version to be used for any subsequent SOAP call.
- Parameters
-
◆ soapVersion()
Returns the version of SOAP being used in this instance.
◆ endPoint()
QString KDSoapClientInterface::endPoint |
( |
| ) |
const |
Returns the end point of the SOAP service.
- Since
- 1.2
◆ setEndPoint()
void KDSoapClientInterface::setEndPoint |
( |
const QString & |
endPoint | ) |
|
Sets the end point of the SOAP service.
- Parameters
-
endPoint | the URL of the SOAP service, including http or https scheme, port number if needed, and path. Example: http://server/path/soap.php |
- Since
- 1.2
◆ cookieJar()
QNetworkCookieJar * KDSoapClientInterface::cookieJar |
( |
| ) |
const |
Returns the cookie jar to use for the HTTP requests. If no cookie jar was set by setCookieJar previously, a default one will be returned, which belongs to the client interface (no need to delete it).
- Since
- 1.2
◆ setCookieJar()
void KDSoapClientInterface::setCookieJar |
( |
QNetworkCookieJar * |
jar | ) |
|
Sets the cookie jar to use for the HTTP requests. The ownership of the cookie jar is NOT transferred, so that it is possible to share the same cookie jar between multiple client interfaces.
- Since
- 1.2
◆ proxy()
QNetworkProxy KDSoapClientInterface::proxy |
( |
| ) |
const |
Returns the network proxy used for the HTTP requests.
- Since
- 1.2
- See also
- QNetworkAccessManager::proxy()
◆ setProxy()
void KDSoapClientInterface::setProxy |
( |
const QNetworkProxy & |
proxy | ) |
|
Sets the network proxy used for the HTTP requests.
- Since
- 1.2
- See also
- QNetworkAccessManager::setProxy()
◆ setRawHTTPHeaders()
Sets additional HTTP headers in the requests
- Since
- 1.4
- See also
- QNetworkAccessManager::setRawHeader()
◆ setStyle()
Sets the WSDL style used by this service.
- Since
- 1.1
◆ style()
Returns the WSDL style used by this service.
- Since
- 1.1
◆ lastResponseHeaders()
KDSoapHeaders KDSoapClientInterface::lastResponseHeaders |
( |
| ) |
const |
◆ ignoreSslErrors() [1/2]
void KDSoapClientInterface::ignoreSslErrors |
( |
| ) |
|
Asks Qt to ignore ssl errors in https requests. Use this for testing only!
◆ ignoreSslErrors() [2/2]
void KDSoapClientInterface::ignoreSslErrors |
( |
const QList< QSslError > & |
errors | ) |
|
ignoreSslErrors If this function is called, the SSL errors given in errors
will be ignored. Note that you can set the expected certificate in the SSL error. See QNetworkReply::ignoreSslErrors() for more information.
- Parameters
-
errors | list of errors to ignore |
- Since
- 1.4
◆ sslHandler()
Returns the ssl handler object, which can be used for notification and handling of SSL errors.
Note that the notifications from synchronous calls will come in delayed, after the synchronous call failed. For this reason, it is not possible to ignore specific ssl errors during runtime when using synchronous calls. Use asynchronous calls instead.
- Since
- 1.3
◆ sslConfiguration()
QSslConfiguration KDSoapClientInterface::sslConfiguration |
( |
| ) |
const |
Returns the ssl configuration used for outgoing connections
- Since
- 1.3
◆ setSslConfiguration()
void KDSoapClientInterface::setSslConfiguration |
( |
const QSslConfiguration & |
config | ) |
|
Sets the ssl configuration used for outgoing connections
- Since
- 1.3
◆ timeout()
int KDSoapClientInterface::timeout |
( |
| ) |
const |
Returns the timeout used for requests, in milliseconds. The default timeout is 30 minutes.
- Since
- 1.8
◆ setTimeout()
void KDSoapClientInterface::setTimeout |
( |
int |
msecs | ) |
|
Sets the timeout used for future requests, in milliseconds. A negative value disables the timeout feature.
- Since
- 1.8
◆ setSendSoapActionInHttpHeader()
void KDSoapClientInterface::setSendSoapActionInHttpHeader |
( |
bool |
sendInHttpHeader | ) |
|
setSendSoapActionInHttpHeader
- Parameters
-
sendInHttpHeader | This option can be used to enable/disable the sending of the SOAP action parameter in the Content-Type HTTP header (in the case of SOAP 1.2 requests). It might be necessary to disable it for certain SOAP server implementations in the case if the action is passed in the SOAP envelope's header with WS-Addressing. |
- Since
- 1.11
◆ sendSoapActionInHttpHeader()
bool KDSoapClientInterface::sendSoapActionInHttpHeader |
( |
| ) |
const |
sendActionInHTTP_Header
- Returns
- true if the SOAP action is passed in the HTTP Content-Type of the request. This parameter is used only in the case of SOAP 1.2 requests. This option is enabled by default.
- Since
- 1.11
◆ setSendSoapActionInWsAddressingHeader()
void KDSoapClientInterface::setSendSoapActionInWsAddressingHeader |
( |
bool |
sendInWsAddressingHeader | ) |
|
setSendSoapActionInWsAddressingHeader
- Parameters
-
- Since
- 1.11
◆ sendSoapActionInWsAddressingHeader()
bool KDSoapClientInterface::sendSoapActionInWsAddressingHeader |
( |
| ) |
const |
The documentation for this class was generated from the following files:
- /home/build/Buildbot/kdsoap-stable-nightly-docs-linux64-ub20/source/src/KDSoapClient/KDSoapClientInterface.h
- /home/build/Buildbot/kdsoap-stable-nightly-docs-linux64-ub20/source/src/KDSoapClient/KDSoapClientInterface.cpp
KDSoapPendingCall asyncCall(const QString &method, const KDSoapMessage &message, const QString &soapAction=QString(), const KDSoapHeaders &headers=KDSoapHeaders())
Definition: KDSoapClientInterface.cpp:168
void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace=QString(), const QString &typeName=QString())
Definition: KDSoapMessage.cpp:78