XE2调用web service问题

zl811103 2013-11-02 05:01:30
web服务提供一个功能,返回值为DataTable .而BCB没有这个数据类型。请问遇到这样的问题如何解决?
...全文
317 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zl811103 2013-12-16
  • 打赏
  • 举报
回复
没有办法我只能用C#来做了
zl811103 2013-11-05
  • 打赏
  • 举报
回复
以前没接触过web service 对TRemotable类不是很清楚,里面提供的方法和属性也不明白,不知道有没这方面的专家给提点一下?给说说TRemotable这个类到底有啥作用
zl811103 2013-11-05
  • 打赏
  • 举报
回复
请大侠们关注一下
zdrone 2013-11-04
  • 打赏
  • 举报
回复
名字不一定是一样的,但是数据结构估计是一样的吧?
zl811103 2013-11-04
  • 打赏
  • 举报
回复
我导入了,可是生成类型为TRemotable类型

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://192.168.0.210:6666/Service1.asmx?WSDL
//  >Import : http://192.168.0.210:6666/Service1.asmx?WSDL>0
// Encoding : utf-8
// Version  : 1.0
// (2013-11-2 6:51:15 - - $Rev: 45757 $)
// ************************************************************************ //

#ifndef   Service1H
#define   Service1H

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

#if !defined(SOAP_REMOTABLE_CLASS)
#define SOAP_REMOTABLE_CLASS __declspec(delphiclass)
#endif
#if !defined(IS_OPTN)
#define IS_OPTN 0x0001
#endif
#if !defined(IS_REF)
#define IS_REF 0x0080
#endif


namespace NS_Service1 {

// ************************************************************************ //
// 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 Embarcadero types; however, they could also 
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:boolean         - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]

class SOAP_REMOTABLE_CLASS getDataTableBySqlResult;
class SOAP_REMOTABLE_CLASS GetDEGRDataByErpNoResult;
class SOAP_REMOTABLE_CLASS GetPARADataByErpNoResult;



// ************************************************************************ //
// XML       : getDataTableBySqlResult, <complexType>
// Namespace : http://tempuri.org/
// ************************************************************************ //
class getDataTableBySqlResult : public TRemotable {
private:
__published:
};




// ************************************************************************ //
// XML       : GetDEGRDataByErpNoResult, <complexType>
// Namespace : http://tempuri.org/
// ************************************************************************ //
class GetDEGRDataByErpNoResult : public TRemotable {
private:
__published:
};




// ************************************************************************ //
// XML       : GetPARADataByErpNoResult, <complexType>
// Namespace : http://tempuri.org/
// ************************************************************************ //
class GetPARADataByErpNoResult : public TRemotable {
private:
__published:
};



// ************************************************************************ //
// Namespace : http://tempuri.org/
// soapAction: http://tempuri.org/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// style     : document
// use       : literal
// binding   : Service1Soap12
// service   : Service1
// port      : Service1Soap12
// URL       : http://192.168.0.210:6666/Service1.asmx
// ************************************************************************ //
__interface INTERFACE_UUID("{25EA1FCE-3268-3CB3-32BB-6AA048AD8BB1}") Service1Soap : public IInvokable
{
public:
  virtual void            InitDatabase() = 0; 
  virtual GetPARADataByErpNoResult* GetPARADataByErpNo(const UnicodeString strErpNo) = 0; 
  virtual GetDEGRDataByErpNoResult* GetDEGRDataByErpNo(const UnicodeString strErpNo) = 0; 
  virtual bool            ExeSql(const UnicodeString strSql) = 0; 
  virtual bool            SetAssessorByErpNo(const UnicodeString strErpNo, const UnicodeString strAssessor, const int status) = 0; 
  virtual bool            SetAssessorByErpNo2(const UnicodeString strErpNo, const UnicodeString strAssessor, const UnicodeString strDJFC, const int status) = 0; 
  virtual bool            SetAssessorByErpNo3(const UnicodeString strErpNo, const UnicodeString strAssessor, const UnicodeString strDJFC, const UnicodeString strJJMC, const int status) = 0; 
  virtual int             getIntBySql(const UnicodeString strSql) = 0; 
  virtual UnicodeString   getStringBySql(const UnicodeString strSql) = 0; 
  virtual getDataTableBySqlResult* getDataTableBySql(const UnicodeString strSql) = 0; 
};
typedef DelphiInterface<Service1Soap> _di_Service1Soap;

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


};     // NS_Service1

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



#endif // Service1H

ccrun.com 2013-11-02
  • 打赏
  • 举报
回复
导入WSDL,向导会自动生成对应的数据类型声明。

1,316

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 网络及通讯开发
社区管理员
  • 网络及通讯开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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