OSWSUtil.h
Go to the documentation of this file.
1 /* $Id: OSWSUtil.h 5284 2017-12-08 13:52:50Z stefan $ */
17 #ifndef WSUTIL_H
18 #define WSUTIL_H
19 
20 #include <iostream>
21 
22 
23 
24 
25 #define RCVBUFSIZE 1024 /* Size of receive buffer */
26 
27 
42 class WSUtil
43 {
44 
45 public:
46 
52  WSUtil();
53 
58  ~WSUtil();
59 
70  static std::string sendSOAPMessage(std::string theSOAP, std::string serviceIP, unsigned int servicePortNumber);
71 
72 
83  static std::string SOAPify( std::string theXmlString, bool useCDATA);
84 
95  static std::string deSOAPify( std::string theXmlString, bool useCDATA);
96 
113  static std::string createSOAPMessage(int numInputs, std::string solverAddress,
114  std::string postURI, std::string smethod, std::string* msInputs,
115  std::string* msInputNames, std::string sSoapAction);
116 
133  static std::string createFormDataUpload(std::string solverAddress, std::string postURI,
134  std::string fileName, std::string theFile, std::string boundaryName);
135 
144  static std::string getOSxL(std::string soapstring, std::string serviceMethod);
145 }; //class WSUtil
146 #endif
147 
static std::string createSOAPMessage(int numInputs, std::string solverAddress, std::string postURI, std::string smethod, std::string *msInputs, std::string *msInputNames, std::string sSoapAction)
create the SOAP message that is send to the solver Web Service
Definition: OSWSUtil.cpp:155
static std::string getOSxL(std::string soapstring, std::string serviceMethod)
extract the appropriate OSxL protocol from the SOAP envelop
Definition: OSWSUtil.cpp:374
Used by OSSolverAgent client for help in invoking a remote solver..
Definition: OSWSUtil.h:42
WSUtil()
Default constructor.
Definition: OSWSUtil.cpp:55
static std::string createFormDataUpload(std::string solverAddress, std::string postURI, std::string fileName, std::string theFile, std::string boundaryName)
create the SOAP message that is sent to the solver Web Service
Definition: OSWSUtil.cpp:200
static std::string deSOAPify(std::string theXmlString, bool useCDATA)
take the XML from a SOAP envelop and replace &lt; with &lt; replace &gt; with &gt; replace &amp;quot with "; ...
Definition: OSWSUtil.cpp:292
~WSUtil()
Class destructor.
Definition: OSWSUtil.cpp:59
static std::string SOAPify(std::string theXmlString, bool useCDATA)
prepare XML to be put into a SOAP envelop, replace &lt; with &lt; replace &gt; with &gt; replace " and &#39; with ...
Definition: OSWSUtil.cpp:247
static std::string sendSOAPMessage(std::string theSOAP, std::string serviceIP, unsigned int servicePortNumber)
open a socket and send a SOAP message to the solver Web Service
Definition: OSWSUtil.cpp:65