Qore WSDL Module Reference  0.5
WSDL.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* WSDL.qm Copyright (C) 2012 - 2020 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 
155 namespace WSDL {
158  const version = "0.3.6";
159 
161  const SOAP_11_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
163  const SOAP_12_ENV = "http://www.w3.org/2003/05/soap-envelope";
164 
166  const SOAP_11_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
167 
169  const SOAP_12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
170 
172  const XSD_NS = "http://www.w3.org/2001/XMLSchema";
174  const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
175 
177  const HTTP_NS = "http://schemas.xmlsoap.org/wsdl/http/";
179  const MIME_NS = "http://schemas.xmlsoap.org/wsdl/mime/";
180 
182  const ENVELOPE_11_NS = (
183  "soapenv:Envelope": (
184  "^attributes^": (
185  "xmlns:soapenv": SOAP_11_ENV,
186  "xmlns:xsd": XSD_NS,
187  "xmlns:xsi": XSI_NS,
188  ),
189  ),
190  );
191 
193  const ENVELOPE_12_NS = (
194  "soapenv:Envelope": (
195  "^attributes^": (
196  "xmlns:soapenv": SOAP_12_ENV,
197  "xmlns:xsd": XSD_NS,
198  "xmlns:xsi": XSI_NS,
199  ),
200  ),
201  );
202 
204  const SoapUseMap = (
205  "encoded": True,
206  "literal": False,
207  );
208 
210  const SoapStyleMap = (
211  "document": True,
212  "rpc": False,
213  );
214 
216  const SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
217 
219  const any_type_map = (
220  Type::String : "string",
221  Type::Int : "long",
222  Type::Boolean : "boolean",
223  Type::Date : "dateTime",
224  Type::Float : "decimal",
225  Type::NothingType : "string",
226  Type::NullType : "string",
227  Type::Binary : "base64Binary",
228  );
229 
230  // error codes
231  const SOAP_SERIALIZATION_ERROR = "SOAP-SERIALIZATION-ERROR";
232  const SOAP_DESERIALIZATION_ERROR = "SOAP-DESERIALIZATION-ERROR";
233  const WSDL_ERROR = "WSDL-ERROR";
234 
236  const SOAP_TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
237 
239  const SOAP_TRANSPORT = (
240  SOAP_TRANSPORT_HTTP: True,
241  );
242 
244  const RANGE_SHORT = (-32768, 32767);
245 
247  const RANGE_INT = (-2147483648, 2147483647);
248 
249  // private global variables
250  extern bool global_compat_empty_string_is_nothing;
251  extern bool global_compat_allow_any_header;
252 
255 
256 
259 
260 };
261 
264 
265 public:
267  const SoapMimeTypes = (MimeTypeSoapXml, MimeTypeXml, MimeTypeXmlApp);
268 
269  static string getSoapMimeType12(bool soap12);
270 
272 
274  static data getFile(string fn, bool as_string = True);
275 
277 
279  static string getHTTP(string url, *string path, *HTTPClient hc, *hash<auto> headers, bool as_string = True);
280 
282 
284  static data getFTP(string url, string path, bool as_string = True);
285 
287 
294  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);
295 
297 
304  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);
305 
308 
310 
313  static string getWSDL(string wsdl, *HTTPClient http_client, *hash<auto> http_headers, *reference new_def_path);
314 
316 
320  static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash<auto> http_headers);
321 
323  static hash<auto> parseMultiPartSOAPMessage(hash<auto> msg);
324 
326  static bool isSOAPMessage(hash<auto> msg);
327 
332  static *hash<auto> parseSOAPMessage(hash<auto> msg);
333 
334 protected:
335  static processHref(reference xmldata, string hr, hash<auto> parts);
336 public:
337 
338 
339 protected:
340  static substHref(reference xmldata, hash<auto> parts);
341 public:
342 
343 };
344 
345 // private, nmon-exported class
346 class WsdlLibPriv {
347 
348 public:
349  static bool isContentType(string ct, list<auto> MimeTypes);
350 
351  static checkContentType(string ct, list<auto> MimeTypes);
352 };
353 
355 class WSDL::XsdBase : public Qore::Serializable {
356 
357 public:
358  static removeNS(reference v);
359 
360  static removeNS2(reference v);
361 };
362 
364 class WSDL::XsdData : public WSDL::XsdBase {
365 
366 public:
367  auto getValue(*hash<auto> mrh, auto val);
368 
369 };
370 
373 
374 public:
375  // name of object
376  string name;
378  *string ns;
381 
382  constructor(string n_name, string n_ns);
383 
384 
385  constructor(reference e, *string desc_name);
386 
387 
388  string getName();
389 
390 
391  *string getInputNamespacePrefix();
392 
393 
394  bool hasRealName();
395 
396 };
397 
398 class WSDL::XsdAbstractType : public WSDL::XsdNamedData {
399 
400 public:
402  Namespaces nsc;
403 
405  string ons;
406 
407  constructor(reference e, Namespaces nsc, *string desc_name) ;
408 
409 
410  constructor(string name, string ns, Namespaces nsc) ;
411 
412 
413 protected:
414  resolveNamespace();
415 public:
416 
417 
418  checkExtends(XsdAbstractType t, string ename);
419 
420 
421  string getNameWithNS();
422 
423 
424  bool isNillable();
425 
426 
427  bool isRequired();
428 
429 
430  bool requiresValue();
431 
432 
433  string getOutputNamespacePrefix();
434 
435 
436  abstract auto serialize(Namespaces nsc, auto val, *softbool omitType);
437  abstract auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
438  abstract AbstractDataProviderType getDataProviderType();
439 };
440 
442 class WSDL::XsdBaseType : public WSDL::XsdAbstractType {
443 
444 public:
445 
446  constructor(string t, Namespaces nsc, string ns = 'xsd') ;
447 
448 
449  auto serialize(Namespaces nsc, auto val, *softbool omitType);
450 
451 
452  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
453 
454 
455  AbstractDataProviderType getDataProviderType();
456 
457 
458  Type getDataProviderBaseType();
459 
460 };
461 
463 class WSDL::XsdArrayType : public WSDL::XsdAbstractType {
464 
465 public:
466 protected:
467  bool finalized;
468 
469 public:
470 
471  *hash<auto> typeinfo;
472  XsdAbstractType elementType;
473 
474  constructor(string t, string ns, string arrayType, Namespaces nsc, XsdLateResolverHelper unresolved) ;
475 
476 
477  AbstractDataProviderType getDataProviderType();
478 
479 
480  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
481 
482 
483  auto serialize(Namespaces nsc, auto val, *softbool omitType);
484 
485 
486  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
487 
488 };
489 
492 
493 public:
494  *hash<auto> typeinfo;
495  XsdAbstractType type;
496 
497  constructor(reference e) ;
498 
499 };
500 
503 
504 public:
505  string use = "optional";
506 
507  const AllowedUseValues = (
508  "optional": True,
509  "required": True,
510  "prohibited": True,
511  );
512 
513  constructor(hash<auto> attr, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved) ;
514 
515 
516  auto getValue(string val);
517 
518 };
519 
522 
523 public:
524  int minOccurs = 1;
525  int maxOccurs = 1;
526  bool nillable = False;
527  // the resolved namespace URI for any reference
528  *string ref_ns;
529  // the source name for any reference
530  *string ref;
531  bool usedocns;
532 
533  constructor(hash<auto> e, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved, bool n_usedocns) ;
534 
535 
536  AbstractDataProviderType getDataProviderType();
537 
538 
539  assimilate(WSDL::XsdElement other);
540 
541 
542  bool isRequired();
543 
544 
545  bool isNillable();
546 
547 
548  auto serialize(Namespaces nsc, auto h, *softbool omitType, string key, string typename);
549 
550 
551 protected:
552  auto serializeAsIntern(Namespaces nsc, XsdAbstractType type, auto h, *softbool omitType, string key, string typename);
553 public:
554 
555 
556  auto deserialize(hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val, bool present);
557 
558 };
559 
561 class WSDL::XsdSimpleType : public WSDL::XsdAbstractType {
562 
563 public:
564  hash<auto> enum;
565  hash<auto> typeinfo;
566  list<hash<auto>> union;
567  list<XsdAbstractType> unionTypes;
568  XsdSimpleType unionSimpleType;
569  XsdAbstractType type;
570  bool usedocns;
571 
572  constructor(hash<auto> st, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
573 
574 
575  AbstractDataProviderType getDataProviderType();
576 
577 
578  auto serialize(Namespaces nsc, auto val, *softbool omitType);
579 
580 
581  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
582 
583 };
584 
586 public hashdecl WSDL::ChoiceInfo {
587  hash<string, XsdElement> elementmap;
588  bool required;
589 };
590 
592 class WSDL::XsdComplexType : public WSDL::XsdAbstractType {
593 
594 public:
595  *XsdArrayType array;
596  *string arrayType;
597  *string restriction;
598  *string extension;
599 
600  bool usedocns;
601 
602  hash<string, XsdElement> elementmap();
603  bool anyAttribute = False;
604 
605  bool nillable = False;
606  bool required = False;
607  bool requires_value = False;
608 
609  // attributes
610  hash<string, XsdAttribute> attrs();
611 
612  // any annotated documentation
613  *string documentation;
614 
615  // temporarily used to store type information to resolve simpleType
616  *hash<auto> simpleTypeInfo;
617  // simpleContent type
618  XsdAbstractType simpleType;
619 
620  // finalization flag
621  bool finalized = False;
622 
623  // multiple choice blocks
624  list<hash<ChoiceInfo>> choices();
625 
626 protected:
628  string cx_type;
629 
630  const XET_ALL = "ALL";
631  const XET_CHOICE = "CHOICE";
632  const XET_SEQUENCE = "SEQUENCE";
633  const XET_SIMPLE = "SIMPLE";
634  const XET_NONE = "NONE";
635 
636 public:
637 
638  // ct can be NOTHING in case of an empty complex type
639  constructor(*hash<auto> ct, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name) ;
640 
641 
642  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
643 
644 
646  checkExtends(XsdAbstractType t, string ename);
647 
648 
649 protected:
650  parseData(hash<auto> d, XsdLateResolverHelper unresolved, Namespaces nsc);
651 public:
652 
653 
654 protected:
655  parseAttributes(reference d, XsdLateResolverHelper unresolved, Namespaces nsc);
656 public:
657 
658 
659  bool isNillable();
660 
661 
662  bool isRequired();
663 
664 
665  bool requiresValue();
666 
667 
668  bool isEmpty();
669 
670 
671 protected:
672  hash<string, XsdElement> parseElements(softlist<auto> el, XsdLateResolverHelper unresolved, Namespaces nsc, bool for_object = True);
673 public:
674 
675 
676  AbstractDataProviderType getDataProviderType();
677 
678 
679 protected:
680  *hash<auto> serializeElement(Namespaces nsc, string key, XsdElement element, auto h, *softbool omitType);
681 public:
682 
683 
684  *hash<auto> serialize(Namespaces nsc, auto h, *softbool omitType);
685 
686 
687 protected:
688  hash<auto> serializeChoice(Namespaces nsc, hash<string, XsdElement> emap, hash<auto> h, *softbool omitType, bool all_members);
689 public:
690 
691 
692  *hash<auto> deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto oval);
693 
694 
695 protected:
696  *hash<auto> parseChoice(hash<auto> val, hash<string, XsdElement> emap, string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, *bool required);
697 public:
698 
699 };
700 
703 
704 public:
710  *string input_name;
712  *string output_name;
713 
716 
718  *string soapAction;
719 
721  hash<string, bool> reqh;
722 
724  hash<string, OperationalBinding> bindings;
725 
726 protected:
728  hash<string, WSMessage> faults;
729 
730 public:
731 
733 
737  constructor(hash<auto> p, Namespaces nsc, *hash<auto> messages) ;
738 
739 
741  *hash<string, WSMessage> getFaultMessages();
742 
743 
745  bool hasFault(string fault);
746 
747 
749  setDocStyleBinding(reference idocmap);
750 
751 
754 
755 
758 
759 
761 
770 
771 
773 
781 
782 
784 
800  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);
801 
802 
804 
819  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);
820 
821 
823 
837  hash<auto> serializeResponse(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *bool soap12, *int xml_opts, *string bname, *hash<auto> http_headers);
838 
839 
841 
846  auto deserializeRequest(hash<auto> o, *string bname);
847 
848 
850 
855  auto deserializeResponse(hash<auto> o, *string bname);
856 
857 
862  *hash<auto> deserializeRequestPath(string path, *string bname);
863 
864 
866 protected:
867  static hash<auto> processNSValue(hash<auto> h);
868 public:
869 
870 
872 
874  bool isSoap12();
875 
876 
878 
880  string getTargetNS();
881 
882 };
883 
885 public hashdecl WSDL::ArgInfo {
887  string name;
888 
890  string part;
891 
893  XsdAbstractType type;
894 
897 };
898 
900 
907 
908 public:
910  hash<string, hash<WSDL::ArgInfo>> args;
911 
913  hash<string, string> pmap;
914 
916  hash<string, XsdAbstractType> tmap;
917 
918  // keep a weak reference to the namespace map
919  Namespaces nsc;
920 
921  constructor(hash<auto> m, hash<string, hash<string, XsdElement>> emap, hash<string, XsdAbstractType> tmap, Namespaces nsc) ;
922 
923 
925  AbstractDataProviderType getDataProviderType();
926 
927 
932  auto serializeRpcValue(string part, bool encoded, reference<hash<auto>> h, reference<string> ons);
933 
934 
936 
944  *hash<auto> serializeRpc(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference<auto> h, bool fault);
945 
946 
948 
956  *hash<auto> serializeDocument(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference<auto> h, bool fault);
957 
958 
960 
965  *hash<auto> deserializeRpc(*hash<auto> mrh, hash<auto> val, *string part);
966 
967 
968  *hash<auto> deserializeDocument(*hash<auto> mrh, auto val, *string parts);
969 
970 
972 
975  hash<auto> serializeAllPartData(*hash<auto> val);
976 
977 
979 
985  hash<auto> serializeData(Namespaces nsc, string key, *hash<auto> val);
986 
987 
989 
992  hash<auto> deserializeData(string part, hash<auto> val);
993 
994 
996 
999  hash<auto> deserializeAllPartData(hash<auto> val);
1000 
1001 
1003 
1010 private:
1011  auto getValueFromHash(string ename, reference<auto> v, bool removeFound);
1012 public:
1013 
1014 
1016 private:
1017  auto getValueFromHash(*WSDL::XsdElement element, reference<auto> v, bool removeFound);
1018 public:
1019 
1020 
1021  string getSerializedKey(string part);
1022 
1023 
1025 
1027  string checkPart(string pname);
1028 
1029 };
1030 
1031 // private helper class for lazy name resolution
1032 class WSDL::XsdLateResolverHelper {
1033 
1034 public:
1035 protected:
1036  list<object> l();
1037 
1038 public:
1039 
1040  constructor();
1041 
1042 
1043  add(object v);
1044 
1045 
1046  list<auto> getList();
1047 
1048 
1049  clearResolved();
1050 
1051 
1052  static bool isResolved(XsdTypedData t);
1053 
1054  static bool isResolved(XsdSimpleType t);
1055 
1056  static bool isResolved(XsdComplexType t);
1057 
1058  static bool isResolved(XsdArrayType t);
1059 
1060  static bool isResolved(auto t);
1061 };
1062 
1065 
1066 public:
1067  bool docstyle;
1070  *string soapAction;
1071 
1072  constructor(string name, string ns, bool docstyle, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1073 
1074 
1075  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);
1076 
1077 
1078  auto deserializeMessage(WSOperation op, hash<auto> o, bool request);
1079 
1080 
1081  auto deserializeRequestPath(WSOperation op, string path);
1082 
1083 
1084  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);
1085 
1086  abstract auto deserializeMessageImpl(WSOperation op, hash<auto> o, bool request);
1087 
1088  abstract auto deserializeRequestPathImpl(WSOperation op, string path);
1089 };
1090 
1091 class WSDL::SoapBinding : public WSDL::OperationalBinding {
1092 
1093 public:
1094  string soapTransport;
1095 
1096  constructor(string name, string ns, bool docstyle, string soapTransport, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1097 
1098 
1099  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);
1100 
1101 
1102 private:
1103  hash<auto> serializeSoapMessage(WSOperation op, *WSMessage msg, auto val, *hash<auto> header, *hash<auto> nsh, bool request, bool soap12, reference mpm, *string faultmsg);
1104 public:
1105 
1106 
1107  auto deserializeMessageImpl(WSOperation op, hash<auto> orig_msg, bool request);
1108 
1109 
1111 private:
1112  static list<auto> processMultiRef(hash<auto> body);
1113 public:
1114 
1115 
1116  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1117 
1118 };
1119 
1120 class WSDL::HttpBinding : public WSDL::OperationalBinding {
1121 
1122 public:
1123  string httpMethod;
1124  string location;
1125 
1126  constructor(string name, string ns, bool docstyle, string httpMethod, string location, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1127 
1128 
1129  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);
1130 
1131 
1133 private:
1134  string serializeRequestPath(WSOperation op, auto h);
1135 public:
1136 
1137 
1138  auto deserializeMessageImpl(WSOperation op, hash<auto> v, bool request);
1139 
1140 
1141  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1142 
1143 };
1144 
1146 
1148 class WSDL::BindingMessageBodyDescription : public Serializable {
1149 
1150 public:
1152 
1155  bool encoded;
1156 
1158  *string encodingStyle;
1159 
1161  *string ns;
1162 
1164  *list<auto> parts;
1165 
1166  constructor(bool encoded, *string encodingStyle, *string ns, *string parts);
1167 
1168 
1169  bool isMultipart();
1170 
1171 };
1172 
1174 class WSDL::BindingMessageHeaderDescription : public Serializable {
1175 
1176 public:
1178  string part;
1179 
1181 
1184  bool encoded;
1185 
1188 
1190  /*
1191  @param part message part name
1192  @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)
1193  @param msg actual message
1194  */
1195  constructor(string part, bool encoded = False, WSMessage msg);
1196 
1197 };
1198 
1200 
1202 class WSDL::BindingContentDescription : public Serializable {
1203 
1204 public:
1206  string part;
1207 
1208  // list of accepted content types (with "xxx/*")
1209  list<auto> acceptedContentTypes = ();
1210 
1211  // list of accepted specific content types
1212  list<auto> acceptedContentTypeSubtypes = ();
1213 
1215  bool formUrlEncoded = False;
1216 
1219 
1220  addContentType(string type);
1221 
1222 };
1223 
1225 
1227 class WSDL::MimeXmlMessageDescription : public Serializable {
1228 
1229 public:
1231 
1233  string part;
1234 
1235  constructor(string part);
1236 
1237 };
1238 
1240 class WSDL::BindingMessageDescription : public Serializable {
1241 
1242 public:
1245 
1247 
1249  *hash<auto> urlReplacement;
1250 
1252 
1263  bool urlEncoded = False;
1264 
1267 
1270 
1271 private:
1273  list<BindingMessageHeaderDescription> headers = cast<list<BindingMessageHeaderDescription>>(());
1274 
1275 public:
1276 
1277  addHeader(BindingMessageHeaderDescription hdr);
1278 
1279 
1281  bool hasHeaders();
1282 
1283 
1285  list<BindingMessageHeaderDescription> getHeaders();
1286 
1287 
1288  setUrlReplacement(string loc);
1289 
1290 };
1291 
1294 
1295 public:
1296 private:
1297  string port;
1298 
1300 
1303  bool docstyle = True;
1304 
1305  *string httpMethod;
1306  *string soapTransport;
1307 
1308 public:
1309 
1310  constructor(hash<auto> data, Namespaces nsc, reference portTypes, reference idocmap, *hash<auto> messages) ;
1311 
1312 
1314 private:
1315  string checkMessagePart(WSMessage msg, *string partname, string errs);
1316 public:
1317 
1318 
1319  string getPort();
1320 
1321 
1322  bool isSoapBinding();
1323 
1324 
1325  bool isHttpBinding();
1326 
1327 };
1328 
1329 // private namespace prefix redefinition class
1330 class WSDL::NamespacePrefixHelper {
1331 
1332 public:
1333 
1334 protected:
1336  Namespaces nsc;
1337 
1338  // overriden prefixes
1339  hash<auto> h;
1340 
1341  // overridden target namespace
1342  bool targ_ns;
1343 
1344  // overridden default namespace
1345  bool def_ns;
1346 
1347 public:
1348 
1349  constructor(Namespaces nsc, *hash<auto> nsattr);
1350 
1351 
1352  destructor();
1353 
1354 
1355  save(string k, string v);
1356 
1357 };
1358 
1360 class WSDL::Namespaces : public Serializable {
1361 
1362 public:
1363  // options are here since this object is passed through all serialization and deserialization
1364  bool opt_empty_string_is_nothing = False;
1365  bool opt_allow_any_header = False;
1366 
1367 protected:
1369  hash<string, string> ns = {
1370  "xsd": XSD_NS,
1371  };
1372 
1374  hash<string, string> nsr = {
1375  XSD_NS: "xsd",
1376  };
1377 
1379  hash<string, bool> xsd_schema = {
1380  "xsd": True,
1381  };
1382 
1384  hash<string, string> imap = {
1385  "xsd": XSD_NS,
1386  };
1387 
1389  hash<string, string> imapr = {
1390  XSD_NS: "xsd",
1391  };
1392 
1394  bool hassoap11 = False;
1395 
1397  bool hassoap12 = False;
1398 
1400  *string target_ns;
1401 
1403  list<auto> nss = ();
1404 
1406  *string default_ns;
1407 
1409  list<auto> dss = ();
1410 
1412  hash<string, XsdBaseType> base_types;
1413 
1416  SOAP_ENCODING: "soapenc",
1417  XSD_NS: "xsd",
1418  XSI_NS: "xsi",
1419  SOAP_11_ENV: "soapenv",
1420  SOAP_12_ENV: "soapenv",
1421  MIME_NS: "mime",
1422  HTTP_NS: "http",
1423  };
1424 
1425 public:
1426 
1428  constructor(hash<auto> nsh, *Namespaces nsc, *string targetNamespace);
1429 
1430 
1431  *string getDefaultNs();
1432 
1433 
1434  addNamespaces(hash<auto> nsh, *NamespacePrefixHelper nph);
1435 
1436 
1437  restorePrefixes(hash<auto> h);
1438 
1439 
1440 protected:
1441  addNamespaceIntern(string ns, string val, *bool override);
1442 public:
1443 
1444 
1447 
1448 
1450  string getUniquePrefix(string uri, *string default_prefix);
1451 
1452 
1454  string getOutputNamespaceUri(string nsp);
1455 
1456 
1458  *hash<auto> getOutputNamespaceHash(*hash<auto> nsh);
1459 
1460 
1463 
1464 
1466  *string getNamespaceUri(*string nsp);
1467 
1468 
1471 
1472 
1475 
1476 
1479 
1480 
1483 
1484 
1487 
1488 
1491 
1492 
1495 
1496 
1498 protected:
1499  string registerNamespaceIntern(string uri, *string default_pfx);
1500 public:
1501 
1502 
1505 
1506 
1508  bool hasSoap11();
1509 
1510 
1512  bool hasSoap12();
1513 
1514 
1516  *bool isSchema(string ns);
1517 
1518 
1520  string getInputNamespaceUri(string nsa);
1521 
1522 
1523  bool doType(string t, reference<hash> typeinfo, reference<XsdAbstractType> rtype, *hash<string, XsdAbstractType> tmap);
1524 
1525 
1526  hash<auto> getTypeHash(string t);
1527 
1528 
1529  XsdBaseType getBaseType(string t);
1530 
1531 
1533  string translateOutputNamespacePrefix(*string nsa);
1534 
1535 };
1536 
1537 // private functions
1538 XsdAbstractType tmap_get(hash<string, XsdAbstractType> tmap, string name);
1539 
1540 
1541 *XsdAbstractType tmap_try_get(hash<string, XsdAbstractType> tmap, string name);
1542 
1543 
1544 // private functions
1545 XsdElement emap_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1546 
1547 
1548 *XsdElement emap_try_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1549 
1550 
1552 public hashdecl WSDL::PortTypeInfo {
1553  hash<string, WSOperation> operations;
1554 };
1555 
1557 public hashdecl WSDL::ServiceInfo {
1559  string name;
1561  hash<string, hash> port;
1562 };
1563 
1565 public hashdecl WSDL::OperationInfo {
1567  string port;
1568 
1571 };
1572 
1574 
1576 class WSDL::WebService : public WSDL::XsdBase,public Qore::Serializable {
1577 
1578 public:
1580  string wsdl;
1581 
1583  *hash<auto> opts;
1584 
1586  bool has_try_import = False;
1587 
1589 
1591  string name;
1592 
1594 
1596  string hash_str;
1597 
1599  transient Namespaces nsc;
1600 
1602  transient list<string> wsdl_services();
1603 
1605  transient hash<string, XsdElement> idocmap();
1606 
1608  transient hash<string, hash<string, XsdElement>> emap();
1609 
1611  transient hash<string, WSMessage> messages();
1612 
1614  transient hash<string, XsdAbstractType> tmap();
1615 
1617  transient hash<string, hash<PortTypeInfo>> portType();
1618 
1620  transient *code try_import;
1621 
1623 
1625  transient *string def_path;
1626 
1627 protected:
1628  // service definitions; name -> service info hash
1629  hash<string, hash<WSDL::ServiceInfo>> services();
1630 
1631  // service bindings; name -> Binding
1632  hash<string, Binding> binding();
1633 
1634 public:
1635 
1637 
1648  constructor(string str, *hash<auto> opts);
1649 
1650 
1652 
1656  string getName();
1657 
1658 
1660 
1664  synchronized string getHash();
1665 
1667 
1670 
1671 
1673  softlist<string> getOperationNames();
1674 
1675 
1677  WSDL::WSOperation getPortTypeOperation(string ptname, string opname);
1678 
1679 
1681  WSDL::WSOperation getBindingOperation(*string bname, string opname);
1682 
1683 
1685 
1689  list<hash<OperationInfo>> listOperations();
1690 
1691 
1693 
1700 
1701 
1703 
1709  list<hash<WSDL::ServiceInfo>> listServices();
1710 
1711 
1713 
1722  hash<WSDL::ServiceInfo> getService(string name);
1723 
1724 
1726  hash<auto> getType(string name, auto v);
1727 
1728 
1729 protected:
1730  XsdBaseType getBaseType(string t);
1731 public:
1732 
1733 
1734 protected:
1735  resolveType(XsdSimpleType t);
1736 public:
1737 
1738 
1739 protected:
1740  resolveType(XsdElement xe);
1741 public:
1742 
1743 
1744 protected:
1745  resolveType(XsdAttribute xd);
1746 public:
1747 
1748 
1749 protected:
1750  resolveType(XsdComplexType ct);
1751 public:
1752 
1753 
1754 protected:
1755  resolveType(XsdArrayType t);
1756 public:
1757 
1758 
1759 protected:
1760  XsdAbstractType resolveType(hash<auto> v);
1761 public:
1762 
1763 
1764  // parse XSD schema types
1765 protected:
1766  parseTypes(*hash<auto> data, auto http_client, auto http_headers);
1767 public:
1768 
1769 
1770 protected:
1771  parseMessages(*softlist<auto> message);
1772 public:
1773 
1774 
1775 protected:
1776  parseService(*softlist<auto> svcs);
1777 public:
1778 
1779 
1780 protected:
1781  parsePortType(*softlist<auto> data);
1782 public:
1783 
1784 
1785 protected:
1786  parseBinding(*softlist<auto> bindings);
1787 public:
1788 
1789 
1791 
1793  bool isSoap12();
1794 
1795 
1797 
1799  string getWSDL();
1800 
1801 
1803 
1808  string getWSDL(string base_url);
1809 
1810 
1811 protected:
1812  string getOperationParams(WSMessage msg);
1813 public:
1814 
1815 
1817 
1822  getReport(StringOutputStream stream, *string wsdl_name);
1823 
1824 
1826 
1830  string getReport(*string wsdl_name);
1831 
1832 
1834 
1836 private:
1837  doInit(string str, *hash<auto> opts);
1838 public:
1839 
1840 
1842 
1844 private:
1845  deserializeMembers(hash<auto> members);
1846 public:
1847 
1848 };
1849 
1851 
1854 
1855 public:
1856 protected:
1857  WebService ws;
1858  hash<auto> opts;
1859 
1860 public:
1861 
1862  const DefaultOpts = (
1863  "comments": False,
1864  "choices": False,
1865  "max_items": 3,
1866  );
1867 
1869 
1875  constructor(WebService ws, *hash<auto> opts);
1876 
1877 
1878 protected:
1879  hash<auto> getTypeInfo(XsdBaseType t);
1880 public:
1881 
1882 
1883 protected:
1884  hash<auto> getTypeInfo(XsdSimpleType t);
1885 public:
1886 
1887 
1888 protected:
1889  hash<auto> getTypeInfo(XsdComplexType t);
1890 public:
1891 
1892 
1893  hash<auto> getMessage(XsdElement elem, *softlist<auto> comments);
1894 
1895 
1897 
1901  hash<auto> getMessage(string name);
1902 
1903 
1905 
1910 
1911 };
WSDL::XsdBase
base class with helper methods for XSD data processing
Definition: WSDL.qm.dox.h:355
WSDL::BindingMessageDescription::mimeXml
*WSDL::MimeXmlMessageDescription mimeXml
optional mimeXml message scription
Definition: WSDL.qm.dox.h:1269
WSDL::WSMessage::args
hash< string, hash< WSDL::ArgInfo > > args
args keys are part names for types reps. element names for element. Definition must provide unique va...
Definition: WSDL.qm.dox.h:910
WSDL::Namespaces::pushDefaultNamespace
pushDefaultNamespace(string ns)
pushes the current default namespace URI on the stack when parsing schemas and sets the current defau...
WSDL::WebService::name
string name
the name of the WebService
Definition: WSDL.qm.dox.h:1591
WSDL::Namespaces::default_ns
*string default_ns
default namespace for unprefixed definitions
Definition: WSDL.qm.dox.h:1406
WSDL::WSOperation::deserializeResponse
auto deserializeResponse(hash< auto > o, *string bname)
parses a hash representing a parsed XML response (parsed with parse_xml(XPF_PRESERVE_ORDER)) for the ...
WSDL::WSMessage::serializeRpcValue
auto serializeRpcValue(string part, bool encoded, reference< hash< auto >> h, reference< string > ons)
WSDL::WSOperation::bindings
hash< string, OperationalBinding > bindings
params per associated binding; key = binding name; value = OperationalBinding object
Definition: WSDL.qm.dox.h:724
WSDL::WebService::tmap
transient hash< string, XsdAbstractType > tmap()
map of types
WSDL::OperationInfo::operation
WSDL::WSOperation operation
the operation object
Definition: WSDL.qm.dox.h:1570
WSDL::WebService::isSoap12
bool isSoap12()
returns True if the WSDL describes a SOAP 1.2 service
WSDL::Namespaces::getTargetNamespaceOutputPrefix
string getTargetNamespaceOutputPrefix()
returns the output namespace prefix for the target namespace, if any
WSDL::BindingMessageDescription::hasHeaders
bool hasHeaders()
returns True if the header descriptions are available
WSDL::XsdBaseType
class for XSD base types
Definition: WSDL.qm.dox.h:442
WSDL::WSMessage::checkPart
string checkPart(string pname)
check if pname is defined as message part
WSDL::WSDLLib::getHTTP
static string getHTTP(string url, *string path, *HTTPClient hc, *hash< auto > headers, bool as_string=True)
retrieves a file from a URL with HTTP and returns the file's contents as a string
WSDL::WSDLLib
contains helper methods for retrieving WSDLs from a URL
Definition: WSDL.qm.dox.h:263
WSDL::WSOperation::input
WSMessage input
request message
Definition: WSDL.qm.dox.h:706
WSDL::PortTypeInfo
WSDL port type hash.
Definition: WSDL.qm.dox.h:1552
WSDL::WebService::emap
transient hash< string, hash< string, XsdElement > > emap()
map of elements
WSDL::Namespaces::DefaultPrefixes
const DefaultPrefixes
maps namespaces to default prefixes
Definition: WSDL.qm.dox.h:1415
WSDL::WSMessageHelper::constructor
constructor(WebService ws, *hash< auto > opts)
creates the WebService object
WSDL::Namespaces::getOutputNamespaceUri
string getOutputNamespaceUri(string nsp)
returns the namespace URI for the given output namespace prefix
WSDL::BindingMessageDescription::body
*WSDL::BindingMessageBodyDescription body
the description of the message body
Definition: WSDL.qm.dox.h:1244
WSDL::WSOperation::reqh
hash< string, bool > reqh
a hash of top-level request names for this operation (depends on bindings)
Definition: WSDL.qm.dox.h:721
WSDL::WSMessage::serializeAllPartData
hash< auto > serializeAllPartData(*hash< auto > val)
serialize all values as string or binary
WSDL::BindingMessageBodyDescription::ns
*string ns
namespace; "only applies to content not explicitly defined by the abstract types"
Definition: WSDL.qm.dox.h:1161
WSDL::Namespaces::registerNamespaceIntern
string registerNamespaceIntern(string uri, *string default_pfx)
registers a namespace internally
WSDL::BindingMessageHeaderDescription::encoded
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1184
WSDL::SoapUseMap
const SoapUseMap
SOAP "use" to "encoded" mappings.
Definition: WSDL.qm.dox.h:204
WSDL::ServiceInfo::port
hash< string, hash > port
port info
Definition: WSDL.qm.dox.h:1561
WSDL::ArgInfo
message argument hash description
Definition: WSDL.qm.dox.h:885
WSDL::WSOperation::output
WSMessage output
response message
Definition: WSDL.qm.dox.h:708
WSDL::WebService::getBinding
WSDL::Binding getBinding(string name)
return a WSDL::Binding object describing the requested binding
WSDL::XsdElement
XSD element class.
Definition: WSDL.qm.dox.h:521
WSDL::WSMessage::deserializeRpc
*hash< auto > deserializeRpc(*hash< auto > mrh, hash< auto > val, *string part)
deserialize RPC message
WSDL::BindingMessageHeaderDescription::msg
WSMessage msg
a weak reference to the actual message
Definition: WSDL.qm.dox.h:1187
WSDL::WebService::deserializeMembers
deserializeMembers(hash< auto > members)
can be used to create a WebService object from a hash created with serialize()
WSDL::XsdAttribute
XSD attribute class.
Definition: WSDL.qm.dox.h:502
WSDL::Binding
class for WSDL bindings
Definition: WSDL.qm.dox.h:1293
WSDL::Namespaces::merge
merge(Namespaces nsc)
merges namespaces when parsing imported schemas
WSDL::WSOperation::processNSValue
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 ...
WSDL::Namespaces::getNamespaceUri
*string getNamespaceUri(*string nsp)
returns the namespace URI for the given prefix or the target namespace Uri
WSDL::WSOperation::serializeRequest
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.
WSDL::WSOperation::constructor
constructor(hash< auto > p, Namespaces nsc, *hash< auto > messages)
creates the WSOperation object from the arguments supplied
WSDL::WebService::getType
hash< auto > getType(string name, auto v)
return a hash value that can be used to serialize a value as a particular type
WSDL::XsdTypedData
XSD typed data class.
Definition: WSDL.qm.dox.h:491
WSDL::WSOperation::getFaultMessages
*hash< string, WSMessage > getFaultMessages()
returns a hash of fault messages keyed by fault name
WSDL::WSDLLib::getWSDL
static WebService getWSDL(WebService wsdl)
returns the argument
WSDL::ArgInfo::name
string name
the arg name
Definition: WSDL.qm.dox.h:887
WSDL::WSOperation::setDocStyleBinding
setDocStyleBinding(reference idocmap)
this method is called if this operation supports at least one binding with document style
WSDL::BindingMessageDescription::headers
list< BindingMessageHeaderDescription > headers
a list of WSDL::BindingMessageHeaderDescription objects
Definition: WSDL.qm.dox.h:1273
WSDL::WSDLLib::SoapMimeTypes
const SoapMimeTypes
Mime types recognized as SOAP messages.
Definition: WSDL.qm.dox.h:267
WSDL::XsdSimpleType
XSD simple type class.
Definition: WSDL.qm.dox.h:561
WSDL::SOAP_TRANSPORT_HTTP
const SOAP_TRANSPORT_HTTP
SOAP HTTP transport URI.
Definition: WSDL.qm.dox.h:236
WSDL::WSDLLib::getFile
static data getFile(string fn, bool as_string=True)
retrieves a local file and returns the file's contents as a string
WSDL::XsdNamedData
base class for XSD classes with a "name" attribute
Definition: WSDL.qm.dox.h:372
WSDL::SOAP_ENCODING
const SOAP_ENCODING
soap encoding URI
Definition: WSDL.qm.dox.h:216
WSDL::WebService::portType
transient hash< string, hash< PortTypeInfo > > portType()
hash of port names to port type information hashes
WSDL::WSMessage::getValueFromHash
auto getValueFromHash(*WSDL::XsdElement element, reference< auto > v, bool removeFound)
when only one arg then try to get values based on element keys
WSDL::Namespaces::popDefaultNamespace
popDefaultNamespace()
restores any previous default namespace URI from the stack to the current default namespace URI
WSDL::BindingMessageDescription::content
*WSDL::BindingContentDescription content
optional content-type descriptions
Definition: WSDL.qm.dox.h:1266
WSDL::WSOperation::faults
hash< string, WSMessage > faults
fault messages keyed by fault name
Definition: WSDL.qm.dox.h:728
WSDL::WSOperation::getTargetNS
string getTargetNS()
returns the target namespace for the operation
WSDL::WSDLLib::getFTP
static data getFTP(string url, string path, bool as_string=True)
retrieves a file from a URL with the FTP protocol and returns the file's contents as binary or string...
WSDL::WSMessage::deserializeAllPartData
hash< auto > deserializeAllPartData(hash< auto > val)
deserialize all values in string or binary form
WSDL::BindingMessageDescription::urlReplacement
*hash< auto > urlReplacement
a hash of URL replacement values keyed by part name, values are URI paths
Definition: WSDL.qm.dox.h:1249
WSDL::WSMessage::tmap
hash< string, XsdAbstractType > tmap
type map
Definition: WSDL.qm.dox.h:916
WSDL::ENVELOPE_12_NS
const ENVELOPE_12_NS
soap 1.2 envelope namespaces
Definition: WSDL.qm.dox.h:193
WSDL::WSMessage::serializeData
hash< auto > serializeData(Namespaces nsc, string key, *hash< auto > val)
serialized value of particular type value as string or binary
WSDL::XsdArrayType
class for XSD array types; currently only supports single dimensional arrays
Definition: WSDL.qm.dox.h:463
WSDL::WebService
main class representing a parsed WSDL file
Definition: WSDL.qm.dox.h:1576
WSDL::MimeXmlMessageDescription
describes a mimeXml payload for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1227
WSDL::wsdl_set_global_compat_allow_any_header
wsdl_set_global_compat_allow_any_header(softbool val)
sets the global_compat_allow_any_header variable to the given value to force the WSDL module to allow...
WSDL::Namespaces::translateOutputNamespacePrefix
string translateOutputNamespacePrefix(*string nsa)
returns the output namespace prefix for the given input namespace prefix
WSDL::Namespaces::base_types
hash< string, XsdBaseType > base_types
base type map
Definition: WSDL.qm.dox.h:1412
WSDL::SOAP_11_ENV
const SOAP_11_ENV
SOAP 1.1 envelope URI.
Definition: WSDL.qm.dox.h:161
WSDL::WSDLLib::parseMultiPartSOAPMessage
static hash< auto > parseMultiPartSOAPMessage(hash< auto > msg)
takes a hash representation of a SOAP message and handles multipart messages, checks the content-type...
WSDL::Namespaces::getTargetNamespaceUri
*string getTargetNamespaceUri()
returns the primary target namespace Uri
WSDL::WSOperation::output_name
*string output_name
response message name
Definition: WSDL.qm.dox.h:712
WSDL::BindingMessageBodyDescription::encoded
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1155
WSDL::WSOperation::serializeResponse
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
WSDL::WebService::doInit
doInit(string str, *hash< auto > opts)
supports the constructor and deserialization
WSDL::ArgInfo::type
XsdAbstractType type
type for the argument
Definition: WSDL.qm.dox.h:893
WSDL::BindingMessageHeaderDescription::constructor
constructor(string part, bool encoded=False, WSMessage msg)
creates the object
WSDL::MIME_NS
const MIME_NS
MIME namespace URI.
Definition: WSDL.qm.dox.h:179
WSDL::WSMessage::pmap
hash< string, string > pmap
maps part names to args key, all parts are in hash
Definition: WSDL.qm.dox.h:913
WSDL::XsdNamedData::ns
*string ns
input namespace prefix (if any given)
Definition: WSDL.qm.dox.h:378
WSDL::BindingMessageDescription
describes an input or output message in a SOAP operational binding
Definition: WSDL.qm.dox.h:1240
WSDL::WebService::getOperation
WSDL::WSOperation getOperation(string opname)
returns the given operation or throws an exception if it cannot be found; operations are searched in ...
WSDL::WSOperation::soapAction
*string soapAction
the SOAPAction header value to send with this operation
Definition: WSDL.qm.dox.h:718
WSDL::WebService::has_try_import
bool has_try_import
flag if the object has a "try_import" closure or call reference
Definition: WSDL.qm.dox.h:1586
WSDL::MimeXmlMessageDescription::part
string part
refers to a message part defining the concrete schema of the root XML element
Definition: WSDL.qm.dox.h:1233
WSDL::WSMessageHelper
helper class implementing sample message generation
Definition: WSDL.qm.dox.h:1853
WSDL::Namespaces::constructor
constructor(hash< auto > nsh, *Namespaces nsc, *string targetNamespace)
creates the object with the WSDL definitions attribute hash
WSDL::WSMessage::deserializeData
hash< auto > deserializeData(string part, hash< auto > val)
deserialize value in string or binary form
WSDL::WebService::getPortTypeOperation
WSDL::WSOperation getPortTypeOperation(string ptname, string opname)
returns the given operation for particular porttype or throws an exception if it cannot be found
WSDL::BindingMessageHeaderDescription
describes a SOAP message header for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1174
WSDL::WebService::getWSDL
string getWSDL(string base_url)
returns the XML string for the WSDL, adjusting the URLs for binding locations depending on the caller
WSDL::WSMessageHelper::getMessage
hash< auto > getMessage(string name)
prepare sample message
WSDL::BindingContentDescription::formUrlEncoded
bool formUrlEncoded
are all content-types form URL encoded?
Definition: WSDL.qm.dox.h:1215
WSDL::Namespaces::target_ns
*string target_ns
current target namespace
Definition: WSDL.qm.dox.h:1400
WSDL::WebService::listOperations
list< hash< OperationInfo > > listOperations()
returns a list of hashes giving supported operation names for each port in the WSDL
WSDL::Namespaces
namespace container class
Definition: WSDL.qm.dox.h:1360
WSDL::WebService::getName
string getName()
returns the name of the service
WSDL::Namespaces::ns
hash< string, string > ns
maps output namespace prefixes to namespace URIs
Definition: WSDL.qm.dox.h:1369
WSDL::XsdComplexType::checkExtends
checkExtends(XsdAbstractType t, string ename)
throws an exception if the types are not compatible
WSDL::Namespaces::getReferencedNamespaceMap
*hash< auto > getReferencedNamespaceMap()
returns a hash of namespace prefixes to namespaces URIs actually used
WSDL::XSI_NS
const XSI_NS
XSI namespace URI.
Definition: WSDL.qm.dox.h:174
WSDL::Namespaces::popTargetNamespace
popTargetNamespace()
restores any previous target namespace URI from the stack to the current target namespace URI
WSDL::Namespaces::pushTargetNamespace
pushTargetNamespace(string ns)
pushes the current target namespace URI on the stack when parsing schemas and sets the current target...
WSDL::XSD_NS
const XSD_NS
XSD namespace URI.
Definition: WSDL.qm.dox.h:172
WSDL::WSOperation::isSoap12
bool isSoap12()
returns True if the operation is a SOAP 1.2 operation
WSDL::BindingContentDescription::acceptAllContentTypes
bool acceptAllContentTypes
are all content-types accepted?
Definition: WSDL.qm.dox.h:1218
WSDL::ArgInfo::element
XsdElement element
element for the argument
Definition: WSDL.qm.dox.h:896
WSDL::WSOperation::input_name
*string input_name
request message name
Definition: WSDL.qm.dox.h:710
WSDL::BindingMessageBodyDescription::parts
*list< auto > parts
indicates which parts appear somewhere within the SOAP Body portion of the message
Definition: WSDL.qm.dox.h:1164
WSDL::wsdl_set_global_compat_empty_string_is_nothing
wsdl_set_global_compat_empty_string_is_nothing(softbool val)
sets the global_compat_empty_string_is_nothing variable to the given value to force the WSDL module t...
WSDL::WebService::getHash
synchronized string getHash()
returns a unique hash for the WSDL that can be used to compare schemas for equality
WSDL::WebService::getReport
string getReport(*string wsdl_name)
prepare a WebService report enumerating the services and operations of the WSDL
WSDL::WebService::getReport
getReport(StringOutputStream stream, *string wsdl_name)
prepare a WebService report enumerating the services and operations of the WSDL, outputs to the outpu...
WSDL::Namespaces::hassoap12
bool hassoap12
if True then has SOAP 1.2
Definition: WSDL.qm.dox.h:1397
WSDL
main WSDL namespace
Definition: WSDL.qm.dox.h:156
WSDL::WSOperation
web service operation class
Definition: WSDL.qm.dox.h:702
WSDL::WebService::wsdl
string wsdl
the WSDL string
Definition: WSDL.qm.dox.h:1580
WSDL::WebService::getService
hash< WSDL::ServiceInfo > getService(string name)
returns a hash describing the requested service
WSDL::ServiceInfo
WSDL service info hash.
Definition: WSDL.qm.dox.h:1557
WSDL::WebService::getOperationNames
softlist< string > getOperationNames()
returns a list of known operation names
WSDL::WebService::listServices
list< hash< WSDL::ServiceInfo > > listServices()
returns a list of services defined in the WSDL
WSDL::Namespaces::getUniquePrefix
string getUniquePrefix(string uri, *string default_prefix)
returns a unique namespace prefix from a URI path string
WSDL::OperationInfo::port
string port
the name of the port defining the operation
Definition: WSDL.qm.dox.h:1567
WSDL::WSDLLib::parseSOAPMessage
static *hash< auto > parseSOAPMessage(hash< auto > msg)
WSDL::WSOperation::markRpcStyleBinding
markRpcStyleBinding()
this method is called if this operation supports at least one binding with RPC style
WSDL::Namespaces::hasSoap12
bool hasSoap12()
returns True if using SOAP 1.2, False if not
WSDL::OperationInfo
WSDL operation info.
Definition: WSDL.qm.dox.h:1565
WSDL::Namespaces::nss
list< auto > nss
target namespace stack;
Definition: WSDL.qm.dox.h:1403
WSDL::WebService::constructor
constructor(string str, *hash< auto > opts)
creates the WebService object
WSDL::WSMessage::serializeDocument
*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
WSDL::WSDLLib::getWSDL
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
WSDL::WebService::idocmap
transient hash< string, XsdElement > idocmap()
a hash of element names to XsdElement objects for top-level document-style bindings
WSDL::version
const version
this WSDL implementation version
Definition: WSDL.qm.dox.h:158
WSDL::XsdNamedData::descriptive_name
descriptive_name
descriptive name flag
Definition: WSDL.qm.dox.h:380
WSDL::WebService::def_path
transient *string def_path
default path for retrieving XSD references
Definition: WSDL.qm.dox.h:1625
WSDL::Binding::docstyle
bool docstyle
use RPC or document style
Definition: WSDL.qm.dox.h:1303
WSDL::Namespaces::imapr
hash< string, string > imapr
hash mapping input namespace URIs to input namespace prefixes
Definition: WSDL.qm.dox.h:1389
WSDL::WSMessageHelper::getMessage
auto getMessage(WSMessage msg)
prepare sample message
WSDL::WSDLLib::getFileFromURL
static data getFileFromURL(string url, string def_protocol='file', *HTTPClient http_client, *hash< auto > http_headers, bool as_string=True, *string def_path, *reference new_def_path)
retrieves a file from a URL
WSDL::BindingMessageBodyDescription::encodingStyle
*string encodingStyle
when encoded True, this is used to produce a concrete message by applying the specified encoding
Definition: WSDL.qm.dox.h:1158
WSDL::WebService::wsdl_services
transient list< string > wsdl_services()
list of services in this WSDL
WSDL::Namespaces::hasSoap11
bool hasSoap11()
returns True if using SOAP 1.1, False if not
WSDL::Namespaces::getTargetNamespaceInputPrefix
string getTargetNamespaceInputPrefix()
returns the input namespace prefix for the target namespace, if any
WSDL::WSOperation::nsc
Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:715
WSDL::WebService::opts
*hash< auto > opts
options used in the constructor
Definition: WSDL.qm.dox.h:1583
WSDL::RANGE_SHORT
const RANGE_SHORT
range of "short" values (16 bits)
Definition: WSDL.qm.dox.h:244
WSDL::XsdComplexType
XSD complex type class.
Definition: WSDL.qm.dox.h:592
WSDL::SOAP_12_NS
const SOAP_12_NS
SOAP 1.2 namespace URI.
Definition: WSDL.qm.dox.h:169
WSDL::ENVELOPE_11_NS
const ENVELOPE_11_NS
soap 1.1 envelope namespaces
Definition: WSDL.qm.dox.h:182
WSDL::XsdData
base class for XSD data classes
Definition: WSDL.qm.dox.h:364
WSDL::WebService::getWSDL
string getWSDL()
returns the XML string for the WSDL
WSDL::WebService::try_import
transient *code try_import
optional closure/call reference to try to resolve import declarations
Definition: WSDL.qm.dox.h:1620
WSDL::WebService::getBindingOperation
WSDL::WSOperation getBindingOperation(*string bname, string opname)
returns the given operation for particular binding or throws an exception if it cannot be found
WSDL::OperationalBinding
class for WSDL bindings associated with a SOAP operation
Definition: WSDL.qm.dox.h:1064
WSDL::Namespaces::isSchema
*bool isSchema(string ns)
returns True if if the input namespace prefix refers to the XSD namespace URI
WSDL::WSOperation::getTopLevelRequestNames
list< auto > getTopLevelRequestNames()
returns all top-level request names for this operation
WSDL::Namespaces::xsd_schema
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:1379
WSDL::Namespaces::getOutputNamespacePrefix
string getOutputNamespacePrefix(string ns)
looks up and registers a namespace if necessary, returns the namespace's prefix
WSDL::WSMessage::getDataProviderType
AbstractDataProviderType getDataProviderType()
Returns the data provider type for this message.
WSDL::Namespaces::imap
hash< string, string > imap
hash mapping input namespace prefixes to namespaces URIs
Definition: WSDL.qm.dox.h:1384
WSDL::SoapStyleMap
const SoapStyleMap
SOAP "style" to "document" mappings.
Definition: WSDL.qm.dox.h:210
WSDL::BindingMessageDescription::getHeaders
list< BindingMessageHeaderDescription > getHeaders()
returns a list of WSDL::BindingMessageHeaderDescription objects
WSDL::ArgInfo::part
string part
unique part name
Definition: WSDL.qm.dox.h:890
WSDL::WSOperation::serializeFault
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.
WSDL::SOAP_11_NS
const SOAP_11_NS
SOAP 1.1 namespace URI.
Definition: WSDL.qm.dox.h:166
WSDL::WSDLLib::isSOAPMessage
static bool isSOAPMessage(hash< auto > msg)
returns True is the message has a SOAP mime type
WSDL::WebService::nsc
transient Namespaces nsc
namespace container
Definition: WSDL.qm.dox.h:1599
WSDL::any_type_map
const any_type_map
mapping from Qore types to xsd types for xsd type "anyType"
Definition: WSDL.qm.dox.h:219
WSDL::BindingMessageDescription::urlEncoded
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:1263
WSDL::BindingContentDescription::part
string part
specifies the name of the message part
Definition: WSDL.qm.dox.h:1206
WSDL::RANGE_INT
const RANGE_INT
range of "int" values (32 bits)
Definition: WSDL.qm.dox.h:247
WSDL::BindingContentDescription
describes MIME content information for SOAP operational binding message descriptions
Definition: WSDL.qm.dox.h:1202
WSDL::ServiceInfo::name
string name
service name
Definition: WSDL.qm.dox.h:1559
WSDL::WSOperation::deserializeRequest
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...
WSDL::WSOperation::addBinding
addBinding(WSDL::OperationalBinding b)
adds the given binding
WSDL::BindingMessageHeaderDescription::part
string part
message part name
Definition: WSDL.qm.dox.h:1178
WSDL::WSOperation::getBinding
OperationalBinding getBinding(*string bname)
returns a hash representing the given binding
WSDL::WSOperation::deserializeRequestPath
*hash< auto > deserializeRequestPath(string path, *string bname)
WSDL::WSMessage::getValueFromHash
auto getValueFromHash(string ename, reference< auto > v, bool removeFound)
find part in value, remove that value from the hash
WSDL::WSMessage::serializeRpc
*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
WSDL::SOAP_TRANSPORT
const SOAP_TRANSPORT
known/supported transports
Definition: WSDL.qm.dox.h:239
WSDL::WebService::hash_str
string hash_str
the digest of the WSDL source
Definition: WSDL.qm.dox.h:1596
WSDL::Namespaces::getOutputNamespaceHash
*hash< auto > getOutputNamespaceHash(*hash< auto > nsh)
returns a hash of namespace attributes for outgoing SOAP messages
WSDL::BindingMessageBodyDescription
describes the message body for a SOAP operational binding message description
Definition: WSDL.qm.dox.h:1148
WSDL::XsdComplexType::cx_type
string cx_type
type of complexType object
Definition: WSDL.qm.dox.h:628
WSDL::WSMessage
web service message class
Definition: WSDL.qm.dox.h:906
WSDL::Namespaces::dss
list< auto > dss
default namespace stack;
Definition: WSDL.qm.dox.h:1409
WSDL::Namespaces::getInputNamespaceUri
string getInputNamespaceUri(string nsa)
returns the input namespace URI from the input namespace prefix
WSDL::Binding::checkMessagePart
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...
WSDL::ChoiceInfo
complex type choice hash
Definition: WSDL.qm.dox.h:586
WSDL::WebService::messages
transient hash< string, WSMessage > messages()
hash of messages names to messages
WSDL::Namespaces::hassoap11
bool hassoap11
if True then has SOAP 1.1
Definition: WSDL.qm.dox.h:1394
WSDL::WSOperation::hasFault
bool hasFault(string fault)
returns True if the given string is a valid fault message for the operation
WSDL::SOAP_12_ENV
const SOAP_12_ENV
SOAP 1.2 envelope URI.
Definition: WSDL.qm.dox.h:163
WSDL::WSDLLib::getFileFromURL
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
WSDL::HTTP_NS
const HTTP_NS
HTTP namespace URI.
Definition: WSDL.qm.dox.h:177
WSDL::WSDLLib::getWebServiceFromUrl
static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash< auto > http_headers)
returns a WebService object from a URL and other optional arguments
WSDL::Namespaces::nsr
hash< string, string > nsr
maps namespace URIs to output namespace prefixes
Definition: WSDL.qm.dox.h:1374