Qore WSDL Module Reference  0.5.1
WSDL.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* WSDL.qm Copyright (C) 2012 - 2022 Qore Technologies, s.r.o.
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 
32 // do not use $ for vars
33 
34 // allow the use of the := weak reference assignment operator
35 
36 
37 
38 /*
39  WSDL classes
40  provides some minimal WSDL and XSD support for SOAP messaging used by the SoapClient class and the SoapHandler
41 
42  not complete, needs namespace verification, improved XSD support, element groups, etc
43 */
44 
171 namespace WSDL {
173  const version = "0.3.6";
174 
176  const SOAP_11_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
178  const SOAP_12_ENV = "http://www.w3.org/2003/05/soap-envelope";
179 
181  const SOAP_11_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
182 
184  const SOAP_12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
185 
187  const XSD_NS = "http://www.w3.org/2001/XMLSchema";
189  const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
190 
192  const HTTP_NS = "http://schemas.xmlsoap.org/wsdl/http/";
194  const MIME_NS = "http://schemas.xmlsoap.org/wsdl/mime/";
195 
197  const ENVELOPE_11_NS = ...;
198 
199 
201  const ENVELOPE_12_NS = ...;
202 
203 
205  const SoapUseMap = ...;
206 
207 
209  const SoapStyleMap = ...;
210 
211 
213  const SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
214 
216  const any_type_map = ...;
217 
218 
219  // error codes
220  const SOAP_SERIALIZATION_ERROR = "SOAP-SERIALIZATION-ERROR";
221  const SOAP_DESERIALIZATION_ERROR = "SOAP-DESERIALIZATION-ERROR";
222  const WSDL_ERROR = "WSDL-ERROR";
223 
225  const SOAP_TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
226 
228  const SOAP_TRANSPORT = ...;
229 
230 
232  const RANGE_SHORT = (-32768, 32767);
233 
235  const RANGE_INT = (-2147483648, 2147483647);
236 
237  // private global variables
238  extern bool global_compat_empty_string_is_nothing;
239  extern bool global_compat_allow_any_header;
240 
243 
244 
247 
248 };
249 
252 
253 public:
255  const SoapMimeTypes = (MimeTypeSoapXml, MimeTypeXml, MimeTypeXmlApp);
256 
257  static string getSoapMimeType12(bool soap12);
258 
260 
262  static data getFile(string fn, bool as_string = True);
263 
265 
267  static string getHTTP(string url, *string path, *HTTPClient hc, *hash<auto> headers, bool as_string = True);
268 
270 
272  static data getFTP(string url, string path, bool as_string = True);
273 
275 
282  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);
283 
285 
292  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);
293 
296 
298 
301  static string getWSDL(string wsdl, *HTTPClient http_client, *hash<auto> http_headers, *reference new_def_path);
302 
304 
308  static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash<auto> http_headers);
309 
311  static hash<auto> parseMultiPartSOAPMessage(hash<auto> msg);
312 
314  static bool isSOAPMessage(hash<auto> msg);
315 
320  static *hash<auto> parseSOAPMessage(hash<auto> msg);
321 
322 protected:
323  static processHref(reference xmldata, string hr, hash<auto> parts);
324 public:
325 
326 
327 protected:
328  static substHref(reference xmldata, hash<auto> parts);
329 public:
330 
331 };
332 
333 // private, nmon-exported class
334 class WsdlLibPriv {
335 
336 public:
337  static bool isContentType(string ct, list<auto> MimeTypes);
338 
339  static checkContentType(string ct, list<auto> MimeTypes);
340 };
341 
343 class WSDL::XsdBase : public Qore::Serializable {
344 
345 public:
346  static removeNS(reference v);
347 
348  static removeNS2(reference v);
349 };
350 
352 class WSDL::XsdData : public WSDL::XsdBase {
353 
354 public:
355  auto getValue(*hash<auto> mrh, auto val);
356 
357 };
358 
361 
362 public:
363  // name of object
364  string name;
366  *string ns;
369 
370  constructor(string n_name, string n_ns);
371 
372 
373  constructor(reference e, *string desc_name);
374 
375 
376  string getName();
377 
378 
379  *string getInputNamespacePrefix();
380 
381 
382  bool hasRealName();
383 
384 };
385 
386 class WSDL::XsdAbstractType : public WSDL::XsdNamedData {
387 
388 public:
390  Namespaces nsc;
391 
393  string ons;
394 
395  constructor(reference e, Namespaces nsc, *string desc_name) ;
396 
397 
398  constructor(string name, string ns, Namespaces nsc) ;
399 
400 
401 protected:
402  resolveNamespace();
403 public:
404 
405 
406  checkExtends(XsdAbstractType t, string ename);
407 
408 
409  string getNameWithNS();
410 
411 
412  bool isNillable();
413 
414 
415  bool isRequired();
416 
417 
418  bool requiresValue();
419 
420 
421  string getOutputNamespacePrefix();
422 
423 
424  abstract auto serialize(Namespaces nsc, auto val, *softbool omitType);
425  abstract auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
426  abstract AbstractDataProviderType getDataProviderType();
427 };
428 
430 class WSDL::XsdBaseType : public WSDL::XsdAbstractType {
431 
432 public:
433 
434  constructor(string t, Namespaces nsc, string ns = 'xsd') ;
435 
436 
437  auto serialize(Namespaces nsc, auto val, *softbool omitType);
438 
439 
440  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
441 
442 
443  AbstractDataProviderType getDataProviderType();
444 
445 
446  Type getDataProviderBaseType();
447 
448 };
449 
451 class WSDL::XsdArrayType : public WSDL::XsdAbstractType {
452 
453 public:
454 protected:
455  bool finalized;
456 
457 public:
458 
459  *hash<auto> typeinfo;
460  XsdAbstractType elementType;
461 
462  constructor(string t, string ns, string arrayType, Namespaces nsc, XsdLateResolverHelper unresolved) ;
463 
464 
465  AbstractDataProviderType getDataProviderType();
466 
467 
468  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
469 
470 
471  auto serialize(Namespaces nsc, auto val, *softbool omitType);
472 
473 
474  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
475 
476 };
477 
480 
481 public:
482  *hash<auto> typeinfo;
483  XsdAbstractType type;
484 
485  constructor(reference e) ;
486 
487 };
488 
491 
492 public:
493  string use = "optional";
494 
495  const AllowedUseValues = ...;
496 
497 
498  constructor(hash<auto> attr, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved) ;
499 
500 
501  auto getValue(string val);
502 
503 };
504 
507 
508 public:
509  int minOccurs = 1;
510  int maxOccurs = 1;
511  bool nillable = False;
512  // the resolved namespace URI for any reference
513  *string ref_ns;
514  // the source name for any reference
515  *string ref;
516  bool usedocns;
517 
518  constructor(hash<auto> e, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved, bool n_usedocns) ;
519 
520 
521  AbstractDataProviderType getDataProviderType();
522 
523 
524  assimilate(WSDL::XsdElement other);
525 
526 
527  bool isRequired();
528 
529 
530  bool isNillable();
531 
532 
533  auto serialize(Namespaces nsc, auto h, *softbool omitType, string key, string typename);
534 
535 
536 protected:
537  auto serializeAsIntern(Namespaces nsc, XsdAbstractType type, auto h, *softbool omitType, string key, string typename);
538 public:
539 
540 
541  auto deserialize(hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val, bool present);
542 
543 };
544 
546 class WSDL::XsdSimpleType : public WSDL::XsdAbstractType {
547 
548 public:
549  hash<auto> enum;
550  hash<auto> typeinfo;
551  list<hash<auto>> union;
552  list<XsdAbstractType> unionTypes;
553  XsdSimpleType unionSimpleType;
554  XsdAbstractType type;
555  bool usedocns;
556 
557  constructor(hash<auto> st, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
558 
559 
560  AbstractDataProviderType getDataProviderType();
561 
562 
563  auto serialize(Namespaces nsc, auto val, *softbool omitType);
564 
565 
566  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
567 
568 };
569 
571 public hashdecl WSDL::ChoiceInfo {
572  hash<string, XsdElement> elementmap;
573  bool required;
574 };
575 
577 class WSDL::XsdComplexType : public WSDL::XsdAbstractType {
578 
579 public:
580  *XsdArrayType array;
581  *string arrayType;
582  *string restriction;
583  *string extension;
584 
585  bool usedocns;
586 
587  hash<string, XsdElement> elementmap();
588  bool anyAttribute = False;
589 
590  bool nillable = False;
591  bool required = False;
592  bool requires_value = False;
593 
594  // attributes
595  hash<string, XsdAttribute> attrs();
596 
597  // any annotated documentation
598  *string documentation;
599 
600  // temporarily used to store type information to resolve simpleType
601  *hash<auto> simpleTypeInfo;
602  // simpleContent type
603  XsdAbstractType simpleType;
604 
605  // finalization flag
606  bool finalized = False;
607 
608  // multiple choice blocks
609  list<hash<ChoiceInfo>> choices();
610 
611 protected:
613  string cx_type;
614 
615  const XET_ALL = "ALL";
616  const XET_CHOICE = "CHOICE";
617  const XET_SEQUENCE = "SEQUENCE";
618  const XET_SIMPLE = "SIMPLE";
619  const XET_NONE = "NONE";
620 
621 public:
622 
623  // ct can be NOTHING in case of an empty complex type
624  constructor(*hash<auto> ct, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
625 
626 
627  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
628 
629 
631  checkExtends(XsdAbstractType t, string ename);
632 
633 
634 protected:
635  parseData(hash<auto> d, XsdLateResolverHelper unresolved, Namespaces nsc);
636 public:
637 
638 
639 protected:
640  parseAttributes(reference d, XsdLateResolverHelper unresolved, Namespaces nsc);
641 public:
642 
643 
644  bool isNillable();
645 
646 
647  bool isRequired();
648 
649 
650  bool requiresValue();
651 
652 
653  bool isEmpty();
654 
655 
656 protected:
657  hash<string, XsdElement> parseElements(softlist<auto> el, XsdLateResolverHelper unresolved, Namespaces nsc, bool for_object = True);
658 public:
659 
660 
661  AbstractDataProviderType getDataProviderType();
662 
663 
664 protected:
665  *hash<auto> serializeElement(Namespaces nsc, string key, XsdElement element, auto h, *softbool omitType);
666 public:
667 
668 
669  *hash<auto> serialize(Namespaces nsc, auto h, *softbool omitType);
670 
671 
672 protected:
673  hash<auto> serializeChoice(Namespaces nsc, hash<string, XsdElement> emap, hash<auto> h, *softbool omitType, bool all_members);
674 public:
675 
676 
677  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto oval);
678 
679 
680 protected:
681  *hash<auto> parseChoice(hash<auto> val, hash<string, XsdElement> emap, string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, *bool required);
682 public:
683 
684 };
685 
688 
689 public:
695  *string input_name;
697  *string output_name;
698 
701 
703  *string soapAction;
704 
706  hash<string, bool> reqh;
707 
709  hash<string, OperationalBinding> bindings;
710 
711 protected:
713  hash<string, WSMessage> faults;
714 
715 public:
716 
718 
722  constructor(hash<auto> p, Namespaces nsc, *hash<auto> messages) ;
723 
724 
726  *hash<string, WSMessage> getFaultMessages();
727 
728 
730  bool hasFault(string fault);
731 
732 
734  setDocStyleBinding(reference idocmap);
735 
736 
739 
740 
743 
744 
746 
755 
756 
758 
766 
767 
769 
789 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);
790 
791 
793 
814  hash<auto> serializeRequest(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *int xml_opts, *string req_soapaction, *string bname, *hash<auto> http_headers);
815 
816 
818 
838  hash<auto> serializeResponse(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *bool soap12, *int xml_opts, *string bname, *hash<auto> http_headers);
839 
840 
842 
847  auto deserializeRequest(hash<auto> o, *string bname);
848 
849 
851 
856  auto deserializeResponse(hash<auto> o, *string bname);
857 
858 
863  *hash<auto> deserializeRequestPath(string path, *string bname);
864 
865 
867 protected:
868  static hash<auto> processNSValue(hash<auto> h);
869 public:
870 
871 
873 
875  bool isSoap12();
876 
877 
879 
881  string getTargetNS();
882 
883 };
884 
886 public hashdecl WSDL::ArgInfo {
888  string name;
889 
891  string part;
892 
894  XsdAbstractType type;
895 
898 };
899 
901 
908 
909 public:
911  hash<string, hash<WSDL::ArgInfo>> args;
912 
914  hash<string, string> pmap;
915 
917  hash<string, XsdAbstractType> tmap;
918 
919  // keep a weak reference to the namespace map
920  Namespaces nsc;
921 
922  constructor(hash<auto> m, hash<string, hash<string, XsdElement>> emap, hash<string, XsdAbstractType> tmap, Namespaces nsc) ;
923 
924 
926  AbstractDataProviderType getDataProviderType();
927 
928 
933  auto serializeRpcValue(string part, bool encoded, reference<hash<auto>> h, reference<string> ons);
934 
935 
937 
945  *hash<auto> serializeRpc(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference<auto> h, bool fault);
946 
947 
949 
957  *hash<auto> serializeDocument(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference<auto> h, bool fault);
958 
959 
961 
966  *hash<auto> deserializeRpc(*hash<auto> mrh, hash<auto> val, *string part);
967 
968 
969  *hash<auto> deserializeDocument(*hash<auto> mrh, auto val, *string parts);
970 
971 
973 
976  hash<auto> serializeAllPartData(*hash<auto> val);
977 
978 
980 
986  hash<auto> serializeData(Namespaces nsc, string key, *hash<auto> val);
987 
988 
990 
993  hash<auto> deserializeData(string part, hash<auto> val);
994 
995 
997 
1000  hash<auto> deserializeAllPartData(hash<auto> val);
1001 
1002 
1004 
1011 private:
1012  auto getValueFromHash(string ename, reference<auto> v, bool removeFound);
1013 public:
1014 
1015 
1017 private:
1018  auto getValueFromHash(*WSDL::XsdElement element, reference<auto> v, bool removeFound);
1019 public:
1020 
1021 
1022  string getSerializedKey(string part);
1023 
1024 
1026 
1028  string checkPart(string pname);
1029 
1030 };
1031 
1032 // private helper class for lazy name resolution
1033 class WSDL::XsdLateResolverHelper {
1034 
1035 public:
1036 protected:
1037  list<object> l();
1038 
1039 public:
1040 
1041  constructor();
1042 
1043 
1044  add(object v);
1045 
1046 
1047  list<auto> getList();
1048 
1049 
1050  clearResolved();
1051 
1052 
1053  static bool isResolved(XsdTypedData t);
1054 
1055  static bool isResolved(XsdSimpleType t);
1056 
1057  static bool isResolved(XsdComplexType t);
1058 
1059  static bool isResolved(XsdArrayType t);
1060 
1061  static bool isResolved(auto t);
1062 };
1063 
1066 
1067 public:
1068  bool docstyle;
1071  *string soapAction;
1072 
1073  constructor(string name, string ns, bool docstyle, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1074 
1075 
1076  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, *hash<auto> http_headers);
1077 
1078 
1079  auto deserializeMessage(WSOperation op, hash<auto> o, bool request);
1080 
1081 
1082  auto deserializeRequestPath(WSOperation op, string path);
1083 
1084 
1085  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, *hash<auto> http_headers);
1086 
1087  abstract auto deserializeMessageImpl(WSOperation op, hash<auto> o, bool request);
1088 
1089  abstract auto deserializeRequestPathImpl(WSOperation op, string path);
1090 };
1091 
1092 class WSDL::SoapBinding : public WSDL::OperationalBinding {
1093 
1094 public:
1095  string soapTransport;
1096 
1097  constructor(string name, string ns, bool docstyle, string soapTransport, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1098 
1099 
1100  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, *hash<auto> http_headers);
1101 
1102 
1103 private:
1104  hash<auto> serializeSoapMessage(WSOperation op, *WSMessage msg, auto val, *hash<auto> header, *hash<auto> nsh, bool request, bool soap12, reference mpm, *string faultmsg);
1105 public:
1106 
1107 
1108  auto deserializeMessageImpl(WSOperation op, hash<auto> orig_msg, bool request);
1109 
1110 
1112 private:
1113  static list<auto> processMultiRef(hash<auto> body);
1114 public:
1115 
1116 
1117  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1118 
1119 };
1120 
1121 class WSDL::HttpBinding : public WSDL::OperationalBinding {
1122 
1123 public:
1124  string httpMethod;
1125  string location;
1126 
1127 constructor(string name, string ns, bool docstyle, string httpMethod, string location, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1128 
1129 
1130 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, *hash<auto> http_headers);
1131 
1132 
1134 private:
1135  string serializeRequestPath(WSOperation op, auto h);
1136 public:
1137 
1138 
1139  auto deserializeMessageImpl(WSOperation op, hash<auto> v, bool request);
1140 
1141 
1142  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1143 
1144 };
1145 
1147 
1149 class WSDL::BindingMessageBodyDescription : public Serializable {
1150 
1151 public:
1153 
1156  bool encoded;
1157 
1159  *string encodingStyle;
1160 
1162  *string ns;
1163 
1165  *list<auto> parts;
1166 
1167  constructor(bool encoded, *string encodingStyle, *string ns, *string parts);
1168 
1169 
1170  bool isMultipart();
1171 
1172 };
1173 
1175 class WSDL::BindingMessageHeaderDescription : public Serializable {
1176 
1177 public:
1179  string part;
1180 
1182 
1185  bool encoded;
1186 
1189 
1191  /*
1192  @param part message part name
1193  @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)
1194  @param msg actual message
1195  */
1196  constructor(string part, bool encoded = False, WSMessage msg);
1197 
1198 };
1199 
1201 
1203 class WSDL::BindingContentDescription : public Serializable {
1204 
1205 public:
1207  string part;
1208 
1209  // list of accepted content types (with "xxx/*")
1210  list<auto> acceptedContentTypes = ();
1211 
1212  // list of accepted specific content types
1213  list<auto> acceptedContentTypeSubtypes = ();
1214 
1216  bool formUrlEncoded = False;
1217 
1220 
1221  addContentType(string type);
1222 
1223 };
1224 
1226 
1228 class WSDL::MimeXmlMessageDescription : public Serializable {
1229 
1230 public:
1232 
1234  string part;
1235 
1236  constructor(string part);
1237 
1238 };
1239 
1241 class WSDL::BindingMessageDescription : public Serializable {
1242 
1243 public:
1246 
1248 
1250  *hash<auto> urlReplacement;
1251 
1253 
1264  bool urlEncoded = False;
1265 
1268 
1271 
1272 private:
1274  list<BindingMessageHeaderDescription> headers = cast<list<BindingMessageHeaderDescription>>(());
1275 
1276 public:
1277 
1278  addHeader(BindingMessageHeaderDescription hdr);
1279 
1280 
1282  bool hasHeaders();
1283 
1284 
1286  list<BindingMessageHeaderDescription> getHeaders();
1287 
1288 
1289  setUrlReplacement(string loc);
1290 
1291 };
1292 
1295 
1296 public:
1297 private:
1298  string port;
1299 
1301 
1304  bool docstyle = True;
1305 
1306  *string httpMethod;
1307  *string soapTransport;
1308 
1309 public:
1310 
1311  constructor(hash<auto> data, Namespaces nsc, reference portTypes, reference idocmap, *hash<auto> messages) ;
1312 
1313 
1315 private:
1316  string checkMessagePart(WSMessage msg, *string partname, string errs);
1317 public:
1318 
1319 
1320  string getPort();
1321 
1322 
1323  bool isSoapBinding();
1324 
1325 
1326  bool isHttpBinding();
1327 
1328 };
1329 
1330 // private namespace prefix redefinition class
1331 class WSDL::NamespacePrefixHelper {
1332 
1333 public:
1334 
1335 protected:
1337  Namespaces nsc;
1338 
1339  // overriden prefixes
1340  hash<auto> h;
1341 
1342  // overridden target namespace
1343  bool targ_ns;
1344 
1345  // overridden default namespace
1346  bool def_ns;
1347 
1348  // schema description
1349  string desc;
1350 
1352  int id = ++count;
1353 
1355  static int count = 0;
1356 
1357 public:
1358 
1359  constructor(Namespaces nsc, *hash<auto> nsattr);
1360 
1361 
1362  destructor();
1363 
1364 
1365  save(string k, string v);
1366 
1367 
1368  string getDesc();
1369 
1370 };
1371 
1373 class WSDL::Namespaces : public Serializable {
1374 
1375 public:
1376  // options are here since this object is passed through all serialization and deserialization
1377  bool opt_empty_string_is_nothing = False;
1378  bool opt_allow_any_header = False;
1379 
1380 protected:
1382  hash<string, string> ns = {
1383  "xsd": XSD_NS,
1384  };
1385 
1387  hash<string, string> nsr = {
1388  XSD_NS: "xsd",
1389  };
1390 
1392  hash<string, bool> xsd_schema = {
1393  "xsd": True,
1394  };
1395 
1397  hash<string, string> imap = {
1398  "xsd": XSD_NS,
1399  };
1400 
1402  hash<string, string> imapr = {
1403  XSD_NS: "xsd",
1404  };
1405 
1407  bool hassoap11 = False;
1408 
1410  bool hassoap12 = False;
1411 
1413  *string target_ns;
1414 
1416  list<auto> nss = ();
1417 
1419  *string default_ns;
1420 
1422  list<auto> dss = ();
1423 
1425  hash<string, XsdBaseType> base_types;
1426 
1428  const DefaultPrefixes = ...;
1429 
1430 
1431 public:
1432 
1434  constructor(hash<auto> nsh, *Namespaces nsc, *string targetNamespace);
1435 
1436 
1437  *string getDefaultNs();
1438 
1439 
1440  addNamespaces(hash<auto> nsh, *NamespacePrefixHelper nph);
1441 
1442 
1443  restorePrefixes(hash<auto> h);
1444 
1445 
1446 protected:
1447  addNamespaceIntern(string ns, string val, *bool override);
1448 public:
1449 
1450 
1453 
1454 
1456  string getUniquePrefix(string uri, *string default_prefix);
1457 
1458 
1460  string getOutputNamespaceUri(string nsp);
1461 
1462 
1464  *hash<auto> getOutputNamespaceHash(*hash<auto> nsh);
1465 
1466 
1469 
1470 
1472  *string getNamespaceUri(*string nsp);
1473 
1474 
1477 
1478 
1481 
1482 
1485 
1486 
1489 
1490 
1493 
1494 
1497 
1498 
1501 
1502 
1504 protected:
1505  string registerNamespaceIntern(string uri, *string default_pfx);
1506 public:
1507 
1508 
1511 
1512 
1514  bool hasSoap11();
1515 
1516 
1518  bool hasSoap12();
1519 
1520 
1522  *bool isSchema(string ns);
1523 
1524 
1526  string getInputNamespaceUri(string nsa);
1527 
1528 
1529  bool doType(string t, reference<hash> typeinfo, reference<XsdAbstractType> rtype, *hash<string, XsdAbstractType> tmap);
1530 
1531 
1532  hash<auto> getTypeHash(string t);
1533 
1534 
1535  XsdBaseType getBaseType(string t);
1536 
1537 
1539  string translateOutputNamespacePrefix(*string nsa);
1540 
1541 };
1542 
1543 // private functions
1544 XsdAbstractType tmap_get(hash<string, XsdAbstractType> tmap, string name);
1545 
1546 
1547 *XsdAbstractType tmap_try_get(hash<string, XsdAbstractType> tmap, string name);
1548 
1549 
1550 // private functions
1551 XsdElement emap_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1552 
1553 
1554 *XsdElement emap_try_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1555 
1556 
1558 public hashdecl WSDL::PortTypeInfo {
1559  hash<string, WSOperation> operations;
1560 };
1561 
1563 public hashdecl WSDL::ServiceInfo {
1565  string name;
1567  hash<string, hash> port;
1568 };
1569 
1571 public hashdecl WSDL::OperationInfo {
1573  string port;
1574 
1577 };
1578 
1580 
1582 class WSDL::WebService : public WSDL::XsdBase,public Qore::Serializable {
1583 
1584 public:
1586  string wsdl;
1587 
1589  string wsdl_hash;
1590 
1592  *hash<auto> opts;
1593 
1595  bool has_try_import = False;
1596 
1598 
1600  string name;
1601 
1603 
1605  string hash_str;
1606 
1608  transient Namespaces nsc;
1609 
1611  transient list<string> wsdl_services();
1612 
1614  transient hash<string, XsdElement> idocmap();
1615 
1617  transient hash<string, hash<string, XsdElement>> emap();
1618 
1620  transient hash<string, WSMessage> messages();
1621 
1623  transient hash<string, XsdAbstractType> tmap();
1624 
1626  transient hash<string, hash<PortTypeInfo>> portType();
1627 
1629  transient *code try_import;
1630 
1632 
1634  transient *string def_path;
1635 
1636 protected:
1637  // service definitions; name -> service info hash
1638  hash<string, hash<WSDL::ServiceInfo>> services();
1639 
1640  // service bindings; name -> Binding
1641  hash<string, Binding> binding();
1642 
1644  transient hash<string, bool> import_map;
1645 
1646 public:
1647 
1649 
1660  constructor(string str, *hash<auto> opts);
1661 
1662 
1664 
1668  string getName();
1669 
1670 
1672 
1676  synchronized string getHash();
1677 
1679 
1682 
1683 
1685  softlist<string> getOperationNames();
1686 
1687 
1689  WSDL::WSOperation getPortTypeOperation(string ptname, string opname);
1690 
1691 
1693  WSDL::WSOperation getBindingOperation(*string bname, string opname);
1694 
1695 
1697 
1701  list<hash<OperationInfo>> listOperations();
1702 
1703 
1705 
1712 
1713 
1715 
1721  list<hash<WSDL::ServiceInfo>> listServices();
1722 
1723 
1725 
1734  hash<WSDL::ServiceInfo> getService(string name);
1735 
1736 
1738  hash<auto> getType(string name, auto v);
1739 
1740 
1741 protected:
1742  XsdBaseType getBaseType(string t);
1743 public:
1744 
1745 
1746 protected:
1747  resolveType(XsdSimpleType t);
1748 public:
1749 
1750 
1751 protected:
1752  resolveType(XsdElement xe);
1753 public:
1754 
1755 
1756 protected:
1757  resolveType(XsdAttribute xd);
1758 public:
1759 
1760 
1761 protected:
1762  resolveType(XsdComplexType ct);
1763 public:
1764 
1765 
1766 protected:
1767  resolveType(XsdArrayType t);
1768 public:
1769 
1770 
1771 protected:
1772  XsdAbstractType resolveType(hash<auto> v);
1773 public:
1774 
1775 
1776  // parse XSD schema types
1777 protected:
1778  parseTypes(*hash<auto> data, auto http_client, auto http_headers);
1779 public:
1780 
1781 
1782 protected:
1783  parseMessages(*softlist<auto> message);
1784 public:
1785 
1786 
1787 protected:
1788  parseService(*softlist<auto> svcs);
1789 public:
1790 
1791 
1792 protected:
1793  parsePortType(*softlist<auto> data);
1794 public:
1795 
1796 
1797 protected:
1798  parseBinding(*softlist<auto> bindings);
1799 public:
1800 
1801 
1803 
1805  bool isSoap12();
1806 
1807 
1809 
1811  string getWSDL();
1812 
1813 
1815 
1817  string getWSDLHash();
1818 
1819 
1821 
1826  string getWSDL(string base_url);
1827 
1828 
1829 protected:
1830  string getOperationParams(WSMessage msg);
1831 public:
1832 
1833 
1835 
1840  getReport(StringOutputStream stream, *string wsdl_name);
1841 
1842 
1844 
1848  string getReport(*string wsdl_name);
1849 
1850 
1852 
1854 private:
1855  doInit(string str, *hash<auto> opts);
1856 public:
1857 
1858 
1860 
1862 private:
1863  deserializeMembers(hash<auto> members);
1864 public:
1865 
1866 };
1867 
1869 
1872 
1873 public:
1874 protected:
1875  WebService ws;
1876  hash<auto> opts;
1877 
1878 public:
1879 
1880  const DefaultOpts = ...;
1881 
1882 
1884 
1890  constructor(WebService ws, *hash<auto> opts);
1891 
1892 
1893 protected:
1894  hash<auto> getTypeInfo(XsdBaseType t);
1895 public:
1896 
1897 
1898 protected:
1899  hash<auto> getTypeInfo(XsdSimpleType t);
1900 public:
1901 
1902 
1903 protected:
1904  hash<auto> getTypeInfo(XsdComplexType t);
1905 public:
1906 
1907 
1908  hash<auto> getMessage(XsdElement elem, *softlist<auto> comments);
1909 
1910 
1912 
1916  hash<auto> getMessage(string name);
1917 
1918 
1920 
1925 
1926 };
describes MIME content information for SOAP operational binding message descriptions
Definition: WSDL.qm.dox.h:1203
string part
specifies the name of the message part
Definition: WSDL.qm.dox.h:1207
bool acceptAllContentTypes
are all content-types accepted?
Definition: WSDL.qm.dox.h:1219
bool formUrlEncoded
are all content-types form URL encoded?
Definition: WSDL.qm.dox.h:1216
class for WSDL bindings
Definition: WSDL.qm.dox.h:1294
bool docstyle
use RPC or document style
Definition: WSDL.qm.dox.h:1304
string checkMessagePart(WSMessage msg, *string partname, string errs)
check if part exists in massage, if part is empty and message contains single part then return it oth...
describes the message body for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1149
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1156
*string ns
namespace; "only applies to content not explicitly defined by the abstract types"
Definition: WSDL.qm.dox.h:1162
*string encodingStyle
when encoded True, this is used to produce a concrete message by applying the specified encoding
Definition: WSDL.qm.dox.h:1159
*list< auto > parts
indicates which parts appear somewhere within the SOAP Body portion of the message
Definition: WSDL.qm.dox.h:1165
describes an input or output message in a SOAP operational binding
Definition: WSDL.qm.dox.h:1241
bool urlEncoded
indicates that all the message parts are encoded into the HTTP request URI using the standard URI-enc...
Definition: WSDL.qm.dox.h:1264
*WSDL::MimeXmlMessageDescription mimeXml
optional mimeXml message scription
Definition: WSDL.qm.dox.h:1270
list< BindingMessageHeaderDescription > getHeaders()
returns a list of WSDL::BindingMessageHeaderDescription objects
*WSDL::BindingContentDescription content
optional content-type descriptions
Definition: WSDL.qm.dox.h:1267
list< BindingMessageHeaderDescription > headers
a list of WSDL::BindingMessageHeaderDescription objects
Definition: WSDL.qm.dox.h:1274
*hash< auto > urlReplacement
a hash of URL replacement values keyed by part name, values are URI paths
Definition: WSDL.qm.dox.h:1250
*WSDL::BindingMessageBodyDescription body
the description of the message body
Definition: WSDL.qm.dox.h:1245
bool hasHeaders()
returns True if the header descriptions are available
describes a SOAP message header for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1175
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1185
string part
message part name
Definition: WSDL.qm.dox.h:1179
WSMessage msg
a weak reference to the actual message
Definition: WSDL.qm.dox.h:1188
constructor(string part, bool encoded=False, WSMessage msg)
creates the object
describes a mimeXml payload for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1228
string part
refers to a message part defining the concrete schema of the root XML element
Definition: WSDL.qm.dox.h:1234
namespace container class
Definition: WSDL.qm.dox.h:1373
string getOutputNamespaceUri(string nsp)
returns the namespace URI for the given output namespace prefix
*string getTargetNamespaceUri()
returns the primary target namespace Uri
merge(Namespaces nsc)
merges namespaces when parsing imported schemas
string getTargetNamespaceInputPrefix()
returns the input namespace prefix for the target namespace, if any
popDefaultNamespace()
restores any previous default namespace URI from the stack to the current default namespace URI
bool hasSoap12()
returns True if using SOAP 1.2, False if not
string getUniquePrefix(string uri, *string default_prefix)
returns a unique namespace prefix from a URI path string
*bool isSchema(string ns)
returns True if if the input namespace prefix refers to the XSD namespace URI
*string getNamespaceUri(*string nsp)
returns the namespace URI for the given prefix or the target namespace Uri
*hash< auto > getReferencedNamespaceMap()
returns a hash of namespace prefixes to namespaces URIs actually used
*hash< auto > getOutputNamespaceHash(*hash< auto > nsh)
returns a hash of namespace attributes for outgoing SOAP messages
hash< string, string > imapr
hash mapping input namespace URIs to input namespace prefixes
Definition: WSDL.qm.dox.h:1402
string translateOutputNamespacePrefix(*string nsa)
returns the output namespace prefix for the given input namespace prefix
hash< string, bool > xsd_schema
hash for valid XSD namespaces, maps input namespace prefixes -> True if it refers to an XSD schema
Definition: WSDL.qm.dox.h:1392
hash< string, string > nsr
maps namespace URIs to output namespace prefixes
Definition: WSDL.qm.dox.h:1387
pushDefaultNamespace(string ns)
pushes the current default namespace URI on the stack when parsing schemas and sets the current defau...
list< auto > dss
default namespace stack;
Definition: WSDL.qm.dox.h:1422
pushTargetNamespace(string ns)
pushes the current target namespace URI on the stack when parsing schemas and sets the current target...
const DefaultPrefixes
maps namespaces to default prefixes
Definition: WSDL.qm.dox.h:1428
*string target_ns
current target namespace
Definition: WSDL.qm.dox.h:1413
hash< string, string > ns
maps output namespace prefixes to namespace URIs
Definition: WSDL.qm.dox.h:1382
string getOutputNamespacePrefix(string ns)
looks up and registers a namespace if necessary, returns the namespace's prefix
constructor(hash< auto > nsh, *Namespaces nsc, *string targetNamespace)
creates the object with the WSDL definitions attribute hash
bool hassoap11
if True then has SOAP 1.1
Definition: WSDL.qm.dox.h:1407
list< auto > nss
target namespace stack;
Definition: WSDL.qm.dox.h:1416
string registerNamespaceIntern(string uri, *string default_pfx)
registers a namespace internally
*string default_ns
default namespace for unprefixed definitions
Definition: WSDL.qm.dox.h:1419
hash< string, string > imap
hash mapping input namespace prefixes to namespaces URIs
Definition: WSDL.qm.dox.h:1397
bool hasSoap11()
returns True if using SOAP 1.1, False if not
popTargetNamespace()
restores any previous target namespace URI from the stack to the current target namespace URI
hash< string, XsdBaseType > base_types
base type map
Definition: WSDL.qm.dox.h:1425
string getInputNamespaceUri(string nsa)
returns the input namespace URI from the input namespace prefix
bool hassoap12
if True then has SOAP 1.2
Definition: WSDL.qm.dox.h:1410
string getTargetNamespaceOutputPrefix()
returns the output namespace prefix for the target namespace, if any
class for WSDL bindings associated with a SOAP operation
Definition: WSDL.qm.dox.h:1065
contains helper methods for retrieving WSDLs from a URL
Definition: WSDL.qm.dox.h:251
static *hash< auto > parseSOAPMessage(hash< auto > msg)
const SoapMimeTypes
Mime types recognized as SOAP messages.
Definition: WSDL.qm.dox.h:255
static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash< auto > http_headers)
returns a WebService object from a URL and other optional arguments
static data getFile(string fn, bool as_string=True)
retrieves a local file and returns the file's contents as a string
static bool isSOAPMessage(hash< auto > msg)
returns True is the message has a SOAP mime type
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...
static WebService getWSDL(WebService wsdl)
returns the argument
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)
retrieves a file from an already-parsed URL
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's contents as a string
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
static string getWSDL(string wsdl, *HTTPClient http_client, *hash< auto > http_headers, *reference new_def_path)
returns a WSDL string from a file name, optional HTTPClient object and optional header hash
static hash< auto > parseMultiPartSOAPMessage(hash< auto > msg)
takes a hash representation of a SOAP message and handles multipart messages, checks the content-type...
helper class implementing sample message generation
Definition: WSDL.qm.dox.h:1871
auto getMessage(WSMessage msg)
prepare sample message
constructor(WebService ws, *hash< auto > opts)
creates the WebService object
hash< auto > getMessage(string name)
prepare sample message
web service message class
Definition: WSDL.qm.dox.h:907
auto getValueFromHash(*WSDL::XsdElement element, reference< auto > v, bool removeFound)
when only one arg then try to get values based on element keys
auto getValueFromHash(string ename, reference< auto > v, bool removeFound)
find part in value, remove that value from the hash
hash< string, XsdAbstractType > tmap
type map
Definition: WSDL.qm.dox.h:917
auto serializeRpcValue(string part, bool encoded, reference< hash< auto >> h, reference< string > ons)
*hash< auto > serializeDocument(*softlist< auto > parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference< auto > h, bool fault)
serializes data into a hash with SOAP namespaces etc. with document-style messages
hash< auto > serializeAllPartData(*hash< auto > val)
serialize all values as string or binary
hash< auto > deserializeAllPartData(hash< auto > val)
deserialize all values in string or binary form
hash< auto > serializeData(Namespaces nsc, string key, *hash< auto > val)
serialized value of particular type value as string or binary
*hash< auto > serializeRpc(*softlist< auto > parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference< auto > h, bool fault)
serializes data into a hash with SOAP namespaces etc. with RPC-style messages
*hash< auto > deserializeRpc(*hash< auto > mrh, hash< auto > val, *string part)
deserialize RPC message
AbstractDataProviderType getDataProviderType()
Returns the data provider type for this message.
string checkPart(string pname)
check if pname is defined as message part
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:911
hash< string, string > pmap
maps part names to args key, all parts are in hash
Definition: WSDL.qm.dox.h:914
hash< auto > deserializeData(string part, hash< auto > val)
deserialize value in string or binary form
web service operation class
Definition: WSDL.qm.dox.h:687
*WSMessage output
response message
Definition: WSDL.qm.dox.h:693
*string soapAction
the SOAPAction header value to send with this operation
Definition: WSDL.qm.dox.h:703
hash< string, bool > reqh
a hash of top-level request names for this operation (depends on bindings)
Definition: WSDL.qm.dox.h:706
*string input_name
request message name
Definition: WSDL.qm.dox.h:695
OperationalBinding getBinding(*string bname)
returns a hash representing the given binding
hash< auto > serializeResponse(auto h, *hash< auto > header, *string enc, *hash< auto > nsh, *bool soap12, *int xml_opts, *string bname, *hash< auto > http_headers)
serializes a SOAP response to an XML string for the operation
*hash< string, WSMessage > getFaultMessages()
returns a hash of fault messages keyed by fault name
Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:700
auto deserializeRequest(hash< auto > o, *string bname)
parses a hash representing a parsed XML request (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the o...
static hash< auto > processNSValue(hash< auto > h)
processes a hash of raw deserialized XML data and removes any namespace prefix from keys (saved to a ...
hash< string, OperationalBinding > bindings
params per associated binding; key = binding name; value = OperationalBinding object
Definition: WSDL.qm.dox.h:709
*WSMessage input
request message
Definition: WSDL.qm.dox.h:691
auto deserializeResponse(hash< auto > o, *string bname)
parses a hash representing a parsed XML response (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the ...
list< auto > getTopLevelRequestNames()
returns all top-level request names for this operation
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)
serializes a fault response to an XML string or HTTP payload for the operation.
setDocStyleBinding(reference idocmap)
this method is called if this operation supports at least one binding with document style
hash< auto > serializeRequest(auto h, *hash< auto > header, *string enc, *hash< auto > nsh, *int xml_opts, *string req_soapaction, *string bname, *hash< auto > http_headers)
serializes a request to an XML string or HTTP payload for the operation.
bool hasFault(string fault)
returns True if the given string is a valid fault message for the operation
constructor(hash< auto > p, Namespaces nsc, *hash< auto > messages)
creates the WSOperation object from the arguments supplied
*string output_name
response message name
Definition: WSDL.qm.dox.h:697
*hash< auto > deserializeRequestPath(string path, *string bname)
bool isSoap12()
returns True if the operation is a SOAP 1.2 operation
markRpcStyleBinding()
this method is called if this operation supports at least one binding with RPC style
addBinding(WSDL::OperationalBinding b)
adds the given binding
string getTargetNS()
returns the target namespace for the operation
hash< string, WSMessage > faults
fault messages keyed by fault name
Definition: WSDL.qm.dox.h:713
main class representing a parsed WSDL file
Definition: WSDL.qm.dox.h:1582
list< hash< WSDL::ServiceInfo > > listServices()
returns a list of services defined in the WSDL
transient hash< string, XsdElement > idocmap()
a hash of element names to XsdElement objects for top-level document-style bindings
getReport(StringOutputStream stream, *string wsdl_name)
prepare a WebService report enumerating the services and operations of the WSDL, outputs to the outpu...
string name
the name of the WebService
Definition: WSDL.qm.dox.h:1600
WSDL::WSOperation getBindingOperation(*string bname, string opname)
returns the given operation for particular binding or throws an exception if it cannot be found
WSDL::Binding getBinding(string name)
return a WSDL::Binding object describing the requested binding
transient hash< string, bool > import_map
issue #4449: map of imports used while parsing
Definition: WSDL.qm.dox.h:1644
transient hash< string, hash< PortTypeInfo > > portType()
hash of port names to port type information hashes
transient Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:1608
transient hash< string, hash< string, XsdElement > > emap()
map of elements
transient *code try_import
optional closure/call reference to try to resolve import declarations
Definition: WSDL.qm.dox.h:1629
hash< auto > getType(string name, auto v)
return a hash value that can be used to serialize a value as a particular type
transient hash< string, XsdAbstractType > tmap()
map of types
WSDL::WSOperation getOperation(string opname)
returns the given operation or throws an exception if it cannot be found; operations are searched in ...
transient list< string > wsdl_services()
list of services in this WSDL
synchronized string getHash()
returns a unique hash for the WSDL that can be used to compare schemas for equality
bool isSoap12()
returns True if the WSDL describes a SOAP 1.2 service
doInit(string str, *hash< auto > opts)
supports the constructor and deserialization
*hash< auto > opts
options used in the constructor
Definition: WSDL.qm.dox.h:1592
string getName()
returns the name of the service
constructor(string str, *hash< auto > opts)
creates the WebService object
string getWSDLHash()
returns a cryptographic hash for the WSDL source
string hash_str
the digest of the WSDL source
Definition: WSDL.qm.dox.h:1605
string getWSDL(string base_url)
returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller
string wsdl
the WSDL string
Definition: WSDL.qm.dox.h:1586
WSDL::WSOperation getPortTypeOperation(string ptname, string opname)
returns the given operation for particular porttype or throws an exception if it cannot be found
transient *string def_path
default path for retrieving XSD references
Definition: WSDL.qm.dox.h:1634
bool has_try_import
flag if the object has a "try_import" closure or call reference
Definition: WSDL.qm.dox.h:1595
transient hash< string, WSMessage > messages()
hash of messages names to messages
list< hash< OperationInfo > > listOperations()
returns a list of hashes giving supported operation names for each port in the WSDL
hash< WSDL::ServiceInfo > getService(string name)
returns a hash describing the requested service
deserializeMembers(hash< auto > members)
can be used to create a WebService object from a hash created with serialize()
string getWSDL()
returns the XML string for the WSDL
string wsdl_hash
a cryptographic hash for the WSDL source
Definition: WSDL.qm.dox.h:1589
softlist< string > getOperationNames()
returns a list of known operation names
string getReport(*string wsdl_name)
prepare a WebService report enumerating the services and operations of the WSDL
class for XSD array types; currently only supports single dimensional arrays
Definition: WSDL.qm.dox.h:451
XSD attribute class.
Definition: WSDL.qm.dox.h:490
base class with helper methods for XSD data processing
Definition: WSDL.qm.dox.h:343
class for XSD base types
Definition: WSDL.qm.dox.h:430
XSD complex type class.
Definition: WSDL.qm.dox.h:577
string cx_type
type of complexType object
Definition: WSDL.qm.dox.h:613
checkExtends(XsdAbstractType t, string ename)
throws an exception if the types are not compatible
base class for XSD data classes
Definition: WSDL.qm.dox.h:352
XSD element class.
Definition: WSDL.qm.dox.h:506
base class for XSD classes with a "name" attribute
Definition: WSDL.qm.dox.h:360
descriptive_name
descriptive name flag
Definition: WSDL.qm.dox.h:368
*string ns
input namespace prefix (if any given)
Definition: WSDL.qm.dox.h:366
XSD simple type class.
Definition: WSDL.qm.dox.h:546
XSD typed data class.
Definition: WSDL.qm.dox.h:479
main WSDL namespace
Definition: WSDL.qm.dox.h:171
const any_type_map
mapping from Qore types to xsd types for xsd type "anyType"
Definition: WSDL.qm.dox.h:216
const SOAP_11_ENV
SOAP 1.1 envelope URI.
Definition: WSDL.qm.dox.h:176
const SoapStyleMap
SOAP "style" to "document" mappings.
Definition: WSDL.qm.dox.h:209
const SoapUseMap
SOAP "use" to "encoded" mappings.
Definition: WSDL.qm.dox.h:205
const SOAP_TRANSPORT
known/supported transports
Definition: WSDL.qm.dox.h:228
const HTTP_NS
HTTP namespace URI.
Definition: WSDL.qm.dox.h:192
const version
this WSDL implementation version
Definition: WSDL.qm.dox.h:173
const ENVELOPE_12_NS
soap 1.2 envelope namespaces
Definition: WSDL.qm.dox.h:201
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...
const XSI_NS
XSI namespace URI.
Definition: WSDL.qm.dox.h:189
const XSD_NS
XSD namespace URI.
Definition: WSDL.qm.dox.h:187
const SOAP_12_NS
SOAP 1.2 namespace URI.
Definition: WSDL.qm.dox.h:184
const SOAP_TRANSPORT_HTTP
SOAP HTTP transport URI.
Definition: WSDL.qm.dox.h:225
const SOAP_11_NS
SOAP 1.1 namespace URI.
Definition: WSDL.qm.dox.h:181
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...
const RANGE_INT
range of "int" values (32 bits)
Definition: WSDL.qm.dox.h:235
const SOAP_12_ENV
SOAP 1.2 envelope URI.
Definition: WSDL.qm.dox.h:178
const MIME_NS
MIME namespace URI.
Definition: WSDL.qm.dox.h:194
const SOAP_ENCODING
soap encoding URI
Definition: WSDL.qm.dox.h:213
const ENVELOPE_11_NS
soap 1.1 envelope namespaces
Definition: WSDL.qm.dox.h:197
const RANGE_SHORT
range of "short" values (16 bits)
Definition: WSDL.qm.dox.h:232
message argument hash description
Definition: WSDL.qm.dox.h:886
XsdAbstractType type
type for the argument
Definition: WSDL.qm.dox.h:894
string part
unique part name
Definition: WSDL.qm.dox.h:891
XsdElement element
element for the argument
Definition: WSDL.qm.dox.h:897
string name
the arg name
Definition: WSDL.qm.dox.h:888
complex type choice hash
Definition: WSDL.qm.dox.h:571
WSDL operation info.
Definition: WSDL.qm.dox.h:1571
string port
the name of the port defining the operation
Definition: WSDL.qm.dox.h:1573
WSDL::WSOperation operation
the operation object
Definition: WSDL.qm.dox.h:1576
WSDL port type hash.
Definition: WSDL.qm.dox.h:1558
WSDL service info hash.
Definition: WSDL.qm.dox.h:1563
hash< string, hash > port
port info
Definition: WSDL.qm.dox.h:1567
string name
service name
Definition: WSDL.qm.dox.h:1565