求肋万能的CCRUN,导入WSDL接后后报很多错误,请问该如何处理?

PPL1998 2013-08-29 09:58:13
您好,这是通过webservice 引用wsdl后自动生成的代码,编译时会报很多错误,不知道怎么解决?求万能的CCRUN帮帮小虾米吧,甲方催我赶快弄完.我的IDE是BCB6

__interface INTERFACE_UUID("{CEE48BCE-67F1-EE29-5D83-A807DD1B1509}") CommService : public IInvokable
{
public:
virtual GetCurrentDispatchInfoResponse GetCurrentDispatchInfo(const GetCurrentDispatchInfo parameters) = 0;
virtual SetShipperWeightsResponse SetShipperWeights(const SetShipperWeights parameters) = 0;
virtual SetConsigneeWeightsResponse SetConsigneeWeights(const SetConsigneeWeights parameters) = 0;
virtual SetBusinessDataResponse SetBusinessData(const SetBusinessData parameters) = 0;
virtual GetLastDispatchInfoResponse GetLastDispatchInfo(const GetLastDispatchInfo parameters) = 0;
virtual GetDispatchStatusResponse GetDispatchStatus(const GetDispatchStatus parameters) = 0;
virtual EnterShipAreaResponse EnterShipArea(const EnterShipArea parameters) = 0;
virtual ExitShipAreaResponse ExitShipArea(const ExitShipArea parameters) = 0;
virtual EnterConsigneeAreaResponse EnterConsigneeArea(const EnterConsigneeArea parameters) = 0;
virtual ExitConsigneeAreaResponse ExitConsigneeArea(const ExitConsigneeArea parameters) = 0;
virtual GetAccessHistoryResponse GetAccessHistory(const GetAccessHistory parameters) = 0;
};
typedef DelphiInterface<CommService> _di_CommService;

下面是报错:
[C++ Error] CommService.h(34): E2462 'virtual' can only be used with non-template member functions
[C++ Error] CommService.h(34): E2303 Type name expected
[C++ Error] CommService.h(34): E2139 Declaration missing ;

一共有26个错,基本上都是类似这三个错误.

这个是WSDL的地址:http://cstkwjk.xicp.net:8100/CommService?wsdl

...全文
289 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
PPL1998 2013-08-31
  • 打赏
  • 举报
回复
谢谢1楼,XE4下确实可用,测试通过.可是我的项目是BCB6,不想升级,BCB6下该WebServices接口能用吗?
hyz_cs 2013-08-31
  • 打赏
  • 举报
回复
用XE4生成个DLL
缘中人 2013-08-29
  • 打赏
  • 举报
回复
XE4下导入,直接没有任何错。C6一大堆错误



#ifndef   CommServiceH
#define   CommServiceH

#include <System.hpp>
#include <InvokeRegistry.hpp>
#include <XSBuiltIns.hpp>
#include <SOAPHTTPClient.hpp>

namespace NS_CommService {

class SOAP_REMOTABLE_CLASS BusinessData2;
class SOAP_REMOTABLE_CLASS BusinessData;
class SOAP_REMOTABLE_CLASS AccessHisotry2;
class SOAP_REMOTABLE_CLASS AccessHisotry;

typedef DynamicArray<AccessHisotry2*> ArrayOfAccessHisotry; /* "http://schemas.datacontract.org/2004/07/AntennaCommService"[GblCplx] */

...
__interface INTERFACE_UUID("{CEE48BCE-67F1-EE29-5D83-A807DD1B1509}") CommService : public IInvokable
{
public:
  virtual BusinessData2*  GetCurrentDispatchInfo(const UnicodeString plateNo) = 0;
  virtual int             SetShipperWeights(const UnicodeString plateNo, const double tare, const double grossWeight) = 0; 
  virtual int             SetConsigneeWeights(const UnicodeString plateNo, const double tare, const double grossWeight) = 0; 
  virtual int             SetBusinessData(const UnicodeString plateNo, const BusinessData2* businessData) = 0; 
  virtual BusinessData2*  GetLastDispatchInfo(const UnicodeString plateNo) = 0; 
  virtual unsigned char   GetDispatchStatus(const UnicodeString plateNo) = 0; 
  virtual int             EnterShipArea(const UnicodeString plateNo) = 0; 
  virtual int             ExitShipArea(const UnicodeString plateNo) = 0;
  virtual int             EnterConsigneeArea(const UnicodeString plateNo) = 0; 
  virtual int             ExitConsigneeArea(const UnicodeString plateNo) = 0; 
  virtual ArrayOfAccessHisotry GetAccessHistory(const UnicodeString startTime, const UnicodeString endTime) = 0; 
};
typedef DelphiInterface<CommService> _di_CommService;

_di_CommService GetCommService(bool useWSDL=false, System::String addr= System::String(), Soaphttpclient::THTTPRIO* HTTPRIO=0);


};     // NS_CommService

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace NS_CommService;
#endif



#endif // CommServiceH

703

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder ActiveX/COM/DCOM
社区管理员
  • ActiveX/COM/DCOM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧