Qore xml Module 2.1.0
Loading...
Searching...
No Matches
WSDL::WSDLLib Class Reference

contains helper methods for retrieving WSDLs from a URL More...

#include <WSDL.qm.dox.h>

Static Public Member Methods

static data getFile (string fn, bool as_string)
 retrieves a local file and returns the file's contents as a string
 
static string normalizeLocation (string url, string def_protocol, soft< string > def_path)
 normalizes a location to a scheme-prefixed string
 
static string getHTTP (soft< hash< auto > > headers, bool as_string, soft< HTTPClient > hc, string url, soft< string > path)
 retrieves a file from a URL with HTTP and returns the file's contents as a string
 
static data getFTP (string url, string path, bool as_string)
 retrieves a file from a URL with the FTP protocol and returns the file's contents as binary or string data
 
static data getFileFromURL (string url, string def_protocol, soft< hash< auto > > http_headers, bool as_string, soft< reference > new_def_path, soft< HTTPClient > http_client, soft< string > def_path)
 retrieves a file from a URL
 
static data getFileFromURL (string url, hash< auto > u, string def_protocol, soft< hash< auto > > http_headers, bool as_string, soft< reference > new_def_path, soft< HTTPClient > http_client, soft< string > def_path)
 retrieves a file from an already-parsed URL
 
static WebService getWSDL (WebService wsdl)
 returns the argument
 
static string getWSDL (soft< reference > new_def_path, soft< hash< auto > > http_headers, string wsdl, soft< HTTPClient > http_client)
 returns a WSDL string from a file name, optional HTTPClient object and optional header hash
 
static WebService getWebServiceFromUrl (soft< hash< auto > > http_headers, string url, soft< HTTPClient > http_client)
 returns a WebService object from a URL and other optional arguments
 
static hash< auto > parseMultiPartSOAPMessage (hash< auto > msg)
 takes a hash representation of a SOAP message and handles multipart messages, checks the content-type, and handles hrefs in the message
 
static bool isSOAPMessage (hash< auto > msg)
 returns True is the message has a SOAP mime type
 
static soft< hash< auto > > parseSOAPMessage (hash< auto > msg)
 

Public Attributes

const auto SoapMimeTypes = ...
 Mime types recognized as SOAP messages.
 

Detailed Description

contains helper methods for retrieving WSDLs from a URL

Member Function Documentation

◆ getFile()

static data WSDL::WSDLLib::getFile ( string  fn,
bool  as_string 
)
static

retrieves a local file and returns the file's contents as a string

called by WSDLLib::getFileFromURL() in case the scheme is "file"

◆ getFileFromURL() [1/2]

static data WSDL::WSDLLib::getFileFromURL ( string  url,
hash< auto >  u,
string  def_protocol,
soft< hash< auto > >  http_headers,
bool  as_string,
soft< reference >  new_def_path,
soft< HTTPClient >  http_client,
soft< string >  def_path 
)
static

retrieves a file from an already-parsed URL

in case the URL is actually a file path, environment variable substitution is performed on the path string

Note
uses the FileLocationHandler module to retrieve file data for all schemes except "file://" and "http(s)://", which uses WSDLLib::getFileFromUrl() and WSDLLib::getHTTP() respectively for backwards compatibility

◆ getFileFromURL() [2/2]

static data WSDL::WSDLLib::getFileFromURL ( string  url,
string  def_protocol,
soft< hash< auto > >  http_headers,
bool  as_string,
soft< reference >  new_def_path,
soft< HTTPClient >  http_client,
soft< string >  def_path 
)
static

retrieves a file from a URL

in case the URL is actually a file path, environment variable substitution is performed on the path string

Note
uses the FileLocationHandler module to retrieve file data for all schemes except "file://" and "http(s)://", which uses WSDLLib::getFileFromUrl() and WSDLLib::getHTTP() respectively for backwards compatibility

◆ getFTP()

static data WSDL::WSDLLib::getFTP ( string  url,
string  path,
bool  as_string 
)
static

retrieves a file from a URL with the FTP protocol and returns the file's contents as binary or string data

called by WSDLLib::getFileFromURL() in case the scheme is "ftp"

◆ getHTTP()

static string WSDL::WSDLLib::getHTTP ( soft< hash< auto > >  headers,
bool  as_string,
soft< HTTPClient >  hc,
string  url,
soft< string >  path 
)
static

retrieves a file from a URL with HTTP and returns the file's contents as a string

called by WSDLLib::getFileFromURL() in case the scheme is "http"

◆ getWebServiceFromUrl()

static WebService WSDL::WSDLLib::getWebServiceFromUrl ( soft< hash< auto > >  http_headers,
string  url,
soft< HTTPClient >  http_client 
)
static

returns a WebService object from a URL and other optional arguments

Parameters
theURL to use to retrieve the file, the "file://", "http://", "https://", and "ftp://" schemes are supported, if no scheme is present, then "file://" is assumed
http_clientan optional HTTPClient object to use to retrieve external schemas, if no HTTPClient object is passed and one is needed, an HTTPClient object will be created implicitly
http_headersany HTTP headers to send with requests when retrieving external XSD schemas

◆ getWSDL()

static string WSDL::WSDLLib::getWSDL ( soft< reference >  new_def_path,
soft< hash< auto > >  http_headers,
string  wsdl,
soft< HTTPClient >  http_client 
)
static

returns a WSDL string from a file name, optional HTTPClient object and optional header hash

in case the wsdl argument is actually a file path, environment variable substitution is performed on the path string

◆ normalizeLocation()

static string WSDL::WSDLLib::normalizeLocation ( string  url,
string  def_protocol,
soft< string >  def_path 
)
static

normalizes a location to a scheme-prefixed string

Note
Applies environment variable substitution and default path resolution for file locations
Since
WSDL 0.5.8

◆ parseSOAPMessage()

static soft< hash< auto > > WSDL::WSDLLib::parseSOAPMessage ( hash< auto >  msg)
static

! takes a hash representation returned by parseMultiPartSOAPMessage and parses it to a Qore data structure, checks the content-type, and handles hrefs in the message. Operation is not yet known if SoapAction header is not presented


The documentation for this class was generated from the following file: