// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://webservice.jaron.cn/default.asmx?wsdl
// Encoding : utf-8
// Version : 1.0
// (2007-12-29 19:37:56 - 1.33.2.5)
// ************************************************************************ //unit default2;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;type // ************************************************************************ //
// 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://www.w3.org/2001/XMLSchema"
// !:dateTime - "http://www.w3.org/2001/XMLSchema" HistoryEventResult = class; { "http://webservice.jaron.cn/" } ArrayOfString = array of WideString; { "http://webservice.jaron.cn/" }
// ************************************************************************ //
// Namespace : http://webservice.jaron.cn/
// ************************************************************************ //
HistoryEventResult = class(TRemotable)
private
Fschema: WideString;
published
property schema: WideString read Fschema write Fschema;
end;
// ************************************************************************ //
// Namespace : http://webservice.jaron.cn/
// soapAction: http://webservice.jaron.cn/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// binding : JaronSoftWebServiceSoap
// service : JaronSoftWebService
// port : JaronSoftWebServiceSoap
// URL : http://webservice.jaron.cn/default.asmx
// ************************************************************************ //
JaronSoftWebServiceSoap = interface(IInvokable)
['{F418F789-8B98-8E13-5293-032853462BB9}']
function IP2Area(const IPAddress: WideString; const LicenceKey: WideString): ArrayOfString; stdcall;
function IdentityCard(const IdentityCardID: WideString; const LicenceKey: WideString): WideString; stdcall;
function HistoryEvent(const SetDateTime: TXSDateTime; const LicenceKey: WideString): HistoryEventResult; stdcall;
function MobileNumberConvert(const MobileNumber: WideString; const LicenceKey: WideString): ArrayOfString; stdcall;
end;function GetJaronSoftWebServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): JaronSoftWebServiceSoap;
implementationfunction GetJaronSoftWebServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): JaronSoftWebServiceSoap;
const
defWSDL = 'http://webservice.jaron.cn/default.asmx?wsdl';
defURL = 'http://webservice.jaron.cn/default.asmx';
defSvc = 'JaronSoftWebService';
defPrt = 'JaronSoftWebServiceSoap';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as JaronSoftWebServiceSoap);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(JaronSoftWebServiceSoap), 'http://webservice.jaron.cn/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(JaronSoftWebServiceSoap), 'http://webservice.jaron.cn/%operationName%');
RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfString), 'http://webservice.jaron.cn/', 'ArrayOfString');
RemClassRegistry.RegisterXSClass(HistoryEventResult, 'http://webservice.jaron.cn/', 'HistoryEventResult');end.
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://webservice.jaron.cn/default.asmx?wsdl
// Encoding : utf-8
// Version : 1.0
// (2007-12-29 19:37:56 - 1.33.2.5)
// ************************************************************************ //unit default2;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;type // ************************************************************************ //
// 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://www.w3.org/2001/XMLSchema"
// !:dateTime - "http://www.w3.org/2001/XMLSchema" HistoryEventResult = class; { "http://webservice.jaron.cn/" } ArrayOfString = array of WideString; { "http://webservice.jaron.cn/" }
// ************************************************************************ //
// Namespace : http://webservice.jaron.cn/
// ************************************************************************ //
HistoryEventResult = class(TRemotable)
private
Fschema: WideString;
published
property schema: WideString read Fschema write Fschema;
end;
// ************************************************************************ //
// Namespace : http://webservice.jaron.cn/
// soapAction: http://webservice.jaron.cn/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// binding : JaronSoftWebServiceSoap
// service : JaronSoftWebService
// port : JaronSoftWebServiceSoap
// URL : http://webservice.jaron.cn/default.asmx
// ************************************************************************ //
JaronSoftWebServiceSoap = interface(IInvokable)
['{F418F789-8B98-8E13-5293-032853462BB9}']
function IP2Area(const IPAddress: WideString; const LicenceKey: WideString): ArrayOfString; stdcall;
function IdentityCard(const IdentityCardID: WideString; const LicenceKey: WideString): WideString; stdcall;
function HistoryEvent(const SetDateTime: TXSDateTime; const LicenceKey: WideString): HistoryEventResult; stdcall;
function MobileNumberConvert(const MobileNumber: WideString; const LicenceKey: WideString): ArrayOfString; stdcall;
end;function GetJaronSoftWebServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): JaronSoftWebServiceSoap;
implementationfunction GetJaronSoftWebServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): JaronSoftWebServiceSoap;
const
defWSDL = 'http://webservice.jaron.cn/default.asmx?wsdl';
defURL = 'http://webservice.jaron.cn/default.asmx';
defSvc = 'JaronSoftWebService';
defPrt = 'JaronSoftWebServiceSoap';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as JaronSoftWebServiceSoap);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(JaronSoftWebServiceSoap), 'http://webservice.jaron.cn/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(JaronSoftWebServiceSoap), 'http://webservice.jaron.cn/%operationName%');
RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfString), 'http://webservice.jaron.cn/', 'ArrayOfString');
RemClassRegistry.RegisterXSClass(HistoryEventResult, 'http://webservice.jaron.cn/', 'HistoryEventResult');end.
解决方案 »
- 万一有同时插入数据的这种情况,怎么办?
- 如何得到windows系统的句柄???大侠支招
- delphi 外部程序内嵌
- DBcombobox添加不重复数据怎么写代码~~
- !!婚!!外!!情!!管!!理!!试!!行!!条!!例!!!!!!!!!!
- ★★★关于网络验证程序,请高手指教★★★
- 如何判断"保存"按钮的visible??(第二帖)
- 西安的delphi程序员过来吧!!!!!
- Ttreeview的问题,很急!!!
- 谁能帮我翻译一个delphi工程,人民币购买
- 高手请进
- 执行一条存储过程....,提示 "cannot perform this operation on a closed dataset"
const
defWSDL = 'http://webservice.jaron.cn/default.asmx?wsdl';
defURL = 'http://webservice.jaron.cn/default.asmx';
defSvc = 'JaronSoftWebService';
defPrt = 'JaronSoftWebServiceSoap';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as JaronSoftWebServiceSoap);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
//在这里 RIO释放之前
RIO.MobileNumberConvert(参数);
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end; //在这里 RIO释放之前
RIO.MobileNumberConvert(参数);
这样调用就行了啊 你的function GetJaronSoftWebServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): JaronSoftWebServiceSoap; 这个函数是后加的吧 WebService单元自动生成的时候没有 把这个函数写到你按钮同一个单元里
//按钮事件
var
MyRio:JaronSoftWebServiceSoap;
begin
MyRio:=default2.GetJaronSoftWebServiceSoap();
MyRio.MobileNumberConvert();
MyRio:=nil;
end;
var
rio: JaronSoftWebServiceSoap;
myArrayStr: ArrayOfString;
begin
...
rio := myRIO as JaronSoftWebServiceSoap;
myArrayStr := rio.MobileNumberConvert(MobileNumber, LicenceKey);
...
end;