Qore WSDL Module Reference  0.3.5
WSDL.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* WSDL.qm Copyright (C) 2012 - 2016 David Nichols
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // make sure we have the required qore version
26 
27 // requires XML functionality
28 
29 // need mime definitions
30 
31 // do not use $ for vars
32 
33 
34 
35 /*
36  WSDL classes
37  provides some minimal WSDL and XSD support for SOAP messaging used by the SoapClient class and the SoapHandler
38 
39  not complete, needs namespace verification, improved XSD support, element groups, etc
40 */
41 
93 namespace WSDL {
96  const version = "0.3.5";
97 
99  const SOAP_11_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
101  const SOAP_12_ENV = "http://www.w3.org/2003/05/soap-envelope";
102 
104  const SOAP_11_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
105 
107  const SOAP_12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
108 
110  const XSD_NS = "http://www.w3.org/2001/XMLSchema";
112  const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
113 
115  const HTTP_NS = "http://schemas.xmlsoap.org/wsdl/http/";
117  const MIME_NS = "http://schemas.xmlsoap.org/wsdl/mime/";
118 
120  const ENVELOPE_11_NS = (
121  "soapenv:Envelope": (
122  "^attributes^": (
123  "xmlns:soapenv": SOAP_11_ENV,
124  "xmlns:xsd": XSD_NS,
125  "xmlns:xsi": XSI_NS,
126  ),
127  ),
128  );
129 
131  const ENVELOPE_12_NS = (
132  "soapenv:Envelope": (
133  "^attributes^": (
134  "xmlns:soapenv": SOAP_12_ENV,
135  "xmlns:xsd": XSD_NS,
136  "xmlns:xsi": XSI_NS,
137  ),
138  ),
139  );
140 
142  const SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
143 
145  const any_type_map = (
146  Type::String : "string",
147  Type::Int : "long",
148  Type::Boolean : "boolean",
149  Type::Date : "dateTime",
150  Type::Float : "decimal",
151  Type::NothingType : "string",
152  Type::NullType : "string",
153  Type::Binary : "base64Binary",
154  );
155 
156  // error codes
157  const SOAP_SERIALIZATION_ERROR = "SOAP-SERIALIZATION-ERROR";
158  const SOAP_DESERIALIZATION_ERROR = "SOAP-DESERIALIZATION-ERROR";
159  const WSDL_ERROR = "WSDL-ERROR";
160 
162  const SOAP_TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
163 
165  const SOAP_TRANSPORT = (
166  SOAP_TRANSPORT_HTTP: True,
167  );
168 
170  const RANGE_SHORT = (-32768, 32767);
171 
173  const RANGE_INT = (-2147483648, 2147483647);
174 };
175 
178 
179 public:
181  const SoapMimeTypes = (MimeTypeSoapXml, MimeTypeXml, MimeTypeXmlApp);
182 
184 
186  static data getFile(string fn, bool as_string = True);
187 
189 
191  static string getHTTP(string url, *string path, *HTTPClient hc, *hash headers, bool as_string = True);
192 
194 
196  static data getFTP(string url, string path, bool as_string = True);
197 
199 
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);
203 
204 
206 
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);
210 
211 
213  static WebService getWSDL(WebService wsdl);
214 
216 
219  static string getWSDL(string wsdl, *HTTPClient http_client, *hash http_headers, *reference new_def_path);
220 
222  static hash parseSOAPMessage(hash msg);
223 
224 
225 private:
226  static checkSOAPContentType(string ct);
227 public:
228 
229 
230 
231 private:
232  static processHref(reference xmldata, string hr, hash parts);
233 public:
234 
235 
236 
237 private:
238  static substHref(reference xmldata, hash parts);
239 public:
240 
241 };
242 
245 
246 public:
247  /*
248  static private hash doType(string t) {
249  #printf("DEBUG: XsdBase::doType(%y)\n", t);
250  my (*string ns, *string type) = t =~ x/(\w+):(\w+)/;
251  return !exists type ? ("val": t) : ("ns": ns, "val": type);
252  }
253  */
254 
255  static removeNS(reference v);
256 
257  static removeNS2(reference v);
258 };
259 
261 class WSDL::XsdData : public WSDL::XsdBase {
262 
263 public:
264  any getValue(*hash mrh, any val);
265 
266 };
267 
270 
271 public:
272  public :
273  // name of object
274  string name;
276  *string ns;
277 
278 public:
279 
280  constructor(string n_name, string n_ns);
281 
282 
283  constructor(reference e, *string desc_name);
284 
285 
286  string getName();
287 
288 
289  *string getInputNamespacePrefix();
290 
291 };
292 
293 class WSDL::XsdAbstractType : public WSDL::XsdNamedData {
294 
295 public:
296  public :
298  Namespaces nsc;
299 
301  string ons;
302 
303 public:
304 
305  constructor(reference e, Namespaces n_nsc, *string desc_name);
306 
307 
308  constructor(string name, string ns, Namespaces n_nsc);
309 
310 
311  private resolveNamespace();
312 
313 
314  checkExtends(XsdAbstractType t, string ename);
315 
316 
317  string getNameWithNS();
318 
319 
320  bool isNillable();
321 
322 
323  bool isRequired();
324 
325 
326  string getOutputNamespacePrefix();
327 
328 
329  abstract any serialize(any val, *softbool omit_type, *softbool omit_ns);
330  abstract any deserialize(string en, *TypeMap tmap, *hash mrh, any val);
331 };
332 
334 class WSDL::XsdBaseType : public WSDL::XsdAbstractType {
335 
336 public:
337  public :
338 
339 public:
340 
341  constructor(string t, Namespaces nsc, string ns = "xsd");
342 
343 
344  any serialize(any val, *softbool omit_type, *softbool omit_ns);
345 
346 
347  any deserialize(string en, *TypeMap tmap, *hash mrh, any val);
348 
349 };
350 
352 class WSDL::XsdArrayType : public WSDL::XsdAbstractType {
353 
354 public:
355  constructor(string t, Namespaces nsc);
356 
357 
358  any serialize(any val, *softbool omit_type, *softbool omit_ns);
359 
360 
361  any deserialize(string en, *TypeMap tmap, *hash mrh, any val);
362 
363 };
364 
367 
368 public:
369  public :
370  any type;
371 
372 public:
373 
374  constructor(reference e);
375 
376 };
377 
380 
381 public:
382  public :
383  string use = "optional";
384 
385  const AllowedUseValues = (
386  "optional": True,
387  "required": True,
388  "prohibited": True,
389  );
390 
391 public:
392 
393  constructor(hash attr, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved);
394 
395 
396  any getValue(string val);
397 
398 };
399 
402 
403 public:
404  public :
405  int minOccurs = 1;
406  int maxOccurs = 1;
407  bool nillable = False;
408  *string ref;
409 
410 public:
411 
412  constructor(hash e, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved);
413 
414 
415  assimilate(WSDL::XsdElement other);
416 
417 
418  bool isRequired();
419 
420 
421  bool isNillable();
422 
423 
424  /*
425  bool isRequired() {
426  #printf("DBG %y: required nillable: %y minOccurs: %y type: %y\n", name, nillable, minOccurs, ((type instanceof XsdAbstractType && type.isRequired()) | True));
427  return !nillable && minOccurs && ((type instanceof XsdAbstractType && type.isRequired()) | True);
428  }
429  */
430 
431  any serialize(any h, *softbool omit_type, *softbool omit_ns, string key, string typename);
432 
433 
434  any serializeAs(XsdAbstractType type, any h, *softbool omit_type, *softbool omit_ns, string key, string typename);
435 
436 
437  private any serializeAsIntern(XsdAbstractType type, any h, *softbool omit_type, *softbool omit_ns, string key, string typename);
438 
439 
440  any deserialize(*TypeMap tmap, *hash mrh, any val, bool present);
441 
442 };
443 
445 class WSDL::XsdSimpleType : public WSDL::XsdAbstractType {
446 
447 public:
448  public :
449  hash enum;
450  any type;
451 
452 public:
453 
454  constructor(hash st, Namespaces nsc, XsdLateResolverHelper unresolved, *string desc_name);
455 
456 
457  any serialize(any val, *softbool omit_type, *softbool omit_ns);
458 
459 
460  any deserialize(string en, *TypeMap tmap, *hash mrh, any val);
461 
462 };
463 
465 class WSDL::XsdComplexType : public WSDL::XsdAbstractType {
466 
467 public:
468  public :
469  any array;
470  any restriction;
471  *string extension;
472 
473  *hash elementmap;
474  bool anyAttribute = False;
475 
476  bool nillable = False;
477  bool required = False;
478 
479  // attributes
480  hash attrs;
481 
482  // any annotated documentation
483  *string documentation;
484 
485  // simpleContent type
486  any simpleType;
487 
488  // finalization flag
489  bool finalized = False;
490 
491  // multiple choice blocks
492  list choices = ();
493 
494 public:
495 
496  private :
497 
499  string cx_type;
500 
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";
506 
507 public:
508 
509  constructor(hash ct, Namespaces nsc, XsdLateResolverHelper unresolved, *string desc_name);
510 
511 
512  finalize(TypeMap tmap, Namespaces nsc);
513 
514 
515  checkExtends(XsdAbstractType t, string ename);
516 
517 
518  private parseData(hash d, XsdLateResolverHelper unresolved);
519 
520 
521  private parseAttributes(reference d, XsdLateResolverHelper unresolved);
522 
523 
524  bool isNillable();
525 
526 
527  bool isRequired();
528 
529 
530  private *hash parseElements(softlist el, XsdLateResolverHelper unresolved, bool for_object = True);
531 
532 
533  private *hash serializeElement(string key, XsdElement element, any h, *softbool omit_type, *softbool omit_ns);
534 
535 
536  *hash serialize(any h, *softbool omit_type, *softbool omit_ns);
537 
538 
539  private hash serializeChoice(hash emap, hash h, *softbool omit_type, *softbool omit_ns);
540 
541 
542  *hash deserialize(string en, *TypeMap tmap, *hash mrh, any oval);
543 
544 
545  private *hash parseChoice(hash val, hash emap, string en, *TypeMap tmap, *hash mrh, *bool required);
546 
547 };
548 
551 
552 public:
553  public :
554  WSMessage input;
555  WSMessage output;
556  *string input_name;
557  *string output_name;
558  TypeMap tmap;
559 
560  Namespaces nsc;
561 
562  bool usedocns = False;
563  *string soapAction;
564  *string request_name;
565  *hash inp;
566  outp;
567  bool docstyle = False;
568 
569  // info about soap header requirements
570  hash iheader;
571  hash oheader;
572 
573 public:
574 
575  constructor(any p, TypeMap n_tmap, Namespaces n_nsc, *hash messages, bool n_usedocns = False);
576 
577 
578  setDocStyle(reference idocmap);
579 
580 
581  setTopLevelRequestElement(string name);
582 
583 
584  string getTopLevelRequestName();
585 
586 
588 
598  hash serializeRequest(any h, *hash header, *string enc, *hash nsh, *int xml_opts);
599 
600 
602 
613  hash serializeResponse(any h, *hash header, *string enc, *hash nsh, *bool soap12, *int xml_opts);
614 
615 
616  private list processMultiRef(hash body);
617 
618 
620 
623  any deserializeRequest(hash o);
624 
625 
627 
630  any deserializeResponse(hash o);
631 
632 
633  private hash processNSValue(hash h);
634 
635 
637 
639  bool isSoap12();
640 
641 
643 
645  string getTargetNS();
646 
647 
648  setOutputMultipart(any v);
649 
650 
651  private parsePart(reference msg, any part);
652 
653 
654  addOutputPart(any part);
655 
656 
657  setInputMultipart(any v);
658 
659 
660  addInputPart(any part);
661 
662 
663  setInputHeader(string part, WSMessage msg, bool encoded);
664 
665 };
666 
669 
670 public:
671  public :
672  hash args;
673  // part map; maps element names to part names
674  hash pmap;
675  bool encoded = False;
676 
677  // keep a reference to Namespaces
678  Namespaces nsc;
679 
680  // keep a reference to the type map
681  TypeMap tmap;
682 
683 public:
684 
685  constructor(hash m, ElementMap emap, TypeMap n_tmap, Namespaces n_nsc);
686 
687 
688  hash serialize(any msginfo, any mpm, string n_name, any h);
689 
690 
691  hash serializeDocument(*string k, any msginfo, any mpm, any h, bool force_ns);
692 
693 
694  any deserialize(*hash mrh, hash val);
695 
696 
697  any deserializeDocument(*hash mrh, any val);
698 
699 };
700 
701 // private helper class for lazy name resolution
702 class WSDL::XsdLateResolverHelper {
703 
704 public:
705 private:
706  list l = ();
707 public:
708 
709  constructor();
710 
711 
712  add(any v);
713 
714 
715  list getList();
716 
717 
718  clearResolved();
719 
720 };
721 
724 
725 public:
726  public :
727  bool docStyle = False;
728 
729 public:
730 
731  private :
732  string port;
733 
734 public:
735 
736  constructor(hash data, Namespaces nsc, hash opmap, reference idocmap, *hash messages);
737 
738 
739  string getPort();
740 
741 };
742 
743 // private namespace prefix redefinition class
744 class WSDL::NamespacePrefixHelper {
745 
746 public:
747  public :
748 
749 public:
750 
751  private :
752  Namespaces nsc;
753 
754  // overriden prefixes
755  hash h;
756 
757  // overridden target namespace
758  bool targ_ns;
759 
760  // overridden default namespace
761  bool def_ns;
762 
763 public:
764 
765  constructor(Namespaces n_nsc, *hash nsattr);
766 
767 
768  destructor();
769 
770 
771  save(string k, string v);
772 
773 };
774 
777 
778 public:
779  public :
780 
781 public:
782 
783  private :
785  hash ns = (
786  "xsd": XSD_NS,
787  );
788 
790  hash nsr = (
791  XSD_NS: "xsd",
792  );
793 
795  hash xsd_schema = (
796  "xsd": True,
797  );
798 
800  hash imap = (
801  "xsd": XSD_NS,
802  );
803 
805  hash imapr = (
806  XSD_NS: "xsd",
807  );
808 
810  int nsn;
811 
813  bool hassoap11 = False;
814 
816  bool hassoap12 = False;
817 
819  *string target_ns;
820 
822  list nss = ();
823 
825  *string default_ns;
826 
828  list dss = ();
829 
830 public:
831 
833  constructor(hash nsh, *Namespaces nsc);
834 
835 
836  *string getDefaultNs();
837 
838 
839  addNamespaces(hash nsh, *NamespacePrefixHelper nph);
840 
841 
842  restorePrefixes(hash h);
843 
844 
845  private addNamespaceIntern(string ns, string val, *bool override);
846 
847 
849  merge(Namespaces nsc);
850 
851 
853  string getOutputNamespaceUri(string nsp);
854 
855 
857  *hash getOutputNamespaceHash(*hash nsh);
858 
859 
861  *string getTargetNamespaceUri();
862 
863 
865  *string getNamespaceUri(*string nsp);
866 
867 
869  pushTargetNamespace(string ns);
870 
871 
874 
875 
877  pushDefaultNamespace(string ns);
878 
879 
882 
883 
885  string getOutputNamespacePrefix(string ns);
886 
887 
890 
891 
893  private string registerNamespaceIntern(string n_ns);
894 
895 
898 
899 
901  bool hasSoap11();
902 
903 
905  bool hasSoap12();
906 
907 
909  *bool isSchema(string ns);
910 
911 
913  string getInputNamespaceUri(string nsa);
914 
915 
916  any doType(string t);
917 
918 
920  string translateOutputNamespacePrefix(*string nsa);
921 
922 };
923 
924 // private class
925 class WSDL::MapBase {
926 
927 public:
928 private:
929 
930 public:
931 
932  private :
933  hash dh;
934 
935 public:
936 
937  list keys();
938 
939 
940  AbstractIterator iterator();
941 
942 };
943 
944 // private class
945 class WSDL::TypeMap : public WSDL::MapBase {
946 
947 public:
948  add(XsdAbstractType t);
949 
950 
951  XsdAbstractType get(string name);
952 
953 
954  *XsdAbstractType tryGet(string name);
955 
956 };
957 
958 // private class
959 class WSDL::ElementMap : public WSDL::MapBase {
960 
961 public:
962  add(XsdElement e);
963 
964 
965  XsdElement get(string ns, string name);
966 
967 
968  *XsdElement tryGet(string ns, string name);
969 
970 };
971 
973 
976 
977 public:
978  public :
980  string wsdl;
981 
984 
985  hash base_type;
986  list wsdl_services = ();
987  hash idocmap;
988  hash opmap;
989  ElementMap emap();
990  hash messages;
991  TypeMap tmap();
992  bool usedocns = False;
993  hash portType;
994  *code try_import;
996  *string def_path;
997 
998 public:
999 
1000  private :
1001  // service definitions; name -> service hash
1002  hash services;
1003 
1004  // service bindings; name -> hash
1005  hash binding;
1006 
1007 public:
1008 
1010 
1017  constructor(string str, *hash opts);
1018 
1019 
1021  WSOperation getOperation(string opname);
1022 
1023 
1025  WSOperation getOperation(string port, string opname);
1026 
1027 
1029 
1033  list listOperations();
1034 
1035 
1037 
1043  WSDL::Binding getBinding(string name);
1044 
1045 
1047 
1053  list listServices();
1054 
1055 
1057 
1066  hash getService(string name);
1067 
1068 
1069  hash getType(string name, any v);
1070 
1071 
1072  private XsdBaseType getBaseType(string t);
1073 
1074 
1075  private resolveType(XsdSimpleType t);
1076 
1077 
1078  private resolveType(XsdElement xe);
1079 
1080 
1081  private resolveType(XsdTypedData xd);
1082 
1083 
1084  private resolveType(XsdComplexType ct);
1085 
1086 
1087  private XsdAbstractType resolveType(hash v);
1088 
1089 
1090  // parse XSD schema types
1091  private parseTypes(*hash data, any http_client, any http_headers);
1092 
1093 
1094  private parseMessages(*softlist message);
1095 
1096 
1097  private parseService(*softlist svcs);
1098 
1099 
1100  private parsePortType(*softlist data);
1101 
1102 
1103  private parseBinding(*softlist bindings);
1104 
1105 
1107 
1109  bool isSoap12();
1110 
1111 
1113 
1115  string getWSDL();
1116 
1117 
1119 
1121  string getWSDL(string base_url);
1122 
1123 };
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