Qore WSDL Module Reference  0.3.5
WSDL::WebService Class Reference

main class representing a parsed WSDL file More...

Inheritance diagram for WSDL::WebService:

Public Member Functions

 constructor (string str, *hash opts)
 creates the WebService object More...
 
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
 
WSOperation getOperation (string port, string opname)
 returns the given operation or throws an exception if it cannot be found
 
list listOperations ()
 returns a list of hashes giving supported operation names for each port in the WSDL More...
 
WSDL::Binding getBinding (string name)
 return a WSDL::Binding object describing the requested binding More...
 
list listServices ()
 returns a list of services defined in the WSDL More...
 
hash getService (string name)
 returns a hash describing the requested service More...
 
bool isSoap12 ()
 returns True if the WSDL describes a SOAP 1.2 service More...
 
string getWSDL ()
 returns the XML string for the WSDL More...
 
string getWSDL (string base_url)
 returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller More...
 

Public Attributes

string wsdl
 the WSDL string
 
Namespaces nsc
 namespace container
 
*string def_path
 default path for retrieving XSD references
 

Detailed Description

main class representing a parsed WSDL file

This is the main class for handling SOAP communication and is based on a WSDL file

Member Function Documentation

WSDL::WebService::constructor ( string  str,
*hash  opts 
)

creates the WebService object

Parameters
strthe XML string representing the WSDL
optsan optional hash of options with the following possible keys:
  • "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
WSDL::Binding WSDL::WebService::getBinding ( string  name)

return a WSDL::Binding object describing the requested binding

Parameters
namethe name of the binding
Returns
a WSDL::Binding object
Exceptions
WSDL-BINDING-ERRORunknown binding
hash WSDL::WebService::getService ( string  name)

returns a hash describing the requested service

Parameters
namethe 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 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-ERRORthe service is not known
string WSDL::WebService::getWSDL ( )

returns the XML string for the WSDL

Returns
the XML string for the WSDL
string WSDL::WebService::getWSDL ( string  base_url)

returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller

Returns
the XML string for the WSDL
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
list 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 has the following keys:
  • "port": the name of the port defining the operation
  • "operation": the WSDL::WSOperation object for the operation
list WSDL::WebService::listServices ( )

returns a list of services defined in the WSDL

Returns
a list of hashes of services defined in the WSDL; each hash has the following keys:
  • "name": the name of the service
  • "port": a hash of port information; the keys are port names and the values have the following keys:
    • "address": the location of the port
    • "binding": the binding of the port