WSDL.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* WSDL.qm Copyright (C) 2012 - 2018 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// make sure we have the required qore version
// requires XML functionality
// need mime definitions
// do not use $ for vars
// allow the use of the := weak reference assignment operator
/*
WSDL classes
provides some minimal WSDL and XSD support for SOAP messaging used by the SoapClient class and the SoapHandler
not complete, needs namespace verification, improved XSD support, element groups, etc
*/
namespace WSDL {
const version = "0.3.6";
const SOAP_11_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
const SOAP_12_ENV = "http://www.w3.org/2003/05/soap-envelope";
const SOAP_11_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
const SOAP_12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
const XSD_NS = "http://www.w3.org/2001/XMLSchema";
const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
const HTTP_NS = "http://schemas.xmlsoap.org/wsdl/http/";
const MIME_NS = "http://schemas.xmlsoap.org/wsdl/mime/";
const ENVELOPE_11_NS = (
"soapenv:Envelope": (
"^attributes^": (
"xmlns:soapenv": SOAP_11_ENV,
"xmlns:xsd": XSD_NS,
"xmlns:xsi": XSI_NS,
),
),
);
const ENVELOPE_12_NS = (
"soapenv:Envelope": (
"^attributes^": (
"xmlns:soapenv": SOAP_12_ENV,
"xmlns:xsd": XSD_NS,
"xmlns:xsi": XSI_NS,
),
),
);
const SoapUseMap = (
"encoded": True,
"literal": False,
);
const SoapStyleMap = (
"document": True,
"rpc": False,
);
const SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
const any_type_map = (
Type::String : "string",
Type::Int : "long",
Type::Boolean : "boolean",
Type::Date : "dateTime",
Type::Float : "decimal",
Type::NothingType : "string",
Type::NullType : "string",
Type::Binary : "base64Binary",
);
// error codes
const SOAP_SERIALIZATION_ERROR = "SOAP-SERIALIZATION-ERROR";
const SOAP_DESERIALIZATION_ERROR = "SOAP-DESERIALIZATION-ERROR";
const WSDL_ERROR = "WSDL-ERROR";
const SOAP_TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
const SOAP_TRANSPORT = (
SOAP_TRANSPORT_HTTP: True,
);
const RANGE_SHORT = (-32768, 32767);
const RANGE_INT = (-2147483648, 2147483647);
// private global variables
extern bool global_compat_empty_string_is_nothing;
extern bool global_compat_allow_any_header;
wsdl_set_global_compat_empty_string_is_nothing(softbool val);
wsdl_set_global_compat_allow_any_header(softbool val);
};
class WSDL::WSDLLib {
public:
const SoapMimeTypes = (MimeTypeSoapXml, MimeTypeXml, MimeTypeXmlApp);
static string getSoapMimeType12(bool soap12);
static data getFile(string fn, bool as_string = True);
static string getHTTP(string url, *string path, *HTTPClient hc, *hash<auto> headers, bool as_string = True);
static data getFTP(string url, string path, bool as_string = True);
static data getFileFromURL(string url, string def_protocol = "file", *HTTPClient http_client, *hash<auto> http_headers, bool as_string = True, *string def_path, *reference new_def_path);
static data getFileFromURL(string url, hash<auto> u, string def_protocol = "file", *HTTPClient http_client, *hash<auto> http_headers, bool as_string = False, *string def_path, *reference new_def_path);
static WebService getWSDL(WebService wsdl);
static string getWSDL(string wsdl, *HTTPClient http_client, *hash<auto> http_headers, *reference new_def_path);
static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash<auto> http_headers);
static hash<auto> parseMultiPartSOAPMessage(hash<auto> msg);
static bool isSOAPMessage(hash<auto> msg);
static *hash<auto> parseSOAPMessage(hash<auto> msg);
private:
static processHref(reference xmldata, string hr, hash<auto> parts);
public:
private:
static substHref(reference xmldata, hash<auto> parts);
public:
};
// private, nmon-exported class
class WsdlLibPriv {
public:
static bool isContentType(string ct, list<auto> MimeTypes);
static checkContentType(string ct, list<auto> MimeTypes);
};
class WSDL::XsdBase {
public:
static removeNS(reference v);
static removeNS2(reference v);
};
class WSDL::XsdData : public WSDL::XsdBase {
public:
auto getValue(*hash<auto> mrh, auto val);
};
class WSDL::XsdNamedData : public WSDL::XsdData {
public:
public :
// name of object
string name;
*string ns;
descriptive_name;
public:
constructor(string n_name, string n_ns);
constructor(reference e, *string desc_name);
string getName();
*string getInputNamespacePrefix();
bool hasRealName();
};
class WSDL::XsdAbstractType : public WSDL::XsdNamedData {
public:
public :
Namespaces nsc;
string ons;
public:
constructor(reference e, Namespaces nsc, *string desc_name) ;
constructor(string name, string ns, Namespaces nsc) ;
private:
resolveNamespace();
public:
checkExtends(XsdAbstractType t, string ename);
string getNameWithNS();
bool isNillable();
bool isRequired();
bool requiresValue();
string getOutputNamespacePrefix();
abstract auto serialize(Namespaces nsc, auto val, *softbool omitType);
abstract auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
};
class WSDL::XsdBaseType : public WSDL::XsdAbstractType {
public:
public :
public:
constructor(string t, Namespaces nsc, string ns = "xsd") ;
auto serialize(Namespaces nsc, auto val, *softbool omitType);
auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
};
class WSDL::XsdArrayType : public WSDL::XsdAbstractType {
public:
constructor(string t, Namespaces nsc) ;
auto serialize(Namespaces nsc, auto val, *softbool omitType);
auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
};
class WSDL::XsdTypedData : public WSDL::XsdNamedData {
public:
public :
*hash<auto> typeinfo;
XsdAbstractType type;
public:
constructor(reference e) ;
};
class WSDL::XsdAttribute : public WSDL::XsdTypedData {
public:
public :
string use = "optional";
const AllowedUseValues = (
"optional": True,
"required": True,
"prohibited": True,
);
public:
constructor(hash<auto> attr, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved) ;
auto getValue(string val);
};
class WSDL::XsdElement : public WSDL::XsdTypedData {
public:
public :
int minOccurs = 1;
int maxOccurs = 1;
bool nillable = False;
// the resolved namespace URI for any reference
*string ref_ns;
// the source name for any reference
*string ref;
bool usedocns;
public:
constructor(hash<auto> e, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved, bool n_usedocns) ;
assimilate(WSDL::XsdElement other);
bool isRequired();
bool isNillable();
auto serialize(Namespaces nsc, auto h, *softbool omitType, string key, string typename);
private:
auto serializeAsIntern(Namespaces nsc, XsdAbstractType type, auto h, *softbool omitType, string key, string typename);
public:
auto deserialize(hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val, bool present);
};
class WSDL::XsdSimpleType : public WSDL::XsdAbstractType {
public:
public :
hash<auto> enum;
hash<auto> typeinfo;
XsdAbstractType type;
//any type;
bool usedocns;
public:
constructor(hash<auto> st, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
auto serialize(Namespaces nsc, auto val, *softbool omitType);
auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
};
public hashdecl WSDL::ChoiceInfo {
hash<string, XsdElement> elementmap;
bool required;
};
class WSDL::XsdComplexType : public WSDL::XsdAbstractType {
public:
public :
*XsdArrayType array;
*string restriction;
*string extension;
bool usedocns;
hash<string, XsdElement> elementmap();
bool anyAttribute = False;
bool nillable = False;
bool required = False;
bool requires_value = False;
// attributes
hash<string, XsdAttribute> attrs();
// any annotated documentation
*string documentation;
// temporarily used to store type information to resolve simpleType
*hash<auto> simpleTypeInfo;
// simpleContent type
XsdAbstractType simpleType;
// finalization flag
bool finalized = False;
// multiple choice blocks
list<hash<ChoiceInfo>> choices();
public:
private :
string cx_type;
const XET_ALL = "ALL";
const XET_CHOICE = "CHOICE";
const XET_SEQUENCE = "SEQUENCE";
const XET_SIMPLE = "SIMPLE";
const XET_NONE = "NONE";
public:
// ct can be NOTHING in case of an empty complex type
constructor(*hash<auto> ct, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
checkExtends(XsdAbstractType t, string ename);
private:
parseData(hash<auto> d, XsdLateResolverHelper unresolved, Namespaces nsc);
public:
private:
parseAttributes(reference d, XsdLateResolverHelper unresolved, Namespaces nsc);
public:
bool isNillable();
bool isRequired();
bool requiresValue();
bool isEmpty();
private:
hash<string, XsdElement> parseElements(softlist<auto> el, XsdLateResolverHelper unresolved, Namespaces nsc, bool for_object = True);
public:
private:
*hash<auto> serializeElement(Namespaces nsc, string key, XsdElement element, auto h, *softbool omitType);
public:
*hash<auto> serialize(Namespaces nsc, auto h, *softbool omitType);
private:
hash<auto> serializeChoice(Namespaces nsc, hash<string, XsdElement> emap, hash<auto> h, *softbool omitType, bool all_members);
public:
*hash<auto> deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto oval);
private:
*hash<auto> parseChoice(hash<auto> val, hash<string, XsdElement> emap, string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, *bool required);
public:
};
class WSDL::WSOperation : public WSDL::XsdNamedData {
public:
public :
WSMessage input;
WSMessage output;
*string input_name;
*string output_name;
Namespaces nsc;
*string soapAction;
hash<string, bool> reqh;
hash<string, OperationalBinding> bindings;
public:
private :
hash<string, WSMessage> faults;
public:
constructor(hash<auto> p, Namespaces nsc, *hash<auto> messages) ;
hash<string, WSMessage> getFaultMessages();
bool hasFault(string fault);
setDocStyleBinding(reference idocmap);
markRpcStyleBinding();
list<auto> getTopLevelRequestNames();
OperationalBinding getBinding(*string bname);
addBinding(WSDL::OperationalBinding b);
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);
hash<auto> serializeRequest(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string bname);
hash<auto> serializeResponse(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *bool soap12, *int xml_opts, *string bname);
auto deserializeRequest(hash<auto> o, *string bname);
auto deserializeResponse(hash<auto> o, *string bname);
*hash<auto> deserializeRequestPath(string path, *string bname);
private:
static hash<auto> processNSValue(hash<auto> h);
public:
bool isSoap12();
string getTargetNS();
};
public hashdecl WSDL::ArgInfo {
string name;
string part;
XsdAbstractType type;
XsdElement element;
};
class WSDL::WSMessage : public WSDL::XsdNamedData {
public:
public :
hash<string, hash<WSDL::ArgInfo>> args;
hash<string, string> pmap;
hash<string, XsdAbstractType> tmap;
// keep a weak reference to the namespace map
Namespaces nsc;
public:
constructor(hash<auto> m, hash<string, hash<string, XsdElement>> emap, hash<string, XsdAbstractType> tmap, Namespaces nsc) ;
auto serializeRpcValue(string part, bool encoded, reference h, reference ons);
*hash<auto> serializeRpc(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference h, bool fault);
*hash<auto> serializeDocument(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference h, bool fault);
*hash<auto> deserializeRpc(*hash<auto> mrh, hash<auto> val, *string part);
*hash<auto> deserializeDocument(*hash<auto> mrh, auto val, *string parts);
hash<auto> serializeAllPartData(*hash<auto> val);
hash<auto> serializeData(Namespaces nsc, string key, *hash<auto> val);
hash<auto> deserializeData(string part, hash<auto> val);
hash<auto> deserializeAllPartData(hash<auto> val);
private;
private;
string getSerializedKey(string part);
string checkPart(string pname);
};
// private helper class for lazy name resolution
class WSDL::XsdLateResolverHelper {
public:
private :
list<object> l();
public:
constructor();
add(object v);
list<auto> getList();
clearResolved();
static bool isResolved(XsdTypedData t);
static bool isResolved(XsdSimpleType t);
static bool isResolved(XsdComplexType t);
static bool isResolved(auto t);
};
class WSDL::OperationalBinding : public WSDL::XsdNamedData {
public:
public :
bool docstyle;
*WSDL::BindingMessageDescription input;
*WSDL::BindingMessageDescription output;
*string soapAction;
public:
constructor(string name, string ns, bool docstyle, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
hash<auto> serializeMessage(WSOperation op, *WSMessage msg, bool request, bool soap12, auto h, *hash<auto> header, string enc = "UTF-8", *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string faultmsg);
auto deserializeMessage(WSOperation op, hash<auto> o, bool request);
auto deserializeRequestPath(WSOperation op, string path);
abstract hash<auto> serializeMessageImpl(WSOperation op, *WSMessage msg, bool request, bool soap12, auto h, *hash<auto> header, string enc, *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string faultmsg);
abstract auto deserializeMessageImpl(WSOperation op, hash<auto> o, bool request);
abstract auto deserializeRequestPathImpl(WSOperation op, string path);
};
class WSDL::SoapBinding : public WSDL::OperationalBinding {
public:
public :
string soapTransport;
public:
constructor(string name, string ns, bool docstyle, string soapTransport, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
hash<auto> serializeMessageImpl(WSOperation op, *WSMessage msg, bool request, bool soap12, auto h, *hash<auto> header, string enc, *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string faultmsg);
private;
auto deserializeMessageImpl(WSOperation op, hash<auto> o, bool request);
private;
hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
};
class WSDL::HttpBinding : public WSDL::OperationalBinding {
public:
public :
string httpMethod;
string location;
public:
constructor(string name, string ns, bool docstyle, string httpMethod, string location, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
hash<auto> serializeMessageImpl(WSOperation op, *WSMessage msg, bool request, bool soap12, auto h, *hash<auto> header, string enc, *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string faultmsg);
private;
auto deserializeMessageImpl(WSOperation op, hash<auto> v, bool request);
hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
};
class WSDL::BindingMessageBodyDescription {
public:
public :
bool encoded;
*string encodingStyle;
*string ns;
*list<auto> parts;
public:
constructor(bool encoded, *string encodingStyle, *string ns, *string parts);
bool isMultipart();
};
class WSDL::BindingMessageHeaderDescription {
public:
public :
string part;
bool encoded;
WSMessage msg;
public:
/*
@param part message part name
@param encoded if @ref Qore::True "True", then use = \c "encoded" (each message part references an abstract type using the \c type attribute), otherwise use = \c "literal" (each part references a concrete schema definition using either the \c element or \c type attribute)
@param msg actual message
*/
constructor(string part, bool encoded = False, WSMessage msg);
};
class WSDL::BindingContentDescription {
public:
public :
string part;
// list of accepted content types (with "xxx/*")
list<auto> acceptedContentTypes = ();
// list of accepted specific content types
list<auto> acceptedContentTypeSubtypes = ();
bool formUrlEncoded = False;
bool acceptAllContentTypes = False;
public:
addContentType(string type);
};
class WSDL::MimeXmlMessageDescription {
public:
public :
string part;
public:
constructor(string part);
};
class WSDL::BindingMessageDescription {
public:
public :
*WSDL::BindingMessageBodyDescription body;
*hash<auto> urlReplacement;
bool urlEncoded = False;
*WSDL::BindingContentDescription content;
*WSDL::MimeXmlMessageDescription mimeXml;
public:
private:internal {
list<BindingMessageHeaderDescription> headers = cast<list<BindingMessageHeaderDescription>>(());
}
addHeader(BindingMessageHeaderDescription hdr);
bool hasHeaders();
list<BindingMessageHeaderDescription> getHeaders();
setUrlReplacement(string loc);
};
class WSDL::Binding : public WSDL::XsdNamedData {
public:
private:internal {
string port;
bool docstyle = True;
*string httpMethod;
*string soapTransport;
}
constructor(hash<auto> data, Namespaces nsc, reference portTypes, reference idocmap, *hash<auto> messages) ;
private;
string getPort();
bool isSoapBinding();
bool isHttpBinding();
};
// private namespace prefix redefinition class
class WSDL::NamespacePrefixHelper {
public:
public :
public:
private :
Namespaces nsc;
// overriden prefixes
hash<auto> h;
// overridden target namespace
bool targ_ns;
// overridden default namespace
bool def_ns;
public:
constructor(Namespaces nsc, *hash<auto> nsattr);
destructor();
save(string k, string v);
};
class WSDL::Namespaces {
public:
public :
// options are here since this object is passed through all serialization and deserialization
bool opt_empty_string_is_nothing = False;
bool opt_allow_any_header = False;
public:
private :
hash<string, string> ns = {
"xsd": XSD_NS,
};
hash<string, string> nsr = {
XSD_NS: "xsd",
};
hash<string, bool> xsd_schema = {
"xsd": True,
};
hash<string, string> imap = {
"xsd": XSD_NS,
};
hash<string, string> imapr = {
XSD_NS: "xsd",
};
int nsn;
bool hassoap11 = False;
bool hassoap12 = False;
*string target_ns;
list<auto> nss = ();
*string default_ns;
list<auto> dss = ();
hash<string, XsdBaseType> base_types;
public:
constructor(hash<auto> nsh, *Namespaces nsc);
*string getDefaultNs();
addNamespaces(hash<auto> nsh, *NamespacePrefixHelper nph);
restorePrefixes(hash<auto> h);
private:
addNamespaceIntern(string ns, string val, *bool override);
public:
merge(Namespaces nsc);
string getOutputNamespaceUri(string nsp);
*hash<auto> getOutputNamespaceHash(*hash<auto> nsh);
*string getTargetNamespaceUri();
*string getNamespaceUri(*string nsp);
pushTargetNamespace(string ns);
popTargetNamespace();
pushDefaultNamespace(string ns);
popDefaultNamespace();
string getOutputNamespacePrefix(string ns);
string getTargetNamespaceInputPrefix();
private:
string registerNamespaceIntern(string n_ns);
public:
*hash<auto> getReferencedNamespaceMap();
bool hasSoap11();
bool hasSoap12();
*bool isSchema(string ns);
string getInputNamespaceUri(string nsa);
bool doType(string t, reference<hash> typeinfo, reference<XsdAbstractType> rtype);
hash<auto> getTypeHash(string t);
XsdBaseType getBaseType(string t);
string translateOutputNamespacePrefix(*string nsa);
};
// private functions
XsdAbstractType tmap_get(hash<string, XsdAbstractType> tmap, string name);
*XsdAbstractType tmap_try_get(hash<string, XsdAbstractType> tmap, string name);
// private functions
XsdElement emap_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
*XsdElement emap_try_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
public hashdecl WSDL::PortTypeInfo {
hash<string, WSOperation> operations;
};
public hashdecl WSDL::ServiceInfo {
string name;
hash<string, hash> port;
};
public hashdecl WSDL::OperationInfo {
string port;
WSDL::WSOperation operation;
};
class WSDL::WebService : public WSDL::XsdBase {
public:
public :
string wsdl;
Namespaces nsc;
list<string> wsdl_services();
hash<string, XsdElement> idocmap();
hash<string, hash<string, XsdElement>> emap();
hash<string, WSMessage> messages();
hash<string, XsdAbstractType> tmap();
hash<string, hash<PortTypeInfo>> portType();
*code try_import;
*string def_path;
public:
private :
// service definitions; name -> service info hash
hash<string, hash<WSDL::ServiceInfo>> services();
// service bindings; name -> Binding
hash<string, Binding> binding();
public:
constructor(string str, *hash<auto> opts);
WSDL::WSOperation getOperation(string opname);
softlist<auto> getOperationNames();
WSDL::WSOperation getPortTypeOperation(string ptname, string opname);
WSDL::WSOperation getBindingOperation(*string bname, string opname);
list<hash<OperationInfo>> listOperations();
WSDL::Binding getBinding(string name);
list<hash<WSDL::ServiceInfo>> listServices();
hash<WSDL::ServiceInfo> getService(string name);
hash<auto> getType(string name, auto v);
private:
XsdBaseType getBaseType(string t);
public:
private:
resolveType(XsdSimpleType t);
public:
private:
resolveType(XsdElement xe);
public:
private:
resolveType(XsdAttribute xd);
public:
private:
resolveType(XsdComplexType ct);
public:
private:
XsdAbstractType resolveType(hash<auto> v);
public:
// parse XSD schema types
private:
parseTypes(*hash<auto> data, auto http_client, auto http_headers);
public:
private:
parseMessages(*softlist<auto> message);
public:
private:
parseService(*softlist<auto> svcs);
public:
private:
parsePortType(*softlist<auto> data);
public:
private:
parseBinding(*softlist<auto> bindings);
public:
bool isSoap12();
string getWSDL();
string getWSDL(string base_url);
private:
string getOperationParams(WSMessage msg);
public:
getReport(StringOutputStream stream, *string wsdl_name);
string getReport(*string wsdl_name);
};
class WSDL::WSMessageHelper {
public:
private :
WebService ws;
hash<auto> opts;
public:
const DefaultOpts = (
"comments": False,
"choices": False,
"max_items": 3,
);
constructor(WebService ws, *hash<auto> opts);
private:
hash<auto> getTypeInfo(XsdBaseType t);
public:
private:
hash<auto> getTypeInfo(XsdSimpleType t);
public:
private:
hash<auto> getTypeInfo(XsdComplexType t);
public:
hash<auto> getMessage(XsdElement elem, *softlist<auto> comments);
hash<auto> getMessage(string name);
auto getMessage(WSMessage msg);
};
WSDL::WSOperation::output
WSMessage output
response message
Definition: WSDL.qm.dox.h:676
WSDL::SOAP_11_NS
const SOAP_11_NS
SOAP 1.1 namespace URI.
Definition: WSDL.qm.dox.h:140
WSDL::BindingMessageBodyDescription
describes the message body for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1115
WSDL::ENVELOPE_11_NS
const ENVELOPE_11_NS
soap 1.1 envelope namespaces
Definition: WSDL.qm.dox.h:156
WSDL::XsdTypedData
XSD typed data class.
Definition: WSDL.qm.dox.h:448
WSDL::BindingContentDescription::part
string part
specifies the name of the message part
Definition: WSDL.qm.dox.h:1180
WSDL::WebService::wsdl
string wsdl
the WSDL string
Definition: WSDL.qm.dox.h:1551
WSDL::version
const version
this WSDL implementation version
Definition: WSDL.qm.dox.h:132
WSDL::WebService::try_import
*code try_import
optional closure/call reference to try to resolve import declarations
Definition: WSDL.qm.dox.h:1575
WSDL::Namespaces::base_types
hash< string, XsdBaseType > base_types
base type map
Definition: WSDL.qm.dox.h:1399
WSDL::SoapStyleMap
const SoapStyleMap
SOAP "style" to "document" mappings.
Definition: WSDL.qm.dox.h:184
WSDL::ServiceInfo::name
string name
service name
Definition: WSDL.qm.dox.h:1529
WSDL::ENVELOPE_12_NS
const ENVELOPE_12_NS
soap 1.2 envelope namespaces
Definition: WSDL.qm.dox.h:167
WSDL::BindingMessageHeaderDescription::msg
WSMessage msg
a weak reference to the actual message
Definition: WSDL.qm.dox.h:1158
WSDL::WebService::nsc
Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:1554
WSDL::WSDLLib::SoapMimeTypes
const SoapMimeTypes
Mime types recognized as SOAP messages.
Definition: WSDL.qm.dox.h:241
WSDL::XsdComplexType::cx_type
string cx_type
type of complexType object
Definition: WSDL.qm.dox.h:592
WSDL::WSDLLib::getFile
static data getFile(string fn, bool as_string=True)
retrieves a local file and returns the file&#39;s contents as a string
WSDL::BindingMessageBodyDescription::parts
*list< auto > parts
indicates which parts appear somewhere within the SOAP Body portion of the message ...
Definition: WSDL.qm.dox.h:1132
WSDL::WSOperation
web service operation class
Definition: WSDL.qm.dox.h:669
WSDL::BindingMessageHeaderDescription::encoded
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1155
WSDL::XSI_NS
const XSI_NS
XSI namespace URI.
Definition: WSDL.qm.dox.h:148
WSDL
main WSDL namespace
Definition: WSDL.qm.dox.h:130
WSDL::WSDLLib::getFileFromURL
static data getFileFromURL(string url, string def_protocol="file", *HTTPClient http_client, *hash< auto > http_headers, bool as_string=True, *string def_path, *reference new_def_path)
retrieves a file from a URL
WSDL::WSOperation::input
WSMessage input
request message
Definition: WSDL.qm.dox.h:674
WSDL::BindingContentDescription
describes MIME content information for SOAP operational binding message descriptions ...
Definition: WSDL.qm.dox.h:1175
WSDL::Namespaces
namespace container class
Definition: WSDL.qm.dox.h:1341
WSDL::SOAP_12_NS
const SOAP_12_NS
SOAP 1.2 namespace URI.
Definition: WSDL.qm.dox.h:143
WSDL::XsdBase
base class with helper methods for XSD data processing
Definition: WSDL.qm.dox.h:323
WSDL::XsdArrayType
class for XSD array types; currently only supports "binary"; used, for example with HTTP MultiPart me...
Definition: WSDL.qm.dox.h:434
WSDL::WSOperation::nsc
Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:683
WSDL::XSD_NS
const XSD_NS
XSD namespace URI.
Definition: WSDL.qm.dox.h:146
WSDL::WSOperation::soapAction
*string soapAction
the SOAPAction header value to send with this operation
Definition: WSDL.qm.dox.h:686
WSDL::Namespaces::default_ns
*string default_ns
default namespace for unprefixed definitions
Definition: WSDL.qm.dox.h:1393
WSDL::OperationInfo
WSDL operation info.
Definition: WSDL.qm.dox.h:1535
WSDL::BindingMessageBodyDescription::encodingStyle
*string encodingStyle
when encoded True, this is used to produce a concrete message by applying the specified encoding ...
Definition: WSDL.qm.dox.h:1126
WSDL::ArgInfo
message argument hash description
Definition: WSDL.qm.dox.h:855
WSDL::Namespaces::target_ns
*string target_ns
current target namespace
Definition: WSDL.qm.dox.h:1387
WSDL::SOAP_TRANSPORT
const SOAP_TRANSPORT
known/supported transports
Definition: WSDL.qm.dox.h:213
WSDL::SOAP_12_ENV
const SOAP_12_ENV
SOAP 1.2 envelope URI.
Definition: WSDL.qm.dox.h:137
WSDL::SoapUseMap
const SoapUseMap
SOAP "use" to "encoded" mappings.
Definition: WSDL.qm.dox.h:178
WSDL::XsdNamedData
base class for XSD classes with a "name" attribute
Definition: WSDL.qm.dox.h:340
WSDL::OperationInfo::port
string port
the name of the port defining the operation
Definition: WSDL.qm.dox.h:1537
WSDL::BindingMessageBodyDescription::encoded
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1123
WSDL::MimeXmlMessageDescription
describes a mimeXml payload for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1203
WSDL::WSDLLib::getWebServiceFromUrl
static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash< auto > http_headers)
returns a WebService object from a URL and other optional arguments
WSDL::PortTypeInfo
WSDL port type hash.
Definition: WSDL.qm.dox.h:1522
WSDL::OperationalBinding
class for WSDL bindings associated with a SOAP operation
Definition: WSDL.qm.dox.h:1028
WSDL::WSMessage::pmap
hash< string, string > pmap
Definition: WSDL.qm.dox.h:885
WSDL::WSOperation::reqh
hash< string, bool > reqh
a hash of top-level request names for this operation (depends on bindings)
Definition: WSDL.qm.dox.h:689
WSDL::WSMessage
web service message class
Definition: WSDL.qm.dox.h:876
WSDL::Namespaces::nsn
int nsn
integer providing a sequence for output namespace prefixes
Definition: WSDL.qm.dox.h:1378
WSDL::ChoiceInfo
complex type choice hash
Definition: WSDL.qm.dox.h:548
WSDL::WSDLLib::parseSOAPMessage
static *hash< auto > parseSOAPMessage(hash< auto > msg)
WSDL::ArgInfo::part
string part
unique part name
Definition: WSDL.qm.dox.h:860
WSDL::WSOperation::faults
hash< string, WSMessage > faults
fault messages keyed by fault name
Definition: WSDL.qm.dox.h:698
WSDL::BindingMessageDescription::mimeXml
*WSDL::MimeXmlMessageDescription mimeXml
optional mimeXml message scription
Definition: WSDL.qm.dox.h:1249
WSDL::BindingMessageDescription::body
*WSDL::BindingMessageBodyDescription body
the description of the message body
Definition: WSDL.qm.dox.h:1224
WSDL::SOAP_TRANSPORT_HTTP
const SOAP_TRANSPORT_HTTP
SOAP HTTP transport URI.
Definition: WSDL.qm.dox.h:210
WSDL::WSDLLib::getHTTP
static string getHTTP(string url, *string path, *HTTPClient hc, *hash< auto > headers, bool as_string=True)
retrieves a file from a URL with HTTP and returns the file&#39;s contents as a string ...
WSDL::ServiceInfo::port
hash< string, hash > port
port info
Definition: WSDL.qm.dox.h:1531
WSDL::RANGE_INT
const RANGE_INT
range of "int" values (32 bits)
Definition: WSDL.qm.dox.h:221
WSDL::SOAP_11_ENV
const SOAP_11_ENV
SOAP 1.1 envelope URI.
Definition: WSDL.qm.dox.h:135
WSDL::ArgInfo::name
string name
the arg name
Definition: WSDL.qm.dox.h:857
WSDL::WebService
main class representing a parsed WSDL file
Definition: WSDL.qm.dox.h:1546
WSDL::OperationInfo::operation
WSDL::WSOperation operation
the operation object
Definition: WSDL.qm.dox.h:1540
WSDL::BindingMessageBodyDescription::ns
*string ns
namespace; "only applies to content not explicitly defined by the abstract types" ...
Definition: WSDL.qm.dox.h:1129
WSDL::XsdBaseType
class for XSD base types
Definition: WSDL.qm.dox.h:416
WSDL::HTTP_NS
const HTTP_NS
HTTP namespace URI.
Definition: WSDL.qm.dox.h:151
WSDL::ArgInfo::type
XsdAbstractType type
type for the argument
Definition: WSDL.qm.dox.h:863
WSDL::XsdAttribute
XSD attribute class.
Definition: WSDL.qm.dox.h:462
WSDL::wsdl_set_global_compat_allow_any_header
wsdl_set_global_compat_allow_any_header(softbool val)
sets the global_compat_allow_any_header variable to the given value to force the WSDL module to allow...
WSDL::XsdElement
XSD element class.
Definition: WSDL.qm.dox.h:484
WSDL::SOAP_ENCODING
const SOAP_ENCODING
soap encoding URI
Definition: WSDL.qm.dox.h:190
WSDL::MimeXmlMessageDescription::part
string part
refers to a message part defining the concrete schema of the root XML element
Definition: WSDL.qm.dox.h:1210
WSDL::WSDLLib::getWSDL
static WebService getWSDL(WebService wsdl)
returns the argument
WSDL::BindingMessageDescription::content
*WSDL::BindingContentDescription content
optional content-type descriptions
Definition: WSDL.qm.dox.h:1246
WSDL::WebService::def_path
*string def_path
default path for retrieving XSD references
Definition: WSDL.qm.dox.h:1578
WSDL::ServiceInfo
WSDL service info hash.
Definition: WSDL.qm.dox.h:1527
WSDL::XsdSimpleType
XSD simple type class.
Definition: WSDL.qm.dox.h:525
WSDL::BindingMessageHeaderDescription::part
string part
message part name
Definition: WSDL.qm.dox.h:1149
WSDL::ArgInfo::element
XsdElement element
element for the argument
Definition: WSDL.qm.dox.h:866
WSDL::WSDLLib::getFTP
static data getFTP(string url, string path, bool as_string=True)
retrieves a file from a URL with the FTP protocol and returns the file&#39;s contents as binary or string...
WSDL::wsdl_set_global_compat_empty_string_is_nothing
wsdl_set_global_compat_empty_string_is_nothing(softbool val)
sets the global_compat_empty_string_is_nothing variable to the given value to force the WSDL module t...
WSDL::BindingMessageHeaderDescription
describes a SOAP message header for a SOAP operational binding message description ...
Definition: WSDL.qm.dox.h:1144
WSDL::Binding
class for WSDL bindings
Definition: WSDL.qm.dox.h:1274
WSDL::XsdComplexType
XSD complex type class.
Definition: WSDL.qm.dox.h:554
WSDL::WSOperation::bindings
hash< string, OperationalBinding > bindings
params per associated binding; key = binding name; value = OperationalBinding object ...
Definition: WSDL.qm.dox.h:692
WSDL::any_type_map
const any_type_map
mapping from Qore types to xsd types for xsd type "anyType"
Definition: WSDL.qm.dox.h:193
WSDL::WSDLLib::parseMultiPartSOAPMessage
static hash< auto > parseMultiPartSOAPMessage(hash< auto > msg)
takes a hash representation of a SOAP message and handles multipart messages, checks the content-type...
WSDL::BindingMessageDescription::urlReplacement
*hash< auto > urlReplacement
a hash of URL replacement values keyed by part name, values are URI paths
Definition: WSDL.qm.dox.h:1229
WSDL::XsdNamedData::descriptive_name
descriptive_name
descriptive name flag
Definition: WSDL.qm.dox.h:349
WSDL::WSMessage::tmap
hash< string, XsdAbstractType > tmap
type map
Definition: WSDL.qm.dox.h:888
WSDL::XsdData
base class for XSD data classes
Definition: WSDL.qm.dox.h:332
WSDL::WSMessageHelper
helper class implementing sample message generation
Definition: WSDL.qm.dox.h:1782
WSDL::MIME_NS
const MIME_NS
MIME namespace URI.
Definition: WSDL.qm.dox.h:153
WSDL::WSDLLib::isSOAPMessage
static bool isSOAPMessage(hash< auto > msg)
returns True is the message has a SOAP mime type
WSDL::RANGE_SHORT
const RANGE_SHORT
range of "short" values (16 bits)
Definition: WSDL.qm.dox.h:218
WSDL::WSDLLib
contains helper methods for retrieving WSDLs from a URL
Definition: WSDL.qm.dox.h:237
WSDL::WSMessage::args
hash< string, hash< WSDL::ArgInfo > > args
args keys are part names for types reps. element names for element. Definition must provide unique va...
Definition: WSDL.qm.dox.h:881
WSDL::WSOperation::input_name
*string input_name
request message name
Definition: WSDL.qm.dox.h:678
WSDL::BindingMessageDescription
describes an input or output message in a SOAP operational binding
Definition: WSDL.qm.dox.h:1219
WSDL::WSOperation::output_name
*string output_name
response message name
Definition: WSDL.qm.dox.h:680
WSDL::XsdNamedData::ns
*string ns
input namespace prefix (if any given)
Definition: WSDL.qm.dox.h:347