thorsoapcall.hpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef __THORSOAPCALL_HPP_
  14. #define __THORSOAPCALL_HPP_
  15. #ifdef _WIN32
  16. #ifdef THORHELPER_EXPORTS
  17. #define THORHELPER_API __declspec(dllexport)
  18. #else
  19. #define THORHELPER_API __declspec(dllimport)
  20. #endif
  21. #else
  22. #define THORHELPER_API
  23. #endif
  24. #include "jlog.hpp"
  25. #include "eclhelper.hpp"
  26. //Web Service Call Row Provider
  27. interface IWSCRowProvider : extends IInterface
  28. {
  29. virtual IHThorWebServiceCallActionArg * queryActionHelper() = 0;
  30. virtual IHThorWebServiceCallArg * queryCallHelper() = 0;
  31. virtual const void * getNextRow() = 0;
  32. virtual void releaseRow(const void * row) = 0;
  33. };
  34. typedef IWSCRowProvider ISoapCallRowProvider;//DEPRECATED
  35. //Web Service Call Helper
  36. interface IWSCHelper : extends IInterface
  37. {
  38. virtual void start() = 0;
  39. virtual void abort() = 0;
  40. virtual void waitUntilDone() = 0;
  41. virtual IException * getError() = 0;
  42. virtual const void * getRow() = 0;
  43. virtual IXmlToRowTransformer * getRowTransformer() = 0;
  44. virtual size32_t transformRow(ARowBuilder & rowBuilder, IColumnProvider * row) = 0;
  45. virtual void putRow(const void * row) = 0;
  46. };
  47. typedef IWSCHelper ISoapCallHelper ;//DEPRECATED
  48. enum WSCMode { SCrow, SCdataset }; //Web Service Call Mode
  49. typedef WSCMode SoapCallMode;//DEPRECATED
  50. class ClientCertificate : public CInterface, implements IInterface
  51. {
  52. public:
  53. IMPLEMENT_IINTERFACE;
  54. StringAttr certificate;
  55. StringAttr privateKey;
  56. StringAttr passphrase;
  57. };
  58. interface IRoxieAbortMonitor
  59. {
  60. virtual void checkForAbort() = 0;//needed for Roxie abort polling mechanism
  61. };
  62. extern THORHELPER_API unsigned soapTraceLevel;
  63. extern THORHELPER_API IWSCHelper * createSoapCallHelper(IWSCRowProvider *, IEngineRowAllocator * outputAllocator, const char *authToken, SoapCallMode scMode, ClientCertificate *clientCert, const IContextLogger &logctx, IRoxieAbortMonitor * roxieAbortMonitor);
  64. extern THORHELPER_API IWSCHelper * createHttpCallHelper(IWSCRowProvider *, IEngineRowAllocator * outputAllocator, const char *authToken, SoapCallMode scMode, ClientCertificate *clientCert, const IContextLogger &logctx, IRoxieAbortMonitor * roxieAbortMonitor);
  65. #endif /* __THORSOAPCALL_HPP_ */