web servis client üzerinde calışmaktayım, WDSL i import ettiğimde class lar oluşmaktadır.
web servis metodunu kullanırken karşı server exception bazen gönderiyor , tr except bloğunda on e:exception yakalayabiliyorum, fakat benim istediğim
aşağıdaki class üzerinde exception ı yakalamak yani tr except bloğunda on e:SVCcexception yakalamak bu calışmıyor .
nerde hata yapıyorum acaba? wdsl import ederken option parametrelerini mi değiştirsem?
Kod: Tümünü seç
try
..
..
getWebservismetod(inavv);
except
on e: SvcException do
showmessage(e.errorDescription);
on e: Exception do
showmessage(e.message);
end;
Kod: Tümünü seç
SvcException = class(ERemotableException)
private
FactivityAmount: TXSDecimal;
FactivityAmount_Specified: boolean;
FactivityCode: string;
FactivityCode_Specified: boolean;
FactivityDateTime: TXSDateTime;
FactivityDateTime_Specified: boolean;
FactivityDescription: string;
FactivityDescription_Specified: boolean;
FactivityId: string;
FactivityId_Specified: boolean;
FcurrencyId: string;
FcurrencyId_Specified: boolean;
FerrorCode: string;
FerrorCode_Specified: boolean;
FerrorDescription: string;
FerrorDescription_Specified: boolean;
Fmessage_: string;
Fmessage__Specified: boolean;
procedure SetactivityAmount(Index: Integer; const ATXSDecimal: TXSDecimal);
function activityAmount_Specified(Index: Integer): boolean;
procedure SetactivityCode(Index: Integer; const Astring: string);
function activityCode_Specified(Index: Integer): boolean;
procedure SetactivityDateTime(Index: Integer; const ATXSDateTime: TXSDateTime);
function activityDateTime_Specified(Index: Integer): boolean;
procedure SetactivityDescription(Index: Integer; const Astring: string);
function activityDescription_Specified(Index: Integer): boolean;
procedure SetactivityId(Index: Integer; const Astring: string);
function activityId_Specified(Index: Integer): boolean;
procedure SetcurrencyId(Index: Integer; const Astring: string);
function currencyId_Specified(Index: Integer): boolean;
procedure SeterrorCode(Index: Integer; const Astring: string);
function errorCode_Specified(Index: Integer): boolean;
procedure SeterrorDescription(Index: Integer; const Astring: string);
function errorDescription_Specified(Index: Integer): boolean;
procedure Setmessage_(Index: Integer; const Astring: string);
function message__Specified(Index: Integer): boolean;
public
destructor Destroy; override;
published
property activityAmount: TXSDecimal Index (IS_OPTN or IS_UNQL) read FactivityAmount write SetactivityAmount stored activityAmount_Specified;
property activityCode: string Index (IS_OPTN or IS_UNQL) read FactivityCode write SetactivityCode stored activityCode_Specified;
property activityDateTime: TXSDateTime Index (IS_OPTN or IS_UNQL) read FactivityDateTime write SetactivityDateTime stored activityDateTime_Specified;
property activityDescription: string Index (IS_OPTN or IS_UNQL) read FactivityDescription write SetactivityDescription stored activityDescription_Specified;
property activityId: string Index (IS_OPTN or IS_UNQL) read FactivityId write SetactivityId stored activityId_Specified;
property currencyId: string Index (IS_OPTN or IS_UNQL) read FcurrencyId write SetcurrencyId stored currencyId_Specified;
property errorCode: string Index (IS_OPTN or IS_UNQL) read FerrorCode write SeterrorCode stored errorCode_Specified;
property errorDescription: string Index (IS_OPTN or IS_UNQL) read FerrorDescription write SeterrorDescription stored errorDescription_Specified;
property message_: string Index (IS_OPTN or IS_UNQL) read Fmessage_ write Setmessage_ stored message__Specified;
end;