önceki servis şu şekilde idi
Kod: Tümünü seç
[code]/ ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://192.168.6.8/kbs/mernis/Service.asmx?wsdl
// Encoding : utf-8
// Version : 1.0
// (16.10.2008 14:13:10 - 1.33.2.5)
// ************************************************************************ //
unit Service;
interface
uses 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"
// !:int - "http://www.w3.org/2001/XMLSchema"
KisiVeri = class; { "http://tempuri.org/" }
// ************************************************************************ //
// Namespace : http://tempuri.org/
// ************************************************************************ //
KisiVeri = class(TRemotable)
private
FgsAd: WideString;
FgsSoyAd: WideString;
FgsAnaAd: WideString;
FgsAnaSoyAd: WideString;
FgsBabaAd: WideString;
FgsBabaSoyAd: WideString;
FgsCinsiyet: WideString;
FgtDogumTarih: TXSDateTime;
FgsDogumYer: WideString;
FgsKizlikSoyAd: WideString;
FgiAileSiraNo: Integer;
FgiBireySiraNo: Integer;
FgsCiltAd: WideString;
FgsCiltKod: Integer;
FgsIlAd: WideString;
FgsIlceAd: WideString;
FgsIlceKod: Integer;
FgsIlKod: Integer;
public
destructor Destroy; override;
published
property gsAd: WideString read FgsAd write FgsAd;
property gsSoyAd: WideString read FgsSoyAd write FgsSoyAd;
property gsAnaAd: WideString read FgsAnaAd write FgsAnaAd;
property gsAnaSoyAd: WideString read FgsAnaSoyAd write FgsAnaSoyAd;
property gsBabaAd: WideString read FgsBabaAd write FgsBabaAd;
property gsBabaSoyAd: WideString read FgsBabaSoyAd write FgsBabaSoyAd;
property gsCinsiyet: WideString read FgsCinsiyet write FgsCinsiyet;
property gtDogumTarih: TXSDateTime read FgtDogumTarih write FgtDogumTarih;
property gsDogumYer: WideString read FgsDogumYer write FgsDogumYer;
property gsKizlikSoyAd: WideString read FgsKizlikSoyAd write FgsKizlikSoyAd;
property giAileSiraNo: Integer read FgiAileSiraNo write FgiAileSiraNo;
property giBireySiraNo: Integer read FgiBireySiraNo write FgiBireySiraNo;
property gsCiltAd: WideString read FgsCiltAd write FgsCiltAd;
property gsCiltKod: Integer read FgsCiltKod write FgsCiltKod;
property gsIlAd: WideString read FgsIlAd write FgsIlAd;
property gsIlceAd: WideString read FgsIlceAd write FgsIlceAd;
property gsIlceKod: Integer read FgsIlceKod write FgsIlceKod;
property gsIlKod: Integer read FgsIlKod write FgsIlKod;
end;
// ************************************************************************ //
// Namespace : http://tempuri.org/
// soapAction: http://tempuri.org/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// binding : ServiceSoap
// service : Service
// port : ServiceSoap
// URL : http://192.168.6.8/kbs/mernis/Service.asmx
// ************************************************************************ //
ServiceSoap = interface(IInvokable)
['{77573149-9C57-FA51-F11F-EFD527C91BD9}']
function BaglantiBilgi: WideString; stdcall;
function TckyaGoreKimlikBilgileriGetir(const sTckNo: WideString): KisiVeri; stdcall;
end;
function GetServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): ServiceSoap;
implementation
function GetServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): ServiceSoap;
const
defWSDL = 'http://192.168.6.8/kbs/mernis/Service.asmx?wsdl';
defURL = 'http://192.168.6.8/kbs/mernis/Service.asmx';
defSvc = 'Service';
defPrt = 'ServiceSoap';
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 ServiceSoap);
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;
destructor KisiVeri.Destroy;
begin
if Assigned(FgtDogumTarih) then
FgtDogumTarih.Free;
inherited Destroy;
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://tempuri.org/%operationName%');
RemClassRegistry.RegisterXSClass(KisiVeri, 'http://tempuri.org/', 'KisiVeri');
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);
end.
yeni servis şu şekilde
Kod: Tümünü seç
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://192.168.6.11/Mernis/Kps.svc?wsdl
// Encoding : utf-8
// Version : 1.0
// (24.08.2011 16:07:59 - 1.33.2.5)
// ************************************************************************ //
unit Kps;
interface
uses 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.
// ************************************************************************ //
// !:TcKimlikSorgula - "http://tempuri.org/"
// !:TcKimlikSorgulaResponse - "http://tempuri.org/"
// !:AdresSorgula - "http://tempuri.org/"
// !:AdresSorgulaResponse - "http://tempuri.org/"
// !:CuzdanSorgula - "http://tempuri.org/"
// !:CuzdanSorgulaResponse - "http://tempuri.org/"
// ************************************************************************ //
// Namespace : http://tempuri.org/
// soapAction: http://tempuri.org/IKps/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// binding : BasicHttpBinding_IKps
// service : Kps
// port : BasicHttpBinding_IKps
// URL : http://online/Mernis/Kps.svc
// ************************************************************************ //
IKps = interface(IInvokable)
['{58E8A5B6-BC21-E05A-C524-7AE11F257DFD}']
function TcKimlikSorgula(const parameters: TcKimlikSorgula): TcKimlikSorgulaResponse; stdcall;
function AdresSorgula(const parameters: AdresSorgula): AdresSorgulaResponse; stdcall;
function CuzdanSorgula(const parameters: CuzdanSorgula): CuzdanSorgulaResponse; stdcall;
end;
function GetIKps(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): IKps;
implementation
function GetIKps(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IKps;
const
defWSDL = 'http://192.168.6.11/Mernis/Kps.svc?wsdl';
defURL = 'http://online/Mernis/Kps.svc';
defSvc = 'Kps';
defPrt = 'BasicHttpBinding_IKps';
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 IKps);
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(IKps), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IKps), 'http://tempuri.org/IKps/%operationName%');
InvRegistry.RegisterInvokeOptions(TypeInfo(IKps), ioLiteral);
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);
verdiği hata tür tanımlaması hatası