怎样让BCB5调用WebService?
以前BCB5做的一个程序,有一大堆控件,没办法移植到BCB6下面。
但是现在要增加一个访问WebService的功能.
所以我想把BCB6调试通过的webservice访问代码导出成为一个dll给BCB5调用,
但是这种“接口”既不是类,又不是函数,怎么声明才能导出呢?
头文件如下,请各位指点,谢谢!
webservice提供的是一个类ServiceSystem,类公开了6个方法
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://localhost:8080/backend/services/ServiceSystem?wsdl
// Encoding : UTF-8
// Version : 1.0
// (2005-7-15 16:20:53 - $Revision: 1.0.1.0.1.82 $)
// ************************************************************************ //
#ifndef ServiceSystemH
#define ServiceSystemH
#include <System.hpp>
#include <InvokeRegistry.hpp>
#include <XSBuiltIns.hpp>
#include <SoapHTTPClient.hpp>
namespace NS_ServiceSystem {
// ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Borland types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:string - "http://schemas.xmlsoap.org/soap/encoding/"
// !:long - "http://www.w3.org/2001/XMLSchema"
// ************************************************************************ //
// Namespace : http://Business
// transport : http://schemas.xmlsoap.org/soap/http
// style : rpc
// binding : ServiceSystemSoapBinding
// service : ServiceSystemService
// port : ServiceSystem
// URL : http://localhost:8080/backend/services/ServiceSystem
// ************************************************************************ //
__interface INTERFACE_UUID("{18ECD1A3-AA58-BB5B-88FF-C0236580C953}") ServiceSystem : public IInvokable
{
public:
virtual AnsiString query(const AnsiString msg) = 0;
virtual void setMsgMediaObject(const AnsiString msgMediaObject) = 0;
virtual __int64 getTimeCost() = 0;
virtual AnsiString calcHMS(const __int64 timeInMillSeconds) = 0;
virtual AnsiString getMsgMedia() = 0;
virtual void setMsgMedia(const AnsiString msgMedia) = 0;
};
typedef DelphiInterface<ServiceSystem> _di_ServiceSystem;
_di_ServiceSystem GetServiceSystem(bool useWSDL=false, AnsiString addr="");
#endif // __ServiceSystem_h__
}; // NS_ServiceSystem
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace NS_ServiceSystem;
#endif