main class representing a parsed WSDL file
More...
#include <WSDL.qm.dox.h>
|
| void | constructor (string str, *hash< auto > opts) |
| | creates the WebService object
|
| |
| string | getName () |
| | returns the name of the service
|
| |
| synchronized string | getHash () |
| | returns a unique hash for the WSDL that can be used to compare schemas for equality
|
| |
| WSDL::WSOperation | getOperation (string opname) |
| | returns the given operation or throws an exception if it cannot be found; operations are searched in portTypes in the order they are declared
|
| |
|
softlist< string > | getOperationNames () |
| | returns a list of known operation names
|
| |
|
WSDL::WSOperation | getPortTypeOperation (string ptname, string opname) |
| | returns the given operation for particular porttype or throws an exception if it cannot be found
|
| |
|
WSDL::WSOperation | getBindingOperation (*string bname, string opname) |
| | returns the given operation for particular binding or throws an exception if it cannot be found
|
| |
| list< hash< OperationInfo > > | listOperations () |
| | returns a list of hashes giving supported operation names for each port in the WSDL
|
| |
| WSDL::Binding | getBinding (string name) |
| | return a WSDL::Binding object describing the requested binding
|
| |
| hash< WSDL::ServiceInfo > | getService (string name) |
| | returns a hash describing the requested service
|
| |
| bool | isSoap12 () |
| | returns True if the WSDL describes a SOAP 1.2 service
|
| |
| string | getWSDL () |
| | returns the XML string for the WSDL
|
| |
| string | getWSDLHash () |
| | returns a cryptographic hash for the WSDL source
|
| |
| string | getWSDL (string base_url) |
| | returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller
|
| |
| void | getReport (StringOutputStream stream, *string wsdl_name) |
| | prepare a WebService report enumerating the services and operations of the WSDL, outputs to the output stream given as the first argument
|
| |
| string | getReport (*string wsdl_name) |
| | prepare a WebService report enumerating the services and operations of the WSDL
|
| |
main class representing a parsed WSDL file
This is the main class for handling SOAP communication and is based on a WSDL file
- Thread Safety
- This class is designed to be thread-safe for read operations once constructed. Multiple threads can safely use the same WebService object for SOAP serialization and deserialization operations. However, the class should not be modified after construction in a multi-threaded context.
- Usage Example
WebService ws(wsdl_string, {"def_path": "/path/to/schemas"});
list<string> ops = ws.listOperations();
hash<auto> msg = ws.serializeRequest(op_name, args);
◆ constructor()
| void WSDL::WebService::constructor |
( |
string |
str, |
|
|
*hash< auto > |
opts |
|
) |
| |
creates the WebService object
- Parameters
-
| str | the XML string representing the WSDL |
| opts | an optional hash of options with the following possible keys:
"compat_allow_any_header": allow any SOAP header to be sent without checking the WSDL
"compat_empty_string_is_nothing": deserialize empty strings to nothing instead of an empty string
"def_path": the default path to use when retrieving referenced XSDs
"try_import": a call reference or closure to be passed a string name for XSD imports without any scheme to retrieve the data, must take a string argument (the resource name) and return a string (the resource data)
"http_client": a HTTPClient object for retrieving data from import commands
"http_headers": a hash of optional HTTP header info to use when retrieving data from import commands
|
- Since
- 0.3.7 added the
"compat_empty_string_is_nothing" and "compat_allow_any_header" options for backwards compatibility
◆ getBinding()
return a WSDL::Binding object describing the requested binding
- Parameters
-
| name | the name of the binding |
- Returns
- a WSDL::Binding object
- Exceptions
-
| WSDL-BINDING-ERROR | unknown binding |
◆ getHash()
| synchronized string WSDL::WebService::getHash |
( |
| ) |
|
returns a unique hash for the WSDL that can be used to compare schemas for equality
- Returns
- a unique hash for the WSDL that can be used to compare schemas for equality
- Since
- WSDL 0.5
◆ getName()
| string WSDL::WebService::getName |
( |
| ) |
|
returns the name of the service
- Returns
- the name of the service
- Since
- WSDL 0.5
◆ getOperation()
returns the given operation or throws an exception if it cannot be found; operations are searched in portTypes in the order they are declared
- Exceptions
-
| WSDL-OPERATION-ERROR | if the operation is unknown |
◆ getReport() [1/2]
| string WSDL::WebService::getReport |
( |
*string |
wsdl_name | ) |
|
prepare a WebService report enumerating the services and operations of the WSDL
- Parameters
-
| wsdl_name | name of the WSDL, typically a file name |
- Returns
- human readable text report
◆ getReport() [2/2]
| void WSDL::WebService::getReport |
( |
StringOutputStream |
stream, |
|
|
*string |
wsdl_name |
|
) |
| |
prepare a WebService report enumerating the services and operations of the WSDL, outputs to the output stream given as the first argument
- Parameters
-
| stream | the output stream for the report data |
| wsdl_name | name of the WSDL, typically a file name |
- Returns
- human readable text report
◆ getService()
returns a hash describing the requested service
- Parameters
-
| name | the name of the service |
- Returns
- a hash describing the service with the following keys:
"name": the name of the service
"port": a hash of port information; where each hash<auto> is keyed by port name and the values have the following keys:
"address": the location of the port
"binding": the binding of the port
- Exceptions
-
| WSDL-SERVICE-ERROR | the service is not known |
◆ getWSDL() [1/2]
| string WSDL::WebService::getWSDL |
( |
| ) |
|
returns the XML string for the WSDL
- Returns
- the XML string for the WSDL
◆ getWSDL() [2/2]
| string WSDL::WebService::getWSDL |
( |
string |
base_url | ) |
|
returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller
- Parameters
-
| base_url | the url to be prepended before the service name; it must include all the handler prefixes (like /SOAP) to produce valid URL |
- Returns
- the XML string for the WSDL
◆ getWSDLHash()
| string WSDL::WebService::getWSDLHash |
( |
| ) |
|
returns a cryptographic hash for the WSDL source
- Returns
- a cryptographic hash for the WSDL source
◆ isSoap12()
| bool WSDL::WebService::isSoap12 |
( |
| ) |
|
returns True if the WSDL describes a SOAP 1.2 service
- Returns
- True if the WSDL describes a SOAP 1.2 service
◆ listOperations()
| list< hash< OperationInfo > > WSDL::WebService::listOperations |
( |
| ) |
|
returns a list of hashes giving supported operation names for each port in the WSDL
- Returns
- a list of hashes giving supported operation names for each port in the WSDL; each hash<auto> has the following keys:
"port": the name of the port defining the operation
"operation": the WSDL::WSOperation object for the operation
The documentation for this class was generated from the following file:
- doxygen/qlib/WSDL/WSDL.qm.dox.h