Qore WSDL Module Reference  0.5.4
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 
175 namespace WSDL {
177  const version = "0.3.6";
178 
180  const SOAP_11_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
182  const SOAP_12_ENV = "http://www.w3.org/2003/05/soap-envelope";
183 
185  const SOAP_11_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
186 
188  const SOAP_12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
189 
191  const XSD_NS = "http://www.w3.org/2001/XMLSchema";
193  const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
194 
196  const HTTP_NS = "http://schemas.xmlsoap.org/wsdl/http/";
198  const MIME_NS = "http://schemas.xmlsoap.org/wsdl/mime/";
199 
201  const ENVELOPE_11_NS = ...;
202 
203 
205  const ENVELOPE_12_NS = ...;
206 
207 
209  const SoapUseMap = ...;
210 
211 
213  const SoapStyleMap = ...;
214 
215 
217  const SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
218 
220  const any_type_map = ...;
221 
222 
223  // error codes
224  const SOAP_SERIALIZATION_ERROR = "SOAP-SERIALIZATION-ERROR";
225  const SOAP_DESERIALIZATION_ERROR = "SOAP-DESERIALIZATION-ERROR";
226  const WSDL_ERROR = "WSDL-ERROR";
227 
229  const SOAP_TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
230 
232  const SOAP_TRANSPORT = ...;
233 
234 
236  const RANGE_SHORT = (-32768, 32767);
237 
239  const RANGE_INT = (-2147483648, 2147483647);
240 
241  // private global variables
242  extern bool global_compat_empty_string_is_nothing;
243  extern bool global_compat_allow_any_header;
244 
247 
248 
251 
252 };
253 
256 
257 public:
259  const SoapMimeTypes = (MimeTypeSoapXml, MimeTypeXml, MimeTypeXmlApp);
260 
261  static string getSoapMimeType12(bool soap12);
262 
264 
266  static data getFile(string fn, bool as_string = True);
267 
269 
271  static string getHTTP(string url, *string path, *HTTPClient hc, *hash<auto> headers, bool as_string = True);
272 
274 
276  static data getFTP(string url, string path, bool as_string = True);
277 
279 
286  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);
287 
289 
296  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);
297 
300 
302 
305  static string getWSDL(string wsdl, *HTTPClient http_client, *hash<auto> http_headers, *reference new_def_path);
306 
308 
312  static WebService getWebServiceFromUrl(string url, *HTTPClient http_client, *hash<auto> http_headers);
313 
315  static hash<auto> parseMultiPartSOAPMessage(hash<auto> msg);
316 
318  static bool isSOAPMessage(hash<auto> msg);
319 
324  static *hash<auto> parseSOAPMessage(hash<auto> msg);
325 
326 protected:
327  static processHref(reference xmldata, string hr, hash<auto> parts);
328 public:
329 
330 
331 protected:
332  static substHref(reference xmldata, hash<auto> parts);
333 public:
334 
335 };
336 
337 // private, nmon-exported class
338 class WsdlLibPriv {
339 
340 public:
341  static bool isContentType(string ct, list<auto> MimeTypes);
342 
343  static checkContentType(string ct, list<auto> MimeTypes);
344 };
345 
347 class WSDL::XsdBase : public Qore::Serializable {
348 
349 public:
350  static removeNS(reference v);
351 
352  static removeNS2(reference v);
353 };
354 
356 class WSDL::XsdData : public WSDL::XsdBase {
357 
358 public:
359  auto getValue(*hash<auto> mrh, auto val);
360 
361 };
362 
365 
366 public:
367  // name of object
368  string name;
370  *string ns;
373 
374  constructor(string n_name, string n_ns);
375 
376 
377  constructor(reference e, *string desc_name);
378 
379 
380  string getName();
381 
382 
383  *string getInputNamespacePrefix();
384 
385 
386  bool hasRealName();
387 
388 };
389 
390 class WSDL::XsdAbstractType : public WSDL::XsdNamedData {
391 
392 public:
394  Namespaces nsc;
395 
397  string ons;
398 
399  constructor(reference e, Namespaces nsc, *string desc_name) ;
400 
401 
402  constructor(string name, string ns, Namespaces nsc) ;
403 
404 
405 protected:
406  resolveNamespace();
407 public:
408 
409 
410  checkExtends(XsdAbstractType t, string ename);
411 
412 
413  string getNameWithNS();
414 
415 
416  bool isNillable();
417 
418 
419  bool isRequired();
420 
421 
422  bool requiresValue();
423 
424 
425  string getOutputNamespacePrefix();
426 
427 
428  *list<auto> getAllowedValues();
429 
430 
431  abstract auto serialize(Namespaces nsc, auto val, *softbool omitType);
432  abstract auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
433  abstract AbstractDataProviderType getDataProviderType();
434 };
435 
437 class WSDL::XsdBaseType : public WSDL::XsdAbstractType {
438 
439 public:
440 
441  constructor(string t, Namespaces nsc, string ns = 'xsd') ;
442 
443 
444  auto serialize(Namespaces nsc, auto val, *softbool omitType);
445 
446 
447  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
448 
449 
450  AbstractDataProviderType getDataProviderType();
451 
452 
453  Type getDataProviderBaseType();
454 
455 };
456 
458 class WSDL::XsdArrayType : public WSDL::XsdAbstractType {
459 
460 public:
461 protected:
462  bool finalized;
463 
464 public:
465 
466  *hash<auto> typeinfo;
467  XsdAbstractType elementType;
468 
469  constructor(string t, string ns, string arrayType, Namespaces nsc, XsdLateResolverHelper unresolved) ;
470 
471 
472  AbstractDataProviderType getDataProviderType();
473 
474 
475  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
476 
477 
478  auto serialize(Namespaces nsc, auto val, *softbool omitType);
479 
480 
481  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
482 
483 };
484 
487 
488 public:
489  *hash<auto> typeinfo;
490  XsdAbstractType type;
491 
492  constructor(reference e) ;
493 
494 };
495 
498 
499 public:
500  string use = "optional";
501 
502  const AllowedUseValues = ...;
503 
504 
505  constructor(hash<auto> attr, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved) ;
506 
507 
508  auto getValue(string val);
509 
510 };
511 
514 
515 public:
516  int minOccurs = 1;
517  int maxOccurs = 1;
518  bool nillable = False;
519  // the resolved namespace URI for any reference
520  *string ref_ns;
521  // the source name for any reference
522  *string ref;
523  bool usedocns;
524 
525 constructor(hash<auto> e, Namespaces nsc, *XsdAbstractType n_type, XsdLateResolverHelper unresolved, bool n_usedocns) ;
526 
527 
528  AbstractDataProviderType getDataProviderType();
529 
530 
531  *list<auto> getAllowedValues();
532 
533 
534  assimilate(WSDL::XsdElement other);
535 
536 
537  bool isRequired();
538 
539 
540  bool isNillable();
541 
542 
543  auto serialize(Namespaces nsc, auto h, *softbool omitType, string key, string typename);
544 
545 
546 protected:
547  auto serializeAsIntern(Namespaces nsc, XsdAbstractType type, auto h, *softbool omitType, string key, string typename);
548 public:
549 
550 
551  auto deserialize(hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val, bool present);
552 
553 };
554 
555 class WSDL::UnionDataType : public AbstractDataProviderType {
556 
557 public:
558  list<AbstractDataProviderType> types;
559 
560  constructor(list<XsdAbstractType> unionTypes);
561 
562 
563  string getName();
564 
565 
566  bool isAssignableFrom(AbstractDataProviderType t);
567 
568 
569  *Type getValueType();
570 
571 
572  *AbstractDataProviderType getElementType();
573 
574 
575  *hash<string, AbstractDataField> getFields();
576 
577 
578  hash<string, bool> getAcceptTypeHash();
579 
580 
581  hash<string, bool> getReturnTypeHash();
582 
583 
584  auto acceptsValue(auto value);
585 
586 };
587 
589 class WSDL::XsdSimpleType : public WSDL::XsdAbstractType {
590 
591 public:
592  hash<auto> enum;
593  hash<auto> typeinfo;
594  list<hash<auto>> union;
595  list<XsdAbstractType> unionTypes;
596  XsdAbstractType type;
597  AbstractDataProviderType dataType;
598  bool usedocns;
599 
600  constructor(hash<auto> st, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name)
601  ;
602 
603 
604  finalizeResolved();
605 
606 
607  AbstractDataProviderType getDataProviderType();
608 
609 
610  *list<auto> getAllowedValues();
611 
612 
613  auto serialize(Namespaces nsc, auto val, *softbool omitType);
614 
615 
616  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto val);
617 
618 };
619 
621 public hashdecl WSDL::ChoiceInfo {
622  hash<string, XsdElement> elementmap;
623  bool required;
624 };
625 
627 class WSDL::XsdComplexType : public WSDL::XsdAbstractType {
628 
629 public:
630  *XsdArrayType array;
631  *string arrayType;
632  *string restriction;
633  *string extension;
634 
635  bool usedocns;
636 
637  hash<string, XsdElement> elementmap();
638  bool anyAttribute = False;
639 
640  bool nillable = False;
641  bool required = False;
642  bool requires_value = False;
643 
644  // attributes
645  hash<string, XsdAttribute> attrs();
646 
647  // any annotated documentation
648  *string documentation;
649 
650  // temporarily used to store type information to resolve simpleType
651  *hash<auto> simpleTypeInfo;
652  // simpleContent type
653  XsdAbstractType simpleType;
654 
655  // finalization flag
656  bool finalized = False;
657 
658  // multiple choice blocks
659  list<hash<ChoiceInfo>> choices();
660 
661 protected:
663  string cx_type;
664 
665  const XET_ALL = "ALL";
666  const XET_CHOICE = "CHOICE";
667  const XET_SEQUENCE = "SEQUENCE";
668  const XET_SIMPLE = "SIMPLE";
669  const XET_NONE = "NONE";
670 
671 public:
672 
673  // ct can be NOTHING in case of an empty complex type
674  constructor(*hash<auto> ct, Namespaces nsc, XsdLateResolverHelper unresolved, bool n_usedocns, *string desc_name)
675  ;
676 
677 
678  *list<auto> getAllowedValues();
679 
680 
681  finalize(hash<string, XsdAbstractType> tmap, Namespaces nsc);
682 
683 
685  checkExtends(XsdAbstractType t, string ename);
686 
687 
688 protected:
689  parseData(hash<auto> d, XsdLateResolverHelper unresolved, Namespaces nsc);
690 public:
691 
692 
693 protected:
694  parseAttributes(reference d, XsdLateResolverHelper unresolved, Namespaces nsc);
695 public:
696 
697 
698  bool isNillable();
699 
700 
701  bool isRequired();
702 
703 
704  bool requiresValue();
705 
706 
707  bool isEmpty();
708 
709 
710 protected:
711  hash<string, XsdElement> parseElements(softlist<auto> el, XsdLateResolverHelper unresolved, Namespaces nsc, bool for_object = True);
712 public:
713 
714 
715  AbstractDataProviderType getDataProviderType();
716 
717 
718 protected:
719  *hash<auto> serializeElement(Namespaces nsc, string key, XsdElement element, auto h, *softbool omitType);
720 public:
721 
722 
723  *hash<auto> serialize(Namespaces nsc, auto h, *softbool omitType);
724 
725 
726 protected:
727  hash<auto> serializeChoice(Namespaces nsc, hash<string, XsdElement> emap, hash<auto> h, *softbool omitType, bool all_members);
728 public:
729 
730 
731  auto deserialize(string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, auto oval);
732 
733 
734 protected:
735  *hash<auto> parseChoice(hash<auto> val, hash<string, XsdElement> emap, string en, hash<string, XsdAbstractType> tmap, *hash<auto> mrh, *bool required);
736 public:
737 
738 };
739 
742 
743 public:
749  *string input_name;
751  *string output_name;
752 
755 
757  *string soapAction;
758 
760  hash<string, bool> reqh;
761 
763  hash<string, OperationalBinding> bindings;
764 
765 protected:
767  hash<string, WSMessage> faults;
768 
769 public:
770 
772 
776  constructor(hash<auto> p, Namespaces nsc, *hash<auto> messages) ;
777 
778 
780  *hash<string, WSMessage> getFaultMessages();
781 
782 
784  bool hasFault(string fault);
785 
786 
788  setDocStyleBinding(reference idocmap);
789 
790 
793 
794 
797 
798 
800 
809 
810 
812 
820 
821 
823 
843 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);
844 
845 
847 
868  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);
869 
870 
872 
892  hash<auto> serializeResponse(auto h, *hash<auto> header, *string enc, *hash<auto> nsh, *bool soap12, *int xml_opts, *string bname, *hash<auto> http_headers);
893 
894 
896 
901  auto deserializeRequest(hash<auto> o, *string bname);
902 
903 
905 
910  auto deserializeResponse(hash<auto> o, *string bname);
911 
912 
917  *hash<auto> deserializeRequestPath(string path, *string bname);
918 
919 
921 protected:
922  static hash<auto> processNSValue(hash<auto> h);
923 public:
924 
925 
927 
929  bool isSoap12();
930 
931 
933 
935  string getTargetNS();
936 
937 };
938 
940 public hashdecl WSDL::ArgInfo {
942  string name;
943 
945  string part;
946 
948  XsdAbstractType type;
949 
952 };
953 
955 
962 
963 public:
965  hash<string, hash<WSDL::ArgInfo>> args;
966 
968  hash<string, string> pmap;
969 
971  hash<string, XsdAbstractType> tmap;
972 
973  // keep a weak reference to the namespace map
974  Namespaces nsc;
975 
976  constructor(hash<auto> m, hash<string, hash<string, XsdElement>> emap, hash<string, XsdAbstractType> tmap, Namespaces nsc) ;
977 
978 
980  AbstractDataProviderType getDataProviderType();
981 
982 
987  auto serializeRpcValue(string part, bool encoded, reference<hash<auto>> h, reference<string> ons);
988 
989 
991 
999  *hash<auto> serializeRpc(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference<auto> h, bool fault);
1000 
1001 
1003 
1011  *hash<auto> serializeDocument(*softlist<auto> parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference<auto> h, bool fault);
1012 
1013 
1015 
1020  *hash<auto> deserializeRpc(*hash<auto> mrh, hash<auto> val, *string part);
1021 
1022 
1023  *hash<auto> deserializeDocument(*hash<auto> mrh, auto val, *string parts);
1024 
1025 
1027 
1030  hash<auto> serializeAllPartData(*hash<auto> val);
1031 
1032 
1034 
1040  hash<auto> serializeData(Namespaces nsc, string key, *hash<auto> val);
1041 
1042 
1044 
1047  hash<auto> deserializeData(string part, hash<auto> val);
1048 
1049 
1051 
1054  hash<auto> deserializeAllPartData(hash<auto> val);
1055 
1056 
1058 
1065 private:
1066  auto getValueFromHash(string ename, reference<auto> v, bool removeFound);
1067 public:
1068 
1069 
1071 private:
1072  auto getValueFromHash(*WSDL::XsdElement element, reference<auto> v, bool removeFound);
1073 public:
1074 
1075 
1076  string getSerializedKey(string part);
1077 
1078 
1080 
1082  string checkPart(string pname);
1083 
1084 };
1085 
1086 // private helper class for lazy name resolution
1087 class WSDL::XsdLateResolverHelper {
1088 
1089 public:
1090 protected:
1091  list<object> l();
1092 
1093 public:
1094 
1095  constructor();
1096 
1097 
1098  add(object v);
1099 
1100 
1101  list<auto> getList();
1102 
1103 
1104  clearResolved();
1105 
1106 
1107  static bool isResolved(XsdTypedData t);
1108 
1109  static bool isResolved(XsdSimpleType t);
1110 
1111  static bool isResolved(XsdComplexType t);
1112 
1113  static bool isResolved(XsdArrayType t);
1114 
1115  static bool isResolved(auto t);
1116 };
1117 
1120 
1121 public:
1122  bool docstyle;
1125  *string soapAction;
1126 
1127  constructor(string name, string ns, bool docstyle, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1128 
1129 
1130  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);
1131 
1132 
1133  auto deserializeMessage(WSOperation op, hash<auto> o, bool request);
1134 
1135 
1136  auto deserializeRequestPath(WSOperation op, string path);
1137 
1138 
1139  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);
1140 
1141  abstract auto deserializeMessageImpl(WSOperation op, hash<auto> o, bool request);
1142 
1143  abstract auto deserializeRequestPathImpl(WSOperation op, string path);
1144 };
1145 
1146 class WSDL::SoapBinding : public WSDL::OperationalBinding {
1147 
1148 public:
1149  string soapTransport;
1150 
1151  constructor(string name, string ns, bool docstyle, string soapTransport, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1152 
1153 
1154  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);
1155 
1156 
1157 private:
1158  hash<auto> serializeSoapMessage(WSOperation op, *WSMessage msg, auto val, *hash<auto> header, *hash<auto> nsh, bool request, bool soap12, reference mpm, *string faultmsg);
1159 public:
1160 
1161 
1162  auto deserializeMessageImpl(WSOperation op, hash<auto> orig_msg, bool request);
1163 
1164 
1166 private:
1167  static list<auto> processMultiRef(hash<auto> body);
1168 public:
1169 
1170 
1171  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1172 
1173 };
1174 
1175 class WSDL::HttpBinding : public WSDL::OperationalBinding {
1176 
1177 public:
1178  string httpMethod;
1179  string location;
1180 
1181 constructor(string name, string ns, bool docstyle, string httpMethod, string location, *string soapAction, *WSDL::BindingMessageDescription input, *WSDL::BindingMessageDescription output) ;
1182 
1183 
1184 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);
1185 
1186 
1188 private:
1189  string serializeRequestPath(WSOperation op, auto h);
1190 public:
1191 
1192 
1193  auto deserializeMessageImpl(WSOperation op, hash<auto> v, bool request);
1194 
1195 
1196  hash<auto> deserializeRequestPathImpl(WSOperation op, string path);
1197 
1198 };
1199 
1201 
1203 class WSDL::BindingMessageBodyDescription : public Serializable {
1204 
1205 public:
1207 
1210  bool encoded;
1211 
1213  *string encodingStyle;
1214 
1216  *string ns;
1217 
1219  *list<auto> parts;
1220 
1221  constructor(bool encoded, *string encodingStyle, *string ns, *string parts);
1222 
1223 
1224  bool isMultipart();
1225 
1226 };
1227 
1229 class WSDL::BindingMessageHeaderDescription : public Serializable {
1230 
1231 public:
1233  string part;
1234 
1236 
1239  bool encoded;
1240 
1243 
1245  /*
1246  @param part message part name
1247  @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)
1248  @param msg actual message
1249  */
1250  constructor(string part, bool encoded = False, WSMessage msg);
1251 
1252 };
1253 
1255 
1257 class WSDL::BindingContentDescription : public Serializable {
1258 
1259 public:
1261  string part;
1262 
1263  // list of accepted content types (with "xxx/*")
1264  list<auto> acceptedContentTypes = ();
1265 
1266  // list of accepted specific content types
1267  list<auto> acceptedContentTypeSubtypes = ();
1268 
1270  bool formUrlEncoded = False;
1271 
1274 
1275  addContentType(string type);
1276 
1277 };
1278 
1280 
1282 class WSDL::MimeXmlMessageDescription : public Serializable {
1283 
1284 public:
1286 
1288  string part;
1289 
1290  constructor(string part);
1291 
1292 };
1293 
1295 class WSDL::BindingMessageDescription : public Serializable {
1296 
1297 public:
1300 
1302 
1304  *hash<auto> urlReplacement;
1305 
1307 
1318  bool urlEncoded = False;
1319 
1322 
1325 
1326 private:
1328  list<BindingMessageHeaderDescription> headers = cast<list<BindingMessageHeaderDescription>>(());
1329 
1330 public:
1331 
1332  addHeader(BindingMessageHeaderDescription hdr);
1333 
1334 
1336  bool hasHeaders();
1337 
1338 
1340  list<BindingMessageHeaderDescription> getHeaders();
1341 
1342 
1343  setUrlReplacement(string loc);
1344 
1345 };
1346 
1349 
1350 public:
1351 private:
1352  string port;
1353 
1355 
1358  bool docstyle = True;
1359 
1360  *string httpMethod;
1361  *string soapTransport;
1362 
1363 public:
1364 
1365  constructor(hash<auto> data, Namespaces nsc, reference portTypes, reference idocmap, *hash<auto> messages) ;
1366 
1367 
1369 private:
1370  string checkMessagePart(WSMessage msg, *string partname, string errs);
1371 public:
1372 
1373 
1374  string getPort();
1375 
1376 
1377  bool isSoapBinding();
1378 
1379 
1380  bool isHttpBinding();
1381 
1382 };
1383 
1384 // private namespace prefix redefinition class
1385 class WSDL::NamespacePrefixHelper {
1386 
1387 public:
1388 
1389 protected:
1391  Namespaces nsc;
1392 
1393  // overriden prefixes
1394  hash<auto> h;
1395 
1396  // overridden target namespace
1397  bool targ_ns;
1398 
1399  // overridden default namespace
1400  bool def_ns;
1401 
1402  // schema description
1403  string desc;
1404 
1406  int id = ++count;
1407 
1409  static int count = 0;
1410 
1411 public:
1412 
1413  constructor(Namespaces nsc, *hash<auto> nsattr);
1414 
1415 
1416  destructor();
1417 
1418 
1419  save(string k, string v);
1420 
1421 
1422  string getDesc();
1423 
1424 };
1425 
1427 class WSDL::Namespaces : public Serializable {
1428 
1429 public:
1430  // options are here since this object is passed through all serialization and deserialization
1431  bool opt_empty_string_is_nothing = False;
1432  bool opt_allow_any_header = False;
1433 
1434 protected:
1436  hash<string, string> ns = {
1437  "xsd": XSD_NS,
1438  };
1439 
1441  hash<string, string> nsr = {
1442  XSD_NS: "xsd",
1443  };
1444 
1446  hash<string, bool> xsd_schema = {
1447  "xsd": True,
1448  };
1449 
1451  hash<string, string> imap = {
1452  "xsd": XSD_NS,
1453  };
1454 
1456  hash<string, string> imapr = {
1457  XSD_NS: "xsd",
1458  };
1459 
1461  bool hassoap11 = False;
1462 
1464  bool hassoap12 = False;
1465 
1467  *string target_ns;
1468 
1470  list<auto> nss = ();
1471 
1473  *string default_ns;
1474 
1476  list<auto> dss = ();
1477 
1479  hash<string, XsdBaseType> base_types;
1480 
1482  const DefaultPrefixes = ...;
1483 
1484 
1485 public:
1486 
1488  constructor(hash<auto> nsh, *Namespaces nsc, *string targetNamespace);
1489 
1490 
1491  *string getDefaultNs();
1492 
1493 
1494  addNamespaces(hash<auto> nsh, *NamespacePrefixHelper nph);
1495 
1496 
1497  restorePrefixes(hash<auto> h);
1498 
1499 
1500 protected:
1501  addNamespaceIntern(string ns, string val, *bool override);
1502 public:
1503 
1504 
1507 
1508 
1510  string getUniquePrefix(string uri, *string default_prefix);
1511 
1512 
1514  string getOutputNamespaceUri(string nsp);
1515 
1516 
1518  *hash<auto> getOutputNamespaceHash(*hash<auto> nsh);
1519 
1520 
1523 
1524 
1526  *string getNamespaceUri(*string nsp);
1527 
1528 
1531 
1532 
1535 
1536 
1539 
1540 
1543 
1544 
1547 
1548 
1551 
1552 
1555 
1556 
1558 protected:
1559  string registerNamespaceIntern(string uri, *string default_pfx);
1560 public:
1561 
1562 
1565 
1566 
1568  bool hasSoap11();
1569 
1570 
1572  bool hasSoap12();
1573 
1574 
1576  *bool isSchema(string ns);
1577 
1578 
1580  string getInputNamespaceUri(string nsa);
1581 
1582 
1583  bool doType(string t, reference<hash> typeinfo, reference<XsdAbstractType> rtype, *hash<string, XsdAbstractType> tmap);
1584 
1585 
1586  hash<auto> getTypeHash(string t);
1587 
1588 
1589  XsdBaseType getBaseType(string t);
1590 
1591 
1593  string translateOutputNamespacePrefix(*string nsa);
1594 
1595 };
1596 
1597 // private functions
1598 XsdAbstractType tmap_get(hash<string, XsdAbstractType> tmap, string name);
1599 
1600 
1601 *XsdAbstractType tmap_try_get(hash<string, XsdAbstractType> tmap, string name);
1602 
1603 
1604 // private functions
1605 XsdElement emap_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1606 
1607 
1608 *XsdElement emap_try_get(hash<string, hash<string, XsdElement>> emap, string ns, string name);
1609 
1610 
1612 public hashdecl WSDL::PortTypeInfo {
1613  hash<string, WSOperation> operations;
1614 };
1615 
1617 public hashdecl WSDL::ServiceInfo {
1619  string name;
1621  hash<string, hash> port;
1622 };
1623 
1625 public hashdecl WSDL::OperationInfo {
1627  string port;
1628 
1631 };
1632 
1634 
1636 class WSDL::WebService : public WSDL::XsdBase,public Qore::Serializable {
1637 
1638 public:
1640  string wsdl;
1641 
1643  string wsdl_hash;
1644 
1646  *hash<auto> opts;
1647 
1649  bool has_try_import = False;
1650 
1652 
1654  string name;
1655 
1657 
1659  string hash_str;
1660 
1662  transient Namespaces nsc;
1663 
1665  transient list<string> wsdl_services();
1666 
1668  transient hash<string, XsdElement> idocmap();
1669 
1671  transient hash<string, hash<string, XsdElement>> emap();
1672 
1674  transient hash<string, WSMessage> messages();
1675 
1677  transient hash<string, XsdAbstractType> tmap();
1678 
1680  transient hash<string, hash<PortTypeInfo>> portType();
1681 
1683  transient *code try_import;
1684 
1686 
1688  transient *string def_path;
1689 
1690 protected:
1691  // service definitions; name -> service info hash
1692  hash<string, hash<WSDL::ServiceInfo>> services();
1693 
1694  // service bindings; name -> Binding
1695  hash<string, Binding> binding();
1696 
1698  transient hash<string, bool> import_map;
1699 
1700 public:
1701 
1703 
1714  constructor(string str, *hash<auto> opts);
1715 
1716 
1718 
1722  string getName();
1723 
1724 
1726 
1730  synchronized string getHash();
1731 
1733 
1736 
1737 
1739  softlist<string> getOperationNames();
1740 
1741 
1743  WSDL::WSOperation getPortTypeOperation(string ptname, string opname);
1744 
1745 
1747  WSDL::WSOperation getBindingOperation(*string bname, string opname);
1748 
1749 
1751 
1755  list<hash<OperationInfo>> listOperations();
1756 
1757 
1759 
1766 
1767 
1769 
1775  list<hash<WSDL::ServiceInfo>> listServices();
1776 
1777 
1779 
1788  hash<WSDL::ServiceInfo> getService(string name);
1789 
1790 
1792  hash<auto> getType(string name, auto v);
1793 
1794 
1795 protected:
1796  XsdBaseType getBaseType(string t);
1797 public:
1798 
1799 
1800 protected:
1801  resolveType(XsdSimpleType t);
1802 public:
1803 
1804 
1805 protected:
1806  resolveType(XsdElement xe);
1807 public:
1808 
1809 
1810 protected:
1811  resolveType(XsdAttribute xd);
1812 public:
1813 
1814 
1815 protected:
1816  resolveType(XsdComplexType ct);
1817 public:
1818 
1819 
1820 protected:
1821  resolveType(XsdArrayType t);
1822 public:
1823 
1824 
1825 protected:
1826  XsdAbstractType resolveType(hash<auto> v);
1827 public:
1828 
1829 
1830  // parse XSD schema types
1831 protected:
1832  parseTypes(*hash<auto> data, auto http_client, auto http_headers);
1833 public:
1834 
1835 
1836 protected:
1837  parseMessages(*softlist<auto> message);
1838 public:
1839 
1840 
1841 protected:
1842  parseService(*softlist<auto> svcs);
1843 public:
1844 
1845 
1846 protected:
1847  parsePortType(*softlist<auto> data);
1848 public:
1849 
1850 
1851 protected:
1852  parseBinding(*softlist<auto> bindings);
1853 public:
1854 
1855 
1857 
1859  bool isSoap12();
1860 
1861 
1863 
1865  string getWSDL();
1866 
1867 
1869 
1871  string getWSDLHash();
1872 
1873 
1875 
1880  string getWSDL(string base_url);
1881 
1882 
1883 protected:
1884  string getOperationParams(WSMessage msg);
1885 public:
1886 
1887 
1889 
1894  getReport(StringOutputStream stream, *string wsdl_name);
1895 
1896 
1898 
1902  string getReport(*string wsdl_name);
1903 
1904 
1906 
1908 private:
1909  doInit(string str, *hash<auto> opts);
1910 public:
1911 
1912 
1914 
1916 private:
1917  deserializeMembers(hash<auto> members);
1918 public:
1919 
1920 };
1921 
1923 
1926 
1927 public:
1928 protected:
1929  WebService ws;
1930  hash<auto> opts;
1931 
1932 public:
1933 
1934  const DefaultOpts = ...;
1935 
1936 
1938 
1944  constructor(WebService ws, *hash<auto> opts);
1945 
1946 
1947 protected:
1948  hash<auto> getTypeInfo(XsdBaseType t);
1949 public:
1950 
1951 
1952 protected:
1953  hash<auto> getTypeInfo(XsdSimpleType t);
1954 public:
1955 
1956 
1957 protected:
1958  hash<auto> getTypeInfo(XsdComplexType t);
1959 public:
1960 
1961 
1962  hash<auto> getMessage(XsdElement elem, *softlist<auto> comments);
1963 
1964 
1966 
1970  hash<auto> getMessage(string name);
1971 
1972 
1974 
1979 
1980 };
describes MIME content information for SOAP operational binding message descriptions
Definition: WSDL.qm.dox.h:1257
string part
specifies the name of the message part
Definition: WSDL.qm.dox.h:1261
bool acceptAllContentTypes
are all content-types accepted?
Definition: WSDL.qm.dox.h:1273
bool formUrlEncoded
are all content-types form URL encoded?
Definition: WSDL.qm.dox.h:1270
class for WSDL bindings
Definition: WSDL.qm.dox.h:1348
bool docstyle
use RPC or document style
Definition: WSDL.qm.dox.h:1358
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:1203
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1210
*string ns
namespace; "only applies to content not explicitly defined by the abstract types"
Definition: WSDL.qm.dox.h:1216
*string encodingStyle
when encoded True, this is used to produce a concrete message by applying the specified encoding
Definition: WSDL.qm.dox.h:1213
*list< auto > parts
indicates which parts appear somewhere within the SOAP Body portion of the message
Definition: WSDL.qm.dox.h:1219
describes an input or output message in a SOAP operational binding
Definition: WSDL.qm.dox.h:1295
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:1318
*WSDL::MimeXmlMessageDescription mimeXml
optional mimeXml message scription
Definition: WSDL.qm.dox.h:1324
list< BindingMessageHeaderDescription > getHeaders()
returns a list of WSDL::BindingMessageHeaderDescription objects
*WSDL::BindingContentDescription content
optional content-type descriptions
Definition: WSDL.qm.dox.h:1321
list< BindingMessageHeaderDescription > headers
a list of WSDL::BindingMessageHeaderDescription objects
Definition: WSDL.qm.dox.h:1328
*hash< auto > urlReplacement
a hash of URL replacement values keyed by part name, values are URI paths
Definition: WSDL.qm.dox.h:1304
*WSDL::BindingMessageBodyDescription body
the description of the message body
Definition: WSDL.qm.dox.h:1299
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:1229
bool encoded
required attribute
Definition: WSDL.qm.dox.h:1239
string part
message part name
Definition: WSDL.qm.dox.h:1233
WSMessage msg
a weak reference to the actual message
Definition: WSDL.qm.dox.h:1242
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:1282
string part
refers to a message part defining the concrete schema of the root XML element
Definition: WSDL.qm.dox.h:1288
namespace container class
Definition: WSDL.qm.dox.h:1427
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:1456
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:1446
hash< string, string > nsr
maps namespace URIs to output namespace prefixes
Definition: WSDL.qm.dox.h:1441
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:1476
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:1482
*string target_ns
current target namespace
Definition: WSDL.qm.dox.h:1467
hash< string, string > ns
maps output namespace prefixes to namespace URIs
Definition: WSDL.qm.dox.h:1436
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:1461
list< auto > nss
target namespace stack;
Definition: WSDL.qm.dox.h:1470
string registerNamespaceIntern(string uri, *string default_pfx)
registers a namespace internally
*string default_ns
default namespace for unprefixed definitions
Definition: WSDL.qm.dox.h:1473
hash< string, string > imap
hash mapping input namespace prefixes to namespaces URIs
Definition: WSDL.qm.dox.h:1451
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:1479
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:1464
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:1119
contains helper methods for retrieving WSDLs from a URL
Definition: WSDL.qm.dox.h:255
static *hash< auto > parseSOAPMessage(hash< auto > msg)
const SoapMimeTypes
Mime types recognized as SOAP messages.
Definition: WSDL.qm.dox.h:259
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:1925
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:961
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:971
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:965
hash< string, string > pmap
maps part names to args key, all parts are in hash
Definition: WSDL.qm.dox.h:968
hash< auto > deserializeData(string part, hash< auto > val)
deserialize value in string or binary form
web service operation class
Definition: WSDL.qm.dox.h:741
*WSMessage output
response message
Definition: WSDL.qm.dox.h:747
*string soapAction
the SOAPAction header value to send with this operation
Definition: WSDL.qm.dox.h:757
hash< string, bool > reqh
a hash of top-level request names for this operation (depends on bindings)
Definition: WSDL.qm.dox.h:760
*string input_name
request message name
Definition: WSDL.qm.dox.h:749
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:754
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:763
*WSMessage input
request message
Definition: WSDL.qm.dox.h:745
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:751
*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:767
main class representing a parsed WSDL file
Definition: WSDL.qm.dox.h:1636
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:1654
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:1698
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:1662
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:1683
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:1646
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:1659
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:1640
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:1688
bool has_try_import
flag if the object has a "try_import" closure or call reference
Definition: WSDL.qm.dox.h:1649
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:1643
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:458
XSD attribute class.
Definition: WSDL.qm.dox.h:497
base class with helper methods for XSD data processing
Definition: WSDL.qm.dox.h:347
class for XSD base types
Definition: WSDL.qm.dox.h:437
XSD complex type class.
Definition: WSDL.qm.dox.h:627
string cx_type
type of complexType object
Definition: WSDL.qm.dox.h:663
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:356
XSD element class.
Definition: WSDL.qm.dox.h:513
base class for XSD classes with a "name" attribute
Definition: WSDL.qm.dox.h:364
descriptive_name
descriptive name flag
Definition: WSDL.qm.dox.h:372
*string ns
input namespace prefix (if any given)
Definition: WSDL.qm.dox.h:370
XSD simple type class.
Definition: WSDL.qm.dox.h:589
XSD typed data class.
Definition: WSDL.qm.dox.h:486
main WSDL namespace
Definition: WSDL.qm.dox.h:175
const any_type_map
mapping from Qore types to xsd types for xsd type "anyType"
Definition: WSDL.qm.dox.h:220
const SOAP_11_ENV
SOAP 1.1 envelope URI.
Definition: WSDL.qm.dox.h:180
const SoapStyleMap
SOAP "style" to "document" mappings.
Definition: WSDL.qm.dox.h:213
const SoapUseMap
SOAP "use" to "encoded" mappings.
Definition: WSDL.qm.dox.h:209
const SOAP_TRANSPORT
known/supported transports
Definition: WSDL.qm.dox.h:232
const HTTP_NS
HTTP namespace URI.
Definition: WSDL.qm.dox.h:196
const version
this WSDL implementation version
Definition: WSDL.qm.dox.h:177
const ENVELOPE_12_NS
soap 1.2 envelope namespaces
Definition: WSDL.qm.dox.h:205
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:193
const XSD_NS
XSD namespace URI.
Definition: WSDL.qm.dox.h:191
const SOAP_12_NS
SOAP 1.2 namespace URI.
Definition: WSDL.qm.dox.h:188
const SOAP_TRANSPORT_HTTP
SOAP HTTP transport URI.
Definition: WSDL.qm.dox.h:229
const SOAP_11_NS
SOAP 1.1 namespace URI.
Definition: WSDL.qm.dox.h:185
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:239
const SOAP_12_ENV
SOAP 1.2 envelope URI.
Definition: WSDL.qm.dox.h:182
const MIME_NS
MIME namespace URI.
Definition: WSDL.qm.dox.h:198
const SOAP_ENCODING
soap encoding URI
Definition: WSDL.qm.dox.h:217
const ENVELOPE_11_NS
soap 1.1 envelope namespaces
Definition: WSDL.qm.dox.h:201
const RANGE_SHORT
range of "short" values (16 bits)
Definition: WSDL.qm.dox.h:236
message argument hash description
Definition: WSDL.qm.dox.h:940
XsdAbstractType type
type for the argument
Definition: WSDL.qm.dox.h:948
string part
unique part name
Definition: WSDL.qm.dox.h:945
XsdElement element
element for the argument
Definition: WSDL.qm.dox.h:951
string name
the arg name
Definition: WSDL.qm.dox.h:942
complex type choice hash
Definition: WSDL.qm.dox.h:621
WSDL operation info.
Definition: WSDL.qm.dox.h:1625
string port
the name of the port defining the operation
Definition: WSDL.qm.dox.h:1627
WSDL::WSOperation operation
the operation object
Definition: WSDL.qm.dox.h:1630
WSDL port type hash.
Definition: WSDL.qm.dox.h:1612
WSDL service info hash.
Definition: WSDL.qm.dox.h:1617
hash< string, hash > port
port info
Definition: WSDL.qm.dox.h:1621
string name
service name
Definition: WSDL.qm.dox.h:1619