SOAP client class implementation, publically inherits qore's HTTPClient class.
More...
Inherits HTTPClient.
|
| constructor (hash h) |
| creates the object based on a WSDL which is parsed to a WebService object which provides the basis for all communication with this object More...
|
|
hash | getMsg (string operation, any args, *hash header, reference op, *hash nsh) |
| returns a hash representing the serialized SOAP request for a given WSOperation More...
|
|
any | call (string operation, any args, *hash header, *hash nsh) |
| makes a server call with the given operation and arguments and returns the deserialized result More...
|
|
any | call (string operation, any args, *reference info) |
| makes a server call with the given operation and arguments and returns the deserialized result More...
|
|
any | call (reference info, string operation, any args, *hash header, *hash nsh) |
| makes a server call with the given operation and arguments and returns the deserialized result with an output argument giving technical information about the call More...
|
|
private any | makeCallIntern (*reference info, string operation, any args, *hash header, *hash nsh) |
| makes the call to the SOAP server and ensures that SOAP fault responses returned with a 500-series status code are processed as a SOAP fault so that error information is returned in the resulting exception
|
|
any | methodGate (string op, any arg) |
| uses SoapClient::call() to transparently serialize the argument and make a call to the given operation and return the deserialized results More...
|
|
hash | getType (string type, any v) |
| returns a hash that can be used to ensure serialization with the XSD type given as the type argument
|
|
| log (string msg) |
| sends a log message to the log closure or call reference, if any
|
|
| dbglog (string msg) |
| sends a log message to the debug log closure or call reference, if any
|
|
|
const | Version = "0.2.4" |
| version of the implementation of this class
|
|
const | Headers = ("Accept": (MimeTypeSoapXml + "," + MimeTypeXml + "," + MimeTypeXmlApp), "User-Agent": ("Qore-Soap-Client/" + SoapClient::Version)) |
| default HTTP headers
|
|
const | HTTPOptions = ( "connect_timeout", "http_version", "max_redirects", "proxy", "timeout" ) |
| option keys passed to the HTTPClient constructor
|
|
string | url |
| target URL
|
|
hash | headers = Headers |
| HTTP headers to use.
|
|
SOAP client class implementation, publically inherits qore's HTTPClient class.
any SoapClient::SoapClient::call |
( |
string |
operation, |
|
|
any |
args, |
|
|
*hash |
header, |
|
|
*hash |
nsh |
|
) |
| |
makes a server call with the given operation and arguments and returns the deserialized result
- Parameters
-
operation | the operation name for the SOAP call |
args | the arguments to the SOAP operation |
header | optional soap headers (if required by the operation) |
- Returns
- the deserialized result of the SOAP call to the SOAP server
any SoapClient::SoapClient::call |
( |
string |
operation, |
|
|
any |
args, |
|
|
*reference |
info |
|
) |
| |
makes a server call with the given operation and arguments and returns the deserialized result
- Parameters
-
operation | the operation name for the SOAP call |
args | the arguments to the SOAP operation |
info | an optional reference to return a hash of technical information about the SOAP call (raw message info and headers) |
- Returns
- the deserialized result of the SOAP call to the SOAP server
any SoapClient::SoapClient::call |
( |
reference |
info, |
|
|
string |
operation, |
|
|
any |
args, |
|
|
*hash |
header, |
|
|
*hash |
nsh |
|
) |
| |
makes a server call with the given operation and arguments and returns the deserialized result with an output argument giving technical information about the call
- Parameters
-
info | an optional reference to return a hash of technical information about the SOAP call (raw message info and headers) |
operation | the operation name for the SOAP call |
args | the arguments to the SOAP operation |
header | optional soap headers (if required by the operation) |
- Returns
- the deserialized result of the SOAP call to the SOAP server
SoapClient::SoapClient::constructor |
( |
hash |
h | ) |
|
creates the object based on a WSDL which is parsed to a WebService object which provides the basis for all communication with this object
one of either the wsdl
or wsdl_file
keys is required in the hash given to the constructor or an exception will be thrown
- Parameters
-
h | valid option keys:
wsdl: the URL of the web service or a WebService object itself
wsdl_file: a path to use to load the WSDL and create the WebService object
url: override the target URL given in the WSDL
- [
portType ]: in case multiple portType entries are found in the WSDL, give the one to be used here
- [
port ]: in case multiple port entries are found in the WSDL, give the one to be used here
- [
log ]: a log closure or call reference taking a single string giving the log message
- [
dbglog ]: a log closure or call reference taking a single string giving the debug log message
- also all options from SoapClient::SoapClient::HTTPOptions, which are passed to the HTTPClient constructor
|
hash SoapClient::SoapClient::getMsg |
( |
string |
operation, |
|
|
any |
args, |
|
|
*hash |
header, |
|
|
reference |
op, |
|
|
*hash |
nsh |
|
) |
| |
returns a hash representing the serialized SOAP request for a given WSOperation
the returned hash can be passed to makeXMLString() to make the actual SOAP message
- Parameters
-
operation | the SOAP operation to use to serialize the request; if the operation is not known to the underlying WebService class, an exception will be thrown |
args | the arguments to the SOAP operation |
header | data structure for the SOAP header, if required by the message |
op | a reference to return the WSOperation object found |
- Exceptions
-
SOAP-CLIENT-ERROR | the operation is not defined in the WSDL |
any SoapClient::SoapClient::methodGate |
( |
string |
op, |
|
|
any |
arg |
|
) |
| |
uses SoapClient::call() to transparently serialize the argument and make a call to the given operation and return the deserialized results
- Parameters
-
op | the operation name, which is the method name passed to methodGate() |
arg | a list or arguments or a single argument (or NOTHING) for the operation |
- Returns
- the deserialized result of the SOAP call to the SOAP server