"Server was unable to read request. ---> There is an error in XML document (2, 724)"
Soapui ile deneme yaptığımda bir sıkıntı yok forumdaki daha önce sorulan
viewtopic.php?t=35227
viewtopic.php?t=35770
gibi de denedim aynı hatayı almaya devam ediyorum eksik bir şeymi yapıyorum?
Kod: Tümünü seç
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://www.suratkargo.com.tr/GonderiWebServiceGercek/service.asmx?WSDL
// >Import : http://www.suratkargo.com.tr/GonderiWebServiceGercek/service.asmx?WSDL>0
// Encoding : utf-8
// Version : 1.0
// (24.06.2016 23:27:56 - - $Rev: 76228 $)
// ************************************************************************ //
unit USuratKargoGonderiService;
interface
uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;
const
IS_OPTN = $0001;
IS_REF = $0080;
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 Embarcadero types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:decimal - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:int - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:string - "http://www.w3.org/2001/XMLSchema"[Gbl]
// !:unsignedByte - "http://www.w3.org/2001/XMLSchema"[Gbl]
Gonderi = class; { "http://tempuri.org/"[GblCplx] }
// ************************************************************************ //
// XML : Gonderi, global, <complexType>
// Namespace : http://tempuri.org/
// ************************************************************************ //
Gonderi = class(TRemotable)
private
FKisiKurum: string;
FKisiKurum_Specified: boolean;
FSahisBirim: string;
FSahisBirim_Specified: boolean;
FAliciAdresi: string;
FAliciAdresi_Specified: boolean;
FIl: string;
FIl_Specified: boolean;
FIlce: string;
FIlce_Specified: boolean;
FTelefonEv: string;
FTelefonEv_Specified: boolean;
FTelefonIs: string;
FTelefonIs_Specified: boolean;
FTelefonCep: string;
FTelefonCep_Specified: boolean;
FEmail: string;
FEmail_Specified: boolean;
FAliciKodu: string;
FAliciKodu_Specified: boolean;
FKargoTuru: Byte;
FOdemetipi: Byte;
FIrsaliyeSeriNo: string;
FIrsaliyeSeriNo_Specified: boolean;
FIrsaliyeSiraNo: string;
FIrsaliyeSiraNo_Specified: boolean;
FReferansNo: string;
FReferansNo_Specified: boolean;
FOzelKargoTakipNo: string;
FOzelKargoTakipNo_Specified: boolean;
FAdet: Integer;
FBirimDesi: TXSDecimal;
FBirimKg: TXSDecimal;
FKargoIcerigi: string;
FKargoIcerigi_Specified: boolean;
FKapidanOdemeTahsilatTipi: Byte;
FKapidanOdemeTutari: TXSDecimal;
FEkHizmetler: string;
FEkHizmetler_Specified: boolean;
FSevkAdresiAdi: string;
FSevkAdresiAdi_Specified: boolean;
FTeslimSekli: Byte;
FTasimaSekli: Byte;
FBayiNo: string;
FBayiNo_Specified: boolean;
FEntegrasyonId: string;
FEntegrasyonId_Specified: boolean;
FEntegrasyonHesaplamaTuru: string;
FEntegrasyonHesaplamaTuru_Specified: boolean;
procedure SetKisiKurum(Index: Integer; const Astring: string);
function KisiKurum_Specified(Index: Integer): boolean;
procedure SetSahisBirim(Index: Integer; const Astring: string);
function SahisBirim_Specified(Index: Integer): boolean;
procedure SetAliciAdresi(Index: Integer; const Astring: string);
function AliciAdresi_Specified(Index: Integer): boolean;
procedure SetIl(Index: Integer; const Astring: string);
function Il_Specified(Index: Integer): boolean;
procedure SetIlce(Index: Integer; const Astring: string);
function Ilce_Specified(Index: Integer): boolean;
procedure SetTelefonEv(Index: Integer; const Astring: string);
function TelefonEv_Specified(Index: Integer): boolean;
procedure SetTelefonIs(Index: Integer; const Astring: string);
function TelefonIs_Specified(Index: Integer): boolean;
procedure SetTelefonCep(Index: Integer; const Astring: string);
function TelefonCep_Specified(Index: Integer): boolean;
procedure SetEmail(Index: Integer; const Astring: string);
function Email_Specified(Index: Integer): boolean;
procedure SetAliciKodu(Index: Integer; const Astring: string);
function AliciKodu_Specified(Index: Integer): boolean;
procedure SetIrsaliyeSeriNo(Index: Integer; const Astring: string);
function IrsaliyeSeriNo_Specified(Index: Integer): boolean;
procedure SetIrsaliyeSiraNo(Index: Integer; const Astring: string);
function IrsaliyeSiraNo_Specified(Index: Integer): boolean;
procedure SetReferansNo(Index: Integer; const Astring: string);
function ReferansNo_Specified(Index: Integer): boolean;
procedure SetOzelKargoTakipNo(Index: Integer; const Astring: string);
function OzelKargoTakipNo_Specified(Index: Integer): boolean;
procedure SetKargoIcerigi(Index: Integer; const Astring: string);
function KargoIcerigi_Specified(Index: Integer): boolean;
procedure SetEkHizmetler(Index: Integer; const Astring: string);
function EkHizmetler_Specified(Index: Integer): boolean;
procedure SetSevkAdresiAdi(Index: Integer; const Astring: string);
function SevkAdresiAdi_Specified(Index: Integer): boolean;
procedure SetBayiNo(Index: Integer; const Astring: string);
function BayiNo_Specified(Index: Integer): boolean;
procedure SetEntegrasyonId(Index: Integer; const Astring: string);
function EntegrasyonId_Specified(Index: Integer): boolean;
procedure SetEntegrasyonHesaplamaTuru(Index: Integer; const Astring: string);
function EntegrasyonHesaplamaTuru_Specified(Index: Integer): boolean;
public
destructor Destroy; override;
published
property KisiKurum: string Index (IS_OPTN) read FKisiKurum write SetKisiKurum stored KisiKurum_Specified;
property SahisBirim: string Index (IS_OPTN) read FSahisBirim write SetSahisBirim stored SahisBirim_Specified;
property AliciAdresi: string Index (IS_OPTN) read FAliciAdresi write SetAliciAdresi stored AliciAdresi_Specified;
property Il: string Index (IS_OPTN) read FIl write SetIl stored Il_Specified;
property Ilce: string Index (IS_OPTN) read FIlce write SetIlce stored Ilce_Specified;
property TelefonEv: string Index (IS_OPTN) read FTelefonEv write SetTelefonEv stored TelefonEv_Specified;
property TelefonIs: string Index (IS_OPTN) read FTelefonIs write SetTelefonIs stored TelefonIs_Specified;
property TelefonCep: string Index (IS_OPTN) read FTelefonCep write SetTelefonCep stored TelefonCep_Specified;
property Email: string Index (IS_OPTN) read FEmail write SetEmail stored Email_Specified;
property AliciKodu: string Index (IS_OPTN) read FAliciKodu write SetAliciKodu stored AliciKodu_Specified;
property KargoTuru: Byte read FKargoTuru write FKargoTuru;
property Odemetipi: Byte read FOdemetipi write FOdemetipi;
property IrsaliyeSeriNo: string Index (IS_OPTN) read FIrsaliyeSeriNo write SetIrsaliyeSeriNo stored IrsaliyeSeriNo_Specified;
property IrsaliyeSiraNo: string Index (IS_OPTN) read FIrsaliyeSiraNo write SetIrsaliyeSiraNo stored IrsaliyeSiraNo_Specified;
property ReferansNo: string Index (IS_OPTN) read FReferansNo write SetReferansNo stored ReferansNo_Specified;
property OzelKargoTakipNo: string Index (IS_OPTN) read FOzelKargoTakipNo write SetOzelKargoTakipNo stored OzelKargoTakipNo_Specified;
property Adet: Integer read FAdet write FAdet;
property BirimDesi: TXSDecimal read FBirimDesi write FBirimDesi;
property BirimKg: TXSDecimal read FBirimKg write FBirimKg;
property KargoIcerigi: string Index (IS_OPTN) read FKargoIcerigi write SetKargoIcerigi stored KargoIcerigi_Specified;
property KapidanOdemeTahsilatTipi: Byte read FKapidanOdemeTahsilatTipi write FKapidanOdemeTahsilatTipi;
property KapidanOdemeTutari: TXSDecimal read FKapidanOdemeTutari write FKapidanOdemeTutari;
property EkHizmetler: string Index (IS_OPTN) read FEkHizmetler write SetEkHizmetler stored EkHizmetler_Specified;
property SevkAdresiAdi: string Index (IS_OPTN) read FSevkAdresiAdi write SetSevkAdresiAdi stored SevkAdresiAdi_Specified;
property TeslimSekli: Byte read FTeslimSekli write FTeslimSekli;
property TasimaSekli: Byte read FTasimaSekli write FTasimaSekli;
property BayiNo: string Index (IS_OPTN) read FBayiNo write SetBayiNo stored BayiNo_Specified;
property EntegrasyonId: string Index (IS_OPTN) read FEntegrasyonId write SetEntegrasyonId stored EntegrasyonId_Specified;
property EntegrasyonHesaplamaTuru: string Index (IS_OPTN) read FEntegrasyonHesaplamaTuru write SetEntegrasyonHesaplamaTuru stored EntegrasyonHesaplamaTuru_Specified;
end;
// ************************************************************************ //
// Namespace : http://tempuri.org/
// soapAction: http://tempuri.org/GonderiyiKargoyaGonder
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// use : literal
// binding : ServiceSoap
// service : Service
// port : ServiceSoap
// URL : http://www.suratkargo.com.tr/GonderiWebServiceGercek/service.asmx
// ************************************************************************ //
ServiceSoap = interface(IInvokable)
['{77573149-9C57-FA51-F11F-EFD527C91BD9}']
function GonderiyiKargoyaGonder(const KullaniciAdi: string; const Sifre: string; const Gonderi: Gonderi): string; stdcall;
end;
function GetServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): ServiceSoap;
implementation
uses System.SysUtils;
function GetServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): ServiceSoap;
const
defWSDL = 'http://www.suratkargo.com.tr/GonderiWebServiceGercek/service.asmx?WSDL';
defURL = 'http://www.suratkargo.com.tr/GonderiWebServiceGercek/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 Gonderi.Destroy;
begin
System.SysUtils.FreeAndNil(FBirimDesi);
System.SysUtils.FreeAndNil(FBirimKg);
System.SysUtils.FreeAndNil(FKapidanOdemeTutari);
inherited Destroy;
end;
procedure Gonderi.SetKisiKurum(Index: Integer; const Astring: string);
begin
FKisiKurum := Astring;
FKisiKurum_Specified := True;
end;
function Gonderi.KisiKurum_Specified(Index: Integer): boolean;
begin
Result := FKisiKurum_Specified;
end;
procedure Gonderi.SetSahisBirim(Index: Integer; const Astring: string);
begin
FSahisBirim := Astring;
FSahisBirim_Specified := True;
end;
function Gonderi.SahisBirim_Specified(Index: Integer): boolean;
begin
Result := FSahisBirim_Specified;
end;
procedure Gonderi.SetAliciAdresi(Index: Integer; const Astring: string);
begin
FAliciAdresi := Astring;
FAliciAdresi_Specified := True;
end;
function Gonderi.AliciAdresi_Specified(Index: Integer): boolean;
begin
Result := FAliciAdresi_Specified;
end;
procedure Gonderi.SetIl(Index: Integer; const Astring: string);
begin
FIl := Astring;
FIl_Specified := True;
end;
function Gonderi.Il_Specified(Index: Integer): boolean;
begin
Result := FIl_Specified;
end;
procedure Gonderi.SetIlce(Index: Integer; const Astring: string);
begin
FIlce := Astring;
FIlce_Specified := True;
end;
function Gonderi.Ilce_Specified(Index: Integer): boolean;
begin
Result := FIlce_Specified;
end;
procedure Gonderi.SetTelefonEv(Index: Integer; const Astring: string);
begin
FTelefonEv := Astring;
FTelefonEv_Specified := True;
end;
function Gonderi.TelefonEv_Specified(Index: Integer): boolean;
begin
Result := FTelefonEv_Specified;
end;
procedure Gonderi.SetTelefonIs(Index: Integer; const Astring: string);
begin
FTelefonIs := Astring;
FTelefonIs_Specified := True;
end;
function Gonderi.TelefonIs_Specified(Index: Integer): boolean;
begin
Result := FTelefonIs_Specified;
end;
procedure Gonderi.SetTelefonCep(Index: Integer; const Astring: string);
begin
FTelefonCep := Astring;
FTelefonCep_Specified := True;
end;
function Gonderi.TelefonCep_Specified(Index: Integer): boolean;
begin
Result := FTelefonCep_Specified;
end;
procedure Gonderi.SetEmail(Index: Integer; const Astring: string);
begin
FEmail := Astring;
FEmail_Specified := True;
end;
function Gonderi.Email_Specified(Index: Integer): boolean;
begin
Result := FEmail_Specified;
end;
procedure Gonderi.SetAliciKodu(Index: Integer; const Astring: string);
begin
FAliciKodu := Astring;
FAliciKodu_Specified := True;
end;
function Gonderi.AliciKodu_Specified(Index: Integer): boolean;
begin
Result := FAliciKodu_Specified;
end;
procedure Gonderi.SetIrsaliyeSeriNo(Index: Integer; const Astring: string);
begin
FIrsaliyeSeriNo := Astring;
FIrsaliyeSeriNo_Specified := True;
end;
function Gonderi.IrsaliyeSeriNo_Specified(Index: Integer): boolean;
begin
Result := FIrsaliyeSeriNo_Specified;
end;
procedure Gonderi.SetIrsaliyeSiraNo(Index: Integer; const Astring: string);
begin
FIrsaliyeSiraNo := Astring;
FIrsaliyeSiraNo_Specified := True;
end;
function Gonderi.IrsaliyeSiraNo_Specified(Index: Integer): boolean;
begin
Result := FIrsaliyeSiraNo_Specified;
end;
procedure Gonderi.SetReferansNo(Index: Integer; const Astring: string);
begin
FReferansNo := Astring;
FReferansNo_Specified := True;
end;
function Gonderi.ReferansNo_Specified(Index: Integer): boolean;
begin
Result := FReferansNo_Specified;
end;
procedure Gonderi.SetOzelKargoTakipNo(Index: Integer; const Astring: string);
begin
FOzelKargoTakipNo := Astring;
FOzelKargoTakipNo_Specified := True;
end;
function Gonderi.OzelKargoTakipNo_Specified(Index: Integer): boolean;
begin
Result := FOzelKargoTakipNo_Specified;
end;
procedure Gonderi.SetKargoIcerigi(Index: Integer; const Astring: string);
begin
FKargoIcerigi := Astring;
FKargoIcerigi_Specified := True;
end;
function Gonderi.KargoIcerigi_Specified(Index: Integer): boolean;
begin
Result := FKargoIcerigi_Specified;
end;
procedure Gonderi.SetEkHizmetler(Index: Integer; const Astring: string);
begin
FEkHizmetler := Astring;
FEkHizmetler_Specified := True;
end;
function Gonderi.EkHizmetler_Specified(Index: Integer): boolean;
begin
Result := FEkHizmetler_Specified;
end;
procedure Gonderi.SetSevkAdresiAdi(Index: Integer; const Astring: string);
begin
FSevkAdresiAdi := Astring;
FSevkAdresiAdi_Specified := True;
end;
function Gonderi.SevkAdresiAdi_Specified(Index: Integer): boolean;
begin
Result := FSevkAdresiAdi_Specified;
end;
procedure Gonderi.SetBayiNo(Index: Integer; const Astring: string);
begin
FBayiNo := Astring;
FBayiNo_Specified := True;
end;
function Gonderi.BayiNo_Specified(Index: Integer): boolean;
begin
Result := FBayiNo_Specified;
end;
procedure Gonderi.SetEntegrasyonId(Index: Integer; const Astring: string);
begin
FEntegrasyonId := Astring;
FEntegrasyonId_Specified := True;
end;
function Gonderi.EntegrasyonId_Specified(Index: Integer): boolean;
begin
Result := FEntegrasyonId_Specified;
end;
procedure Gonderi.SetEntegrasyonHesaplamaTuru(Index: Integer; const Astring: string);
begin
FEntegrasyonHesaplamaTuru := Astring;
FEntegrasyonHesaplamaTuru_Specified := True;
end;
function Gonderi.EntegrasyonHesaplamaTuru_Specified(Index: Integer): boolean;
begin
Result := FEntegrasyonHesaplamaTuru_Specified;
end;
initialization
{ ServiceSoap }
InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://tempuri.org/GonderiyiKargoyaGonder');
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);
{ ServiceSoap.GonderiyiKargoyaGonder }
InvRegistry.RegisterMethodInfo(TypeInfo(ServiceSoap), 'GonderiyiKargoyaGonder', '',
'[ReturnName="GonderiyiKargoyaGonderResult"]', IS_OPTN);
RemClassRegistry.RegisterXSClass(Gonderi, 'http://tempuri.org/', 'Gonderi');
end.
Fatura ekranımda ki gönder buttonundaki kodlar
Kod: Tümünü seç
procedure Tfrm_FaturaKaydi.SuratGonderClick(Sender: TObject);
var
Cumle:String;
servis:ServiceSoap;
giden:Gonderi;
XsDec : TxsDecimal;
begin
Screen.Cursor := crSQLWait;
try
servis:= GetServiceSoap(False,'',nil);
giden:=Gonderi.Create;
giden.KisiKurum:=qry_faturaCARIUNVAN.Text;
giden.AliciAdresi:=qry_faturaCARIADRES.Text;
giden.Il:=qry_faturaIL.Text;
giden.Ilce:=qry_faturaILCE.Text;
giden.TelefonCep:=qry_CarilerCEPTEL1.Text;
giden.AliciKodu:=qry_faturaCARIKOD.Text;
giden.KargoTuru:=3;
giden.Odemetipi:=2;
giden.IrsaliyeSeriNo:='A';
giden.IrsaliyeSiraNo:=qry_faturaFATURANO.Text;
giden.OzelKargoTakipNo:=qry_faturaFATURANO.Text;
giden.Adet:=1;
XsDec := TXSDecimal.Create;
XsDec.DecimalString := Format('%f', [StrToFloat(edt_GENELTOPLAM.Text)]);
giden.KapidanOdemeTutari:=XsDec;
giden.KapidanOdemeTahsilatTipi:=1;
Cumle:=servis.GonderiyiKargoyaGonder('test','test',giden);
ShowMessage(Cumle);
finally
giden.Free;
Screen.Cursor := crDefault;
end;