Qore SoapClient Module Reference  0.2.3
 All Classes Namespaces Functions Variables Pages
SoapClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* SoapClient.qm Copyright 2012 David Nichols
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // make sure we have the required qore version
26 
27 // requires XML functionality
28 
29 // requires the WSDL module
30 
31 // need mime definitions
32 
33 
34 /* Version History
35  * 2012-05-31 v0.2.3: David Nichols <david@qore.org>: updated to a user module
36 */
37 
75 namespace SoapClient {
78 class SoapClient : public HTTPClient {
79 
80 public:
82  const Version = "0.2.3";
83 
85  const Headers = ("Accept": (MimeTypeSoapXml + "," + MimeTypeXml + "," + MimeTypeXmlApp), "User-Agent": ("Qore Soap Client " + SoapClient::Version));
86 
88  const HTTPOptions = ( "connect_timeout", "http_version", "max_redirects", "proxy", "timeout" );
89 
91  private :
92  WebService wsdl; // web service definition
93  string portType; // service name
94 
95 public:
97 
98  public :
100  string url;
102  hash headers = Headers;
103 
104 public:
105 
107 
116  constructor(hash h);
117 
118 
120 
129  hash getMsg(string operation, any h, any header, reference op);
130 
131 
133 
139  any call(string operation, any h, *hash header);
140 
141 
143 
149  any call(string operation, any h, reference info);
150 
151 
153 
160  any call(reference info, string operation, any h, any header);
161 
162 
164 
169  any methodGate(string op, any arg);
170 
171  };
172 };
any methodGate(string op, any arg)
uses SoapClient::call() to transparently serialize the argument and make a call to the given operatio...
any call(string operation, any h, *hash header)
makes a server call with the given operation and arguments and returns the deserialized result ...
hash headers
HTTP headers to use.
Definition: SoapClient.qm.dox.h:102
hash getMsg(string operation, any h, any header, reference op)
returns a hash representing the serialized SOAP request for a given WSOperation
const HTTPOptions
option keys passed to the HTTPClient constructor
Definition: SoapClient.qm.dox.h:88
const Headers
default HTTP headers
Definition: SoapClient.qm.dox.h:85
const Version
version of the implementation of this class
Definition: SoapClient.qm.dox.h:82
SOAP client class implementation, publically inherits qore&#39;s HTTPClient class.
Definition: SoapClient.qm.dox.h:78
constructor(hash h)
creates the object based on a WSDL which is parsed to a WSDL::WebService object which provides the ba...
string url
target URL
Definition: SoapClient.qm.dox.h:100