Web Service

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
Kullanıcı avatarı
kimene
Üye
Mesajlar: 78
Kayıt: 28 Haz 2003 02:39
Konum: İstanbul

Web Service

Mesaj gönderen kimene »

Bağkur un web servisine bilgi gönderince aşağıdaki hatayı veriyor.

"java.lang.IllegalAccessException:WSWS321E:Error: Null setter method specified."

hatanın xml kodu
"
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan ... ody><Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns="">Server.generalException</faultcode><faultstring xmlns=""><![CDATA[java.lang.IllegalAccessException: WSWS3214E: Error: Null setter method specified.]]></faultstring><detail xmlns=""/></Fault></soapenv:Body></soapenv:Envelope>
"
problem bendemi
Kullanıcı avatarı
kimene
Üye
Mesajlar: 78
Kayıt: 28 Haz 2003 02:39
Konum: İstanbul

wsdl

Mesaj gönderen kimene »

benim kodum
VAR bagkurws: getprovizyon;
provizyonneticesi:provizyonsonuc;
provizyonbilgileri:provizyonistek;
begin
bagkurws:=getgetprovizyon(False, '', HTTPRIO1);;
provizyonneticesi:=provizyonsonuc.Create;
provizyonbilgileri:=provizyonistek.Create;
provizyonbilgileri.bagno:=123456789;
provizyonbilgileri.karneNo:='AB1234567';
provizyonbilgileri.yakKod:=2000;
provizyonbilgileri.kullanici:='TESTHASTANESI';
provizyonbilgileri.sifre:='1235678';
provizyonneticesi:=BAGKURWS.sistemeGonder(provizyonbilgileri);


wsdl kodu
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://hop.bagkur.gov.tr/HOPYeni/wsdl/c ... izyon.wsdl
// Encoding : UTF-8
// Version : 1.0
// (27.06.2005 12:09:11 - 1.33.2.5)
// ************************************************************************ //

unit GetProvizyon1;

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.
// ************************************************************************ //
// !:integer - "http://www.w3.org/2001/XMLSchema"
// !:string - "http://www.w3.org/2001/XMLSchema"
// !:int - "http://www.w3.org/2001/XMLSchema"
// !:boolean - "http://www.w3.org/2001/XMLSchema"

ProvizyonIstek = class; { "http://objects.hop.elba.com" }
ProvizyonSonuc = class; { "http://objects.hop.elba.com" }



// ************************************************************************ //
// Namespace : http://objects.hop.elba.com
// ************************************************************************ //
ProvizyonIstek = class(TRemotable)
private
Fbagno: integer;
FbagnoAsStr: WideString;
FkarneNo: WideString;
Fkullanici: WideString;
Fsifre: WideString;
FyakKod: Integer;
FyakKodAsStr: WideString;
FistekCommArea: WideString;
published
property bagno: integer read Fbagno write Fbagno;
property bagnoAsStr: WideString read FbagnoAsStr write FbagnoAsStr;
property karneNo: WideString read FkarneNo write FkarneNo;
property kullanici: WideString read Fkullanici write Fkullanici;
property sifre: WideString read Fsifre write Fsifre;
property yakKod: Integer read FyakKod write FyakKod;
property yakKodAsStr: WideString read FyakKodAsStr write FyakKodAsStr;
property istekCommArea: WideString read FistekCommArea write FistekCommArea;
end;



// ************************************************************************ //
// Namespace : http://objects.hop.elba.com
// ************************************************************************ //
ProvizyonSonuc = class(TRemotable)
private
Fhepsi: WideString;
FresultCode: Boolean;
FerrorStr: WideString;
FprovizyonNo: WideString;
FsigortaliIli: Integer;
FhataKodu: Integer;
published
property hepsi: WideString read Fhepsi write Fhepsi;
property resultCode: Boolean read FresultCode write FresultCode;
property errorStr: WideString read FerrorStr write FerrorStr;
property provizyonNo: WideString read FprovizyonNo write FprovizyonNo;
property sigortaliIli: Integer read FsigortaliIli write FsigortaliIli;
property hataKodu: Integer read FhataKodu write FhataKodu;
end;


// ************************************************************************ //
// Namespace : http://servlets.hop.elba.com
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : GetProvizyonSoapBinding
// service : GetProvizyonService
// port : GetProvizyon
// URL : http://hop.bagkur.gov.tr/HOPYeni/services/GetProvizyon
// ************************************************************************ //
GetProvizyon = interface(IInvokable)
['{C05EEB21-9E17-4047-EE49-4B056066459E}']
function sistemeGonder(const istek: ProvizyonIstek): ProvizyonSonuc; stdcall;
end;

function GetGetProvizyon(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): GetProvizyon;


implementation

function GetGetProvizyon(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): GetProvizyon;
const
defWSDL = 'http://hop.bagkur.gov.tr/HOPYeni/wsdl/c ... izyon.wsdl';
defURL = 'http://hop.bagkur.gov.tr/HOPYeni/services/GetProvizyon';
defSvc = 'GetProvizyonService';
defPrt = 'GetProvizyon';
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 GetProvizyon);
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(GetProvizyon), 'http://servlets.hop.elba.com', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(GetProvizyon), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(GetProvizyon), ioDocument);
RemClassRegistry.RegisterXSClass(ProvizyonIstek, 'http://objects.hop.elba.com', 'ProvizyonIstek');
RemClassRegistry.RegisterXSClass(ProvizyonSonuc, 'http://objects.hop.elba.com', 'ProvizyonSonuc');

end.
Kullanıcı avatarı
ozkanagiral
Üye
Mesajlar: 79
Kayıt: 17 Oca 2004 06:23
Konum: istanbul
İletişim:

Mesaj gönderen ozkanagiral »

kodu detaylı incelemedim, hata mesajından anlaşılan java diline özgü bir erişim yöntemi hatası durum böyle olunca da yazdıklarınızda bir sorun var gibi görünüyor ayrıca erişmek istediğiniz servis, hizmet yapısında değişikliğe gitmiş olabilir, mesela alan adlarını veya sonuç döndüren yapılarını değiştirmiş olabilir, bunları kontrol etmenizde fayda var, benim anladığım şimdilik bunlar. Eğer bir sonuç alamazsanız daha sonra tekrar ve detaylı inceleyebilirim.
Kolay Gelsin
Kullanıcı avatarı
aslangeri
Moderator
Mesajlar: 4322
Kayıt: 26 Ara 2003 04:19
Konum: Ankara
İletişim:

Mesaj gönderen aslangeri »

@kimene
ben de aynı şekilde kullanıyorum ama bana serverdan
server yazdı:invalid property element 0
mesajı geliyor dolayısıyla provizyon alamıyorum. emekli sandığından alıyorum bağkurdan alamıyorum.
Delphi 2005 ile denedim. olmadı. sen hangi ver kullanıyorsun.
tek fark sanırım şurası
birde ssk dan alabiliyormusun.
kolay gelsin.
Duyduğun Şeylerin Söylediklerim Olduğuna Eminim Ama
Anladığın Şeylerin Anlatmak İstediklerim Olduğuna Emin Değilim
Cevapla