thorsoapcall.hpp 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 THORHELPER_EXPORTS
  16. #define THORHELPER_API DECL_EXPORT
  17. #else
  18. #define THORHELPER_API DECL_IMPORT
  19. #endif
  20. #include "jlog.hpp"
  21. #include "eclhelper.hpp"
  22. //Web Service Call Row Provider
  23. interface IWSCRowProvider : extends IInterface
  24. {
  25. virtual IHThorWebServiceCallActionArg * queryActionHelper() = 0;
  26. virtual IHThorWebServiceCallArg * queryCallHelper() = 0;
  27. virtual const void * getNextRow() = 0;
  28. virtual void releaseRow(const void * row) = 0;
  29. };
  30. typedef IWSCRowProvider ISoapCallRowProvider;//DEPRECATED
  31. //Web Service Call Helper
  32. interface IWSCHelper : extends IInterface
  33. {
  34. virtual void start() = 0;
  35. virtual void abort() = 0;
  36. virtual void waitUntilDone() = 0;
  37. virtual IException * getError() = 0;
  38. virtual const void * getRow() = 0;
  39. virtual IXmlToRowTransformer * getRowTransformer() = 0;
  40. virtual size32_t transformRow(ARowBuilder & rowBuilder, IColumnProvider * row) = 0;
  41. virtual void putRow(const void * row) = 0;
  42. };
  43. typedef IWSCHelper ISoapCallHelper ;//DEPRECATED
  44. enum WSCMode { SCrow, SCdataset }; //Web Service Call Mode
  45. typedef WSCMode SoapCallMode;//DEPRECATED
  46. class ClientCertificate : public CInterface, implements IInterface
  47. {
  48. public:
  49. IMPLEMENT_IINTERFACE;
  50. StringAttr certificate;
  51. StringAttr privateKey;
  52. StringAttr passphrase;
  53. };
  54. interface IRoxieAbortMonitor
  55. {
  56. virtual void checkForAbort() = 0;//needed for Roxie abort polling mechanism
  57. };
  58. extern THORHELPER_API unsigned soapTraceLevel;
  59. extern THORHELPER_API IWSCHelper * createSoapCallHelper(IWSCRowProvider *, IEngineRowAllocator * outputAllocator, const char *authToken, SoapCallMode scMode, ClientCertificate *clientCert, const IContextLogger &logctx, IRoxieAbortMonitor * roxieAbortMonitor);
  60. extern THORHELPER_API IWSCHelper * createHttpCallHelper(IWSCRowProvider *, IEngineRowAllocator * outputAllocator, const char *authToken, SoapCallMode scMode, ClientCertificate *clientCert, const IContextLogger &logctx, IRoxieAbortMonitor * roxieAbortMonitor);
  61. #endif /* __THORSOAPCALL_HPP_ */