![]() |
Qore xml Module
1.6.0
|
web service operation class More...
Public Member Methods | |
| constructor (hash< auto > p, Namespaces nsc, *hash< auto > messages) | |
| creates the WSOperation object from the arguments supplied More... | |
| *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 | |
| setDocStyleBinding (reference idocmap) | |
| this method is called if this operation supports at least one binding with document style | |
| 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 More... | |
| addBinding (WSDL::OperationalBinding b) | |
| adds the given binding More... | |
| hash< auto > | serializeFault (*string fault, string faultmsg, auto h, *hash< auto > header, *string enc, *hash< auto > nsh, *int xml_opts, *string req_soapaction, *string bname) |
| serializes a fault response to an XML string or HTTP payload for the operation. More... | |
| hash< auto > | serializeRequest (auto h, *hash< auto > header, *string enc, *hash< auto > nsh, *int xml_opts, *string req_soapaction, *string bname, *hash< auto > http_headers) |
| serializes a request to an XML string or HTTP payload for the operation. More... | |
| hash< auto > | serializeResponse (auto h, *hash< auto > header, *string enc, *hash< auto > nsh, *bool soap12, *int xml_opts, *string bname, *hash< auto > http_headers) |
| serializes a SOAP response to an XML string for the operation More... | |
| 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 More... | |
| 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 More... | |
| *hash< auto > | deserializeRequestPath (string path, *string bname) |
| bool | isSoap12 () |
| returns True if the operation is a SOAP 1.2 operation More... | |
| string | getTargetNS () |
| returns the target namespace for the operation More... | |
Public Attributes | |
| *WSMessage | input |
| request message | |
| *WSMessage | output |
| response message | |
| *string | input_name |
| request message name | |
| *string | output_name |
| response message name | |
| Namespaces | nsc |
| namespace container | |
| *string | soapAction |
| the SOAPAction header value to send with this operation | |
| hash< string, bool > | reqh |
| a hash of top-level request names for this operation (depends on bindings) | |
| hash< string, OperationalBinding > | bindings |
| params per associated binding; key = binding name; value = OperationalBinding object | |
Public Attributes inherited from WSDL::XsdNamedData | |
| *string | ns |
| input namespace prefix (if any given) | |
| descriptive_name | |
| descriptive name flag | |
Static Private Member Methods | |
| static hash< auto > | processNSValue (hash< auto > h) |
processes a hash of raw deserialized XML data and removes any namespace prefix from keys (saved to a "ns" key in the hash vale assigned to the key) and returns the processed version of the hash | |
Private Attributes | |
| hash< string, WSMessage > | faults |
| fault messages keyed by fault name | |
web service operation class
| 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 |
| WSDL::WSOperation::constructor | ( | hash< auto > | p, |
| Namespaces | nsc, | ||
| *hash< auto > | messages | ||
| ) |
creates the WSOperation object from the arguments supplied
| 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 | fault, |
| string | faultmsg, | ||
| auto | h, | ||
| *hash< auto > | header, | ||
| *string | enc, | ||
| *hash< auto > | nsh, | ||
| *int | xml_opts, | ||
| *string | req_soapaction, | ||
| *string | bname | ||
| ) |
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 | ( | auto | h, |
| *hash< auto > | header, | ||
| *string | enc, | ||
| *hash< auto > | nsh, | ||
| *int | xml_opts, | ||
| *string | req_soapaction, | ||
| *string | bname, | ||
| *hash< auto > | http_headers | ||
| ) |
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 | ( | auto | h, |
| *hash< auto > | header, | ||
| *string | enc, | ||
| *hash< auto > | nsh, | ||
| *bool | soap12, | ||
| *int | xml_opts, | ||
| *string | bname, | ||
| *hash< auto > | http_headers | ||
| ) |
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 |