99 const SOAP_11_ENV =
"http://schemas.xmlsoap.org/soap/envelope/";
107 const SOAP_12_NS =
"http://schemas.xmlsoap.org/wsdl/soap12/";
110 const XSD_NS =
"http://www.w3.org/2001/XMLSchema";
112 const XSI_NS =
"http://www.w3.org/2001/XMLSchema-instance";
115 const HTTP_NS =
"http://schemas.xmlsoap.org/wsdl/http/";
117 const MIME_NS =
"http://schemas.xmlsoap.org/wsdl/mime/";
121 "soapenv:Envelope": (
132 "soapenv:Envelope": (
146 Type::String :
"string",
148 Type::Boolean :
"boolean",
149 Type::Date :
"dateTime",
150 Type::Float :
"decimal",
151 Type::NothingType :
"string",
152 Type::NullType :
"string",
153 Type::Binary :
"base64Binary",
157 const SOAP_SERIALIZATION_ERROR =
"SOAP-SERIALIZATION-ERROR";
158 const SOAP_DESERIALIZATION_ERROR =
"SOAP-DESERIALIZATION-ERROR";
159 const WSDL_ERROR =
"WSDL-ERROR";
186 static data
getFile(
string fn,
bool as_string = True);
191 static string getHTTP(
string url, *
string path, *HTTPClient hc, *hash headers,
bool as_string = True);
196 static data
getFTP(
string url,
string path,
bool as_string = True);
202 static data
getFileFromURL(
string url,
string def_protocol =
"file", *HTTPClient http_client, *hash http_headers,
bool as_string = True, *
string def_path, *reference new_def_path);
209 static data
getFileFromURL(
string url, hash u,
string def_protocol =
"file", *HTTPClient http_client, *hash http_headers,
bool as_string = False, *
string def_path, *reference new_def_path);
219 static string getWSDL(
string wsdl, *HTTPClient http_client, *hash http_headers, *reference new_def_path);
226 static checkSOAPContentType(
string ct);
232 static processHref(reference xmldata,
string hr, hash parts);
238 static substHref(reference xmldata, hash parts);
255 static removeNS(reference v);
257 static removeNS2(reference v);
264 any getValue(*hash mrh, any val);
280 constructor(
string n_name,
string n_ns);
283 constructor(reference e, *
string desc_name);
289 *
string getInputNamespacePrefix();
305 constructor(reference e,
Namespaces n_nsc, *
string desc_name);
308 constructor(
string name,
string ns,
Namespaces n_nsc);
311 private resolveNamespace();
314 checkExtends(XsdAbstractType t,
string ename);
317 string getNameWithNS();
326 string getOutputNamespacePrefix();
329 abstract any serialize(any val, *softbool omit_type, *softbool omit_ns);
330 abstract any deserialize(
string en, *TypeMap tmap, *hash mrh, any val);
341 constructor(
string t,
Namespaces nsc,
string ns =
"xsd");
344 any serialize(any val, *softbool omit_type, *softbool omit_ns);
347 any deserialize(
string en, *TypeMap tmap, *hash mrh, any val);
358 any serialize(any val, *softbool omit_type, *softbool omit_ns);
361 any deserialize(
string en, *TypeMap tmap, *hash mrh, any val);
374 constructor(reference e);
383 string use =
"optional";
385 const AllowedUseValues = (
393 constructor(hash attr,
Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved);
396 any getValue(
string val);
407 bool nillable = False;
412 constructor(hash e,
Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved);
431 any serialize(any h, *softbool omit_type, *softbool omit_ns,
string key,
string typename);
434 any serializeAs(XsdAbstractType type, any h, *softbool omit_type, *softbool omit_ns,
string key,
string typename);
437 private any serializeAsIntern(XsdAbstractType type, any h, *softbool omit_type, *softbool omit_ns,
string key,
string typename);
440 any deserialize(*TypeMap tmap, *hash mrh, any val,
bool present);
454 constructor(hash st,
Namespaces nsc, XsdLateResolverHelper unresolved, *
string desc_name);
457 any serialize(any val, *softbool omit_type, *softbool omit_ns);
460 any deserialize(
string en, *TypeMap tmap, *hash mrh, any val);
474 bool anyAttribute = False;
476 bool nillable = False;
477 bool required = False;
483 *
string documentation;
489 bool finalized = False;
501 const XET_ALL =
"ALL";
502 const XET_CHOICE =
"CHOICE";
503 const XET_SEQUENCE =
"SEQUENCE";
504 const XET_SIMPLE =
"SIMPLE";
505 const XET_NONE =
"NONE";
509 constructor(hash ct,
Namespaces nsc, XsdLateResolverHelper unresolved, *
string desc_name);
515 checkExtends(XsdAbstractType t,
string ename);
518 private parseData(hash d, XsdLateResolverHelper unresolved);
521 private parseAttributes(reference d, XsdLateResolverHelper unresolved);
530 private *hash parseElements(softlist el, XsdLateResolverHelper unresolved,
bool for_object = True);
533 private *hash serializeElement(
string key,
XsdElement element, any h, *softbool omit_type, *softbool omit_ns);
536 *hash serialize(any h, *softbool omit_type, *softbool omit_ns);
539 private hash serializeChoice(hash emap, hash h, *softbool omit_type, *softbool omit_ns);
542 *hash deserialize(
string en, *TypeMap tmap, *hash mrh, any oval);
545 private *hash parseChoice(hash val, hash emap,
string en, *TypeMap tmap, *hash mrh, *
bool required);
562 bool usedocns = False;
564 *
string request_name;
567 bool docstyle = False;
575 constructor(any p, TypeMap n_tmap,
Namespaces n_nsc, *hash messages,
bool n_usedocns = False);
578 setDocStyle(reference idocmap);
581 setTopLevelRequestElement(
string name);
584 string getTopLevelRequestName();
598 hash
serializeRequest(any h, *hash header, *
string enc, *hash nsh, *
int xml_opts);
613 hash
serializeResponse(any h, *hash header, *
string enc, *hash nsh, *
bool soap12, *
int xml_opts);
616 private list processMultiRef(hash body);
633 private hash processNSValue(hash h);
648 setOutputMultipart(any v);
651 private parsePart(reference msg, any part);
654 addOutputPart(any part);
657 setInputMultipart(any v);
660 addInputPart(any part);
663 setInputHeader(
string part,
WSMessage msg,
bool encoded);
675 bool encoded = False;
685 constructor(hash m, ElementMap emap, TypeMap n_tmap,
Namespaces n_nsc);
688 hash serialize(any msginfo, any mpm,
string n_name, any h);
691 hash serializeDocument(*
string k, any msginfo, any mpm, any h,
bool force_ns);
694 any deserialize(*hash mrh, hash val);
697 any deserializeDocument(*hash mrh, any val);
702 class WSDL::XsdLateResolverHelper {
727 bool docStyle = False;
736 constructor(hash data,
Namespaces nsc, hash opmap, reference idocmap, *hash messages);
744 class WSDL::NamespacePrefixHelper {
771 save(
string k,
string v);
836 *
string getDefaultNs();
839 addNamespaces(hash nsh, *NamespacePrefixHelper nph);
842 restorePrefixes(hash h);
845 private addNamespaceIntern(
string ns,
string val, *
bool override);
916 any doType(
string t);
925 class WSDL::MapBase {
940 AbstractIterator iterator();
945 class WSDL::TypeMap :
public WSDL::MapBase {
948 add(XsdAbstractType t);
951 XsdAbstractType
get(
string name);
954 *XsdAbstractType tryGet(
string name);
959 class WSDL::ElementMap :
public WSDL::MapBase {
965 XsdElement
get(
string ns,
string name);
968 *XsdElement tryGet(
string ns,
string name);
986 list wsdl_services = ();
992 bool usedocns = False;
1069 hash getType(
string name, any v);
1087 private XsdAbstractType resolveType(hash v);
1091 private parseTypes(*hash data, any http_client, any http_headers);
1094 private parseMessages(*softlist message);
1097 private parseService(*softlist svcs);
1100 private parsePortType(*softlist data);
1103 private parseBinding(*softlist bindings);
1121 string getWSDL(
string base_url);
string getOutputNamespacePrefix(string ns)
looks up and registers a namespace if necessary, returns the namespace's prefix
const SOAP_11_NS
SOAP 1.1 namespace URI.
Definition: WSDL.qm.dox.h:104
*string getNamespaceUri(*string nsp)
returns the namespace URI for the given prefix or the target namespace Uri
const ENVELOPE_11_NS
soap 1.1 envelope namespaces
Definition: WSDL.qm.dox.h:120
XSD typed data class.
Definition: WSDL.qm.dox.h:366
string wsdl
the WSDL string
Definition: WSDL.qm.dox.h:980
const version
this WSDL implementation version
Definition: WSDL.qm.dox.h:96
hash xsd_schema
hash for valid XSD namespaces, maps input namespace prefixes -> True if it refers to an XSD schema ...
Definition: WSDL.qm.dox.h:795
static data getFileFromURL(string url, string def_protocol="file", *HTTPClient http_client, *hash http_headers, bool as_string=True, *string def_path, *reference new_def_path)
retrieves a file from a URL
bool hassoap11
if True then has SOAP 1.1
Definition: WSDL.qm.dox.h:813
const ENVELOPE_12_NS
soap 1.2 envelope namespaces
Definition: WSDL.qm.dox.h:131
Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:983
const SoapMimeTypes
Mime types recognized as SOAP messages.
Definition: WSDL.qm.dox.h:181
string cx_type
type of complexType object
Definition: WSDL.qm.dox.h:499
WSOperation getOperation(string opname)
returns the given operation or throws an exception if it cannot be found; operations are searched in ...
static data getFile(string fn, bool as_string=True)
retrieves a local file and returns the file's contents as a string
web service operation class
Definition: WSDL.qm.dox.h:550
string translateOutputNamespacePrefix(*string nsa)
returns the output namespace prefix for the given input namespace prefix
const XSI_NS
XSI namespace URI.
Definition: WSDL.qm.dox.h:112
main WSDL namespace
Definition: WSDL.qm.dox.h:94
namespace container class
Definition: WSDL.qm.dox.h:776
popTargetNamespace()
restores any previous target namespace URI from the stack to the current target namespace URI ...
pushTargetNamespace(string ns)
pushes the current target namespace URI on the stack when parsing schemas and sets the current target...
const SOAP_12_NS
SOAP 1.2 namespace URI.
Definition: WSDL.qm.dox.h:107
hash imap
hash mapping input namespace prefixes to namespaces URIs
Definition: WSDL.qm.dox.h:800
pushDefaultNamespace(string ns)
pushes the current default namespace URI on the stack when parsing schemas and sets the current defau...
base class with helper methods for XSD data processing
Definition: WSDL.qm.dox.h:244
class for XSD array types; currently only supports "binary"; used, for example with HTTP MultiPart me...
Definition: WSDL.qm.dox.h:352
any deserializeRequest(hash o)
parses a hash representing a parsed XML request (parsed with parseXMLAsData()) for the operation and ...
bool hassoap12
if True then has SOAP 1.2
Definition: WSDL.qm.dox.h:816
string getOutputNamespaceUri(string nsp)
returns the namespace URI for the given output namespace prefix
const XSD_NS
XSD namespace URI.
Definition: WSDL.qm.dox.h:110
*string default_ns
default namespace for unprefixed definitions
Definition: WSDL.qm.dox.h:825
*string target_ns
current target namespace
Definition: WSDL.qm.dox.h:819
const SOAP_TRANSPORT
known/supported transports
Definition: WSDL.qm.dox.h:165
bool isSoap12()
returns True if the operation is a SOAP 1.2 operation
merge(Namespaces nsc)
merges namespaces when parsing imported schemas
any deserializeResponse(hash o)
parses a hash representing a parsed XML response (parsed with parse_xml()) for the operation and retu...
const SOAP_12_ENV
SOAP 1.2 envelope URI.
Definition: WSDL.qm.dox.h:101
base class for XSD classes with a "name" attribute
Definition: WSDL.qm.dox.h:269
string getTargetNamespaceInputPrefix()
looks up and registers a namespace if necessary, returns the namespace's prefix
popDefaultNamespace()
restores any previous default namespace URI from the stack to the current default namespace URI ...
hash nsr
maps namespace URIs to output namespace prefixes
Definition: WSDL.qm.dox.h:790
hash ns
maps output namespace prefixes to namespace URIs
Definition: WSDL.qm.dox.h:785
list listOperations()
returns a list of hashes giving supported operation names for each port in the WSDL ...
web service message class
Definition: WSDL.qm.dox.h:668
static hash parseSOAPMessage(hash msg)
takes a hash representation of a SOAP message and parses it to a Qore data structure; handles multipa...
*string getTargetNamespaceUri()
returns the primary target namespace Uri
int nsn
integer providing a sequence for output namespace prefixes
Definition: WSDL.qm.dox.h:810
constructor(string str, *hash opts)
creates the WebService object
*hash getReferencedNamespaceMap()
returns a hash of namespace prefixes to namespaces URIs actually used
hash imapr
hash mapping input namespace URIs to input namespace prefixes
Definition: WSDL.qm.dox.h:805
const SOAP_TRANSPORT_HTTP
SOAP HTTP transport URI.
Definition: WSDL.qm.dox.h:162
const RANGE_INT
range of "int" values (32 bits)
Definition: WSDL.qm.dox.h:173
const SOAP_11_ENV
SOAP 1.1 envelope URI.
Definition: WSDL.qm.dox.h:99
*hash getOutputNamespaceHash(*hash nsh)
returns a hash of namespace attributes for outgoing SOAP messages
bool isSoap12()
returns True if the WSDL describes a SOAP 1.2 service
main class representing a parsed WSDL file
Definition: WSDL.qm.dox.h:975
constructor(hash nsh, *Namespaces nsc)
creates the object with the WSDL definitions attribute hash
class for XSD base types
Definition: WSDL.qm.dox.h:334
const HTTP_NS
HTTP namespace URI.
Definition: WSDL.qm.dox.h:115
string getWSDL()
returns the XML string for the WSDL
list listServices()
returns a list of services defined in the WSDL
XSD attribute class.
Definition: WSDL.qm.dox.h:379
XSD element class.
Definition: WSDL.qm.dox.h:401
hash getService(string name)
returns a hash describing the requested service
static string getHTTP(string url, *string path, *HTTPClient hc, *hash headers, bool as_string=True)
retrieves a file from a URL with HTTP and returns the file's contents as a string ...
const SOAP_ENCODING
soap encoding URI
Definition: WSDL.qm.dox.h:142
string getInputNamespaceUri(string nsa)
returns the input namespace URI from the input namespace prefix
string getTargetNS()
returns the target namespace for the operation
list dss
default namespace stack;
Definition: WSDL.qm.dox.h:828
static WebService getWSDL(WebService wsdl)
returns the argument
*string def_path
default path for retrieving XSD references
Definition: WSDL.qm.dox.h:996
list nss
target namespace stack;
Definition: WSDL.qm.dox.h:822
XSD simple type class.
Definition: WSDL.qm.dox.h:445
hash serializeResponse(any h, *hash header, *string enc, *hash nsh, *bool soap12, *int xml_opts)
serializes a SOAP response to an XML string for the operation
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's contents as binary or string...
class for WSDL bindings
Definition: WSDL.qm.dox.h:723
XSD complex type class.
Definition: WSDL.qm.dox.h:465
bool hasSoap11()
returns True if using SOAP 1.1, False if not
const any_type_map
mapping from Qore types to xsd types for xsd type "anyType"
Definition: WSDL.qm.dox.h:145
bool hasSoap12()
returns True if using SOAP 1.2, False if not
base class for XSD data classes
Definition: WSDL.qm.dox.h:261
const MIME_NS
MIME namespace URI.
Definition: WSDL.qm.dox.h:117
*bool isSchema(string ns)
returns True if if the input namespace prefix refers to the XSD namespace URI
const RANGE_SHORT
range of "short" values (16 bits)
Definition: WSDL.qm.dox.h:170
contains helper methods for retrieving WSDLs from a URL
Definition: WSDL.qm.dox.h:177
private string registerNamespaceIntern(string n_ns)
registers a namespace internally
hash serializeRequest(any h, *hash header, *string enc, *hash nsh, *int xml_opts)
serializes a request to an XML string for the operation
WSDL::Binding getBinding(string name)
return a WSDL::Binding object describing the requested binding
*string ns
input namespace prefix (if any given)
Definition: WSDL.qm.dox.h:276