![]() |
Qore xml Module 2.1.0
|
web service operation class More...
#include <WSDL.qm.dox.h>
Public Member Methods | |
| *hash< string, WSMessage > | getFaultMessages () |
| returns a hash of fault messages keyed by fault name | |
| bool | hasFault (string fault) |
| returns True if the given string is a valid fault message for the operation | |
| void | markRpcStyleBinding () |
| this method is called if this operation supports at least one binding with RPC style | |
| list< auto > | getTopLevelRequestNames () |
| returns all top-level request names for this operation | |
| OperationalBinding | getBinding (*string bname) |
| returns a hash representing the given binding | |
| void | addBinding (WSDL::OperationalBinding b) |
| adds the given binding | |
| hash< auto > | serializeFault (*string bname, *string req_soapaction, *int xml_opts, *hash< auto > nsh, *string enc, *hash< auto > header, auto h, *string fault, string faultmsg) |
| serializes a fault response to an XML string or HTTP payload for the operation. | |
| hash< auto > | serializeRequest (*hash< auto > http_headers, *string bname, *string req_soapaction, *int xml_opts, *hash< auto > nsh, *string enc, auto h, *hash< auto > header) |
| serializes a request to an XML string or HTTP payload for the operation. | |
| hash< auto > | serializeResponse (*hash< auto > http_headers, *string bname, *int xml_opts, *bool soap12, *hash< auto > nsh, *string enc, auto h, *hash< auto > header) |
| serializes a SOAP response to an XML string for the operation | |
| auto | deserializeRequest (hash< auto > o, *string bname) |
| parses a hash representing a parsed XML request (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the operation and returns the corresponding Qore data structure | |
| auto | deserializeResponse (hash< auto > o, *string bname) |
| parses a hash representing a parsed XML response (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the operation and returns the corresponding Qore data structure | |
| *hash< auto > | deserializeRequestPath (string path, *string bname) |
| bool | isSoap12 () |
| returns True if the operation is a SOAP 1.2 operation | |
| string | getTargetNS () |
| returns the target namespace for the operation | |
web service operation class
| void WSDL::WSOperation::addBinding | ( | WSDL::OperationalBinding | b | ) |
adds the given binding
| bname | binding name, must be unique in operation |
| opparams | a hash with the following keys:
|
| WSDL-BINDING-ERROR | when binding already registered |
| auto WSDL::WSOperation::deserializeRequest | ( | hash< auto > | o, |
| *string | bname | ||
| ) |
parses a hash representing a parsed XML request (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the operation and returns the corresponding Qore data structure
| o | the parsed SOAP or HTTP request with WSDLLib::parseSOAPMessage for the operation |
| bname | SOAP binding name, leave empty to use the first assigned binding |
| *hash< auto > WSDL::WSOperation::deserializeRequestPath | ( | string | path, |
| *string | bname | ||
| ) |
Operation is resolved from method and path so let's look if data are passed in URL. When URL replacement is defined for operation then exception is raised.
| auto WSDL::WSOperation::deserializeResponse | ( | hash< auto > | o, |
| *string | bname | ||
| ) |
parses a hash representing a parsed XML response (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the operation and returns the corresponding Qore data structure
| o | the parsed SOAP or HTTP request with WSDLLib::parseSOAPMessage for the operation |
| bname | SOAP binding name, leave empty to use the first assigned binding |
| OperationalBinding WSDL::WSOperation::getBinding | ( | *string | bname | ) |
returns a hash representing the given binding
| bname | the name of the binding, if not provided then uses the first assigned binding |
"httpMethod" "soapTransport" | WSDL-BINDING-ERROR | unknown binding |
| string WSDL::WSOperation::getTargetNS | ( | ) |
returns the target namespace for the operation
| bool WSDL::WSOperation::isSoap12 | ( | ) |
returns True if the operation is a SOAP 1.2 operation
| hash< auto > WSDL::WSOperation::serializeFault | ( | *string | bname, |
| *string | req_soapaction, | ||
| *int | xml_opts, | ||
| *hash< auto > | nsh, | ||
| *string | enc, | ||
| *hash< auto > | header, | ||
| auto | h, | ||
| *string | fault, | ||
| string | faultmsg | ||
| ) |
serializes a fault response to an XML string or HTTP payload for the operation.
| fault | an optional fault message for the operation ( |
| h | the fault data to serialize |
| header | optional soap header info to serialize if required (ex: authorization info). In the first step headers are matched to binding/input/header WSDL definition, remaining headers are passed as-is |
| enc | the optional encoding to use; if this argument is not present, then the default encoding will be used |
| nsh | an optional namespace hash for the output message |
| xml_opts | optional XML generation options |
| req_soapaction | if present will override any SOAPAction value for the request, ignored for HTTP binding |
| bname | SOAP binding name or empty to get the first assigned binding |
body: XML string in the SOAP response format or body part of HTTP message (string or binary). Target content type is evaluated from WSDL or in case of ambiguity using "^attributes^"."^content-type^". The provided content type must match allowed types in the WSDL. Also "application/x-www-form-urlencoded" or any general type are supported.hdr: hash of HTTP headerspath: the path part of URL. Used when urlEncoded is definedmethod: the HTTP request method | hash< auto > WSDL::WSOperation::serializeRequest | ( | *hash< auto > | http_headers, |
| *string | bname, | ||
| *string | req_soapaction, | ||
| *int | xml_opts, | ||
| *hash< auto > | nsh, | ||
| *string | enc, | ||
| auto | h, | ||
| *hash< auto > | header | ||
| ) |
serializes a request to an XML string or HTTP payload for the operation.
| h | the request to serialize |
| header | optional soap header info to serialize if required (ex: authorization info). In the first step headers are matched to binding/input/header WSDL definition, remaining headers are passed as-is |
| enc | the optional encoding to use; if this argument is not present, then the default encoding will be used |
| nsh | an optional namespace hash for the output message |
| xml_opts | optional XML generation options |
| req_soapaction | if present will override any SOAPAction value for the request, ignored for HTTP binding |
| bname | SOAP binding name or empty to get the first assigned binding |
body: XML string in the SOAP request format or body part of HTTP message (string or binary). Target content type is evaluated from WSDL or in case of ambiguity using "^attributes^"."^content-type^". The provided content type must match allowed types in WSDL; also "application/x-www-form-urlencoded" or any general type are supported.hdr: hash of HTTP headerspath: the path part of URL. Used when urlEncoded is definedmethod: the HTTP request method| SOAP-SERIALIZATION-ERROR | no input message description |
| hash< auto > WSDL::WSOperation::serializeResponse | ( | *hash< auto > | http_headers, |
| *string | bname, | ||
| *int | xml_opts, | ||
| *bool | soap12, | ||
| *hash< auto > | nsh, | ||
| *string | enc, | ||
| auto | h, | ||
| *hash< auto > | header | ||
| ) |
serializes a SOAP response to an XML string for the operation
| h | the response to serialize |
| header | SOAP header hash. In the first step headers are matched to binding/input/header WSDL definition, remaining headers are passed as-is |
| enc | the optional encoding to use; if this argument is not present, then the default encoding will be used |
| nsh | namespace hash |
| soap12 | set to True if the response should use SOAP 1.2 encoding |
| xml_opts | optional XML generation options |
| bname | SOAP binding name, leave empty to get the first assigned binding |
| http_headers | HTTP headers to serialize in the response |
body: XML string in the SOAP request format or body part of HTTP message (string or binary). Target content type is evaluated from WSDL or in case of ambiguity using "^attributes^"."^content-type^". The provided content type must match allowed types in WSDL; also "application/x-www-form-urlencoded" or any general type are supported.hdr: hash of HTTP headers| SOAP-SERIALIZATION-ERROR | no output message description |