Değerli arakadaşlar,
java ile yazılmış bir soap servere istek gönderirken array olan parametreleri gönderemiyorum.int yada string sorunsuz gidiyor.
wdsl import ederken oluşan dosyadaki "InvRegistry.RegisterInvokeOptions(TypeInfo(xxx), ioLiteral);" satırını silince sorunsuz çalışıyor. bu konuda bilgisi olan vamrıdır acaba
Hangi yöntemi kullanıyorsunuz tabi bilemiyorum ama şayet xml ise benim soap servislerinde eskiden kullandığım yöntem şu şekildeydi;
xiDHTTP1 := TIdHTTP.Create(nil);
xidHttp1.ConnectTimeout := 20000;
ResponseData := TMemoryStream.Create;
PostData := TStringStream.Create(SoapMsg, TEncoding.UTF8);
xIdHTTP1.HTTPOptions := xIdHTTP1.HTTPOptions + [hoNoProtocolErrorException, hoWantProtocolErrorContent];
xIdHTTP1.Request.ContentType := 'text/xml';
xIdHTTP1.Request.Charset := 'utf-8';
xIdHTTP1.Request.Accept := 'text/xml';
xIdHTTP1.Request.CacheControl := 'no-cache';
xIdHTTP1.Request.CustomHeaders.Values['SOAPAction'] := 'http://tempuri.org/GetMessage';
xIdHTTP1.Post(YPostUrl, PostData, ResponseData);
PostData.Free;
xstr := TStringList.Create;
xstr.Clear;
xstr.BeginUpdate;
xstr.Add(Format('Response Code: %d', [xIdHTTP1.ResponseCode]));
// xstr.Lines.Add(Format('Response Text: %s', [xIdHTTP1.ResponseText]));
ResponseData.Position := 0;
//// ReadStringsAsCharset fonksiyonu için Uses'e bunu ekle = IdGlobalProtocols
ReadStringsAsCharset(ResponseData, xstr , xIdHTTP1.Response.Charset);
xstr.EndUpdate;
xmldoc := TXMLDocument.Create(nil);
xmldoc.XML.Text:=xstr.Text;
xmldoc.Active:=true;
Siparisler1 := XMLParse_01( xmldoc.XML.Text );
Umarım size bir faydası olur...
(25-01-2021, Saat: 13:57)mcb Adlı Kullanıcıdan Alıntı: [ -> ]Değerli arakadaşlar,
java ile yazılmış bir soap servere istek gönderirken array olan parametreleri gönderemiyorum.int yada string sorunsuz gidiyor.
wdsl import ederken oluşan dosyadaki "InvRegistry.RegisterInvokeOptions(TypeInfo(xxx), ioLiteral);" satırını silince sorunsuz çalışıyor. bu konuda bilgisi olan vamrıdır acaba
Aşağıdaki şekilde kullanmayı dener misin ?
InvRegistry.RegisterInvokeOptions(TypeInfo(xxx),
ioDocument);
(25-02-2021, Saat: 03:25)tmrksmt Adlı Kullanıcıdan Alıntı: [ -> ]Hangi yöntemi kullanıyorsunuz tabi bilemiyorum ama şayet xml ise benim soap servislerinde eskiden kullandığım yöntem şu şekildeydi;
xiDHTTP1 := TIdHTTP.Create(nil);
xidHttp1.ConnectTimeout := 20000;
ResponseData := TMemoryStream.Create;
PostData := TStringStream.Create(SoapMsg, TEncoding.UTF8);
xIdHTTP1.HTTPOptions := xIdHTTP1.HTTPOptions + [hoNoProtocolErrorException, hoWantProtocolErrorContent];
xIdHTTP1.Request.ContentType := 'text/xml';
xIdHTTP1.Request.Charset := 'utf-8';
xIdHTTP1.Request.Accept := 'text/xml';
xIdHTTP1.Request.CacheControl := 'no-cache';
xIdHTTP1.Request.CustomHeaders.Values['SOAPAction'] := 'http://tempuri.org/GetMessage';
xIdHTTP1.Post(YPostUrl, PostData, ResponseData);
PostData.Free;
xstr := TStringList.Create;
xstr.Clear;
xstr.BeginUpdate;
xstr.Add(Format('Response Code: %d', [xIdHTTP1.ResponseCode]));
// xstr.Lines.Add(Format('Response Text: %s', [xIdHTTP1.ResponseText]));
ResponseData.Position := 0;
//// ReadStringsAsCharset fonksiyonu için Uses'e bunu ekle = IdGlobalProtocols
ReadStringsAsCharset(ResponseData, xstr , xIdHTTP1.Response.Charset);
xstr.EndUpdate;
xmldoc := TXMLDocument.Create(nil);
xmldoc.XML.Text:=xstr.Text;
xmldoc.Active:=true;
Siparisler1 := XMLParse_01( xmldoc.XML.Text );
Umarım size bir faydası olur...
Merhaba.
Ben SOAP ile veri gönderip cevap almak için,
HTTPReqresp1.Execute(GelecekCevapVerisi. GonderilenXMLVerisi);
Şeklinde kullanıyorum. Siz sadece POST yani gönderim yapıyorsunuz.
(25-02-2021, Saat: 12:09)enigma Adlı Kullanıcıdan Alıntı: [ -> ] (25-02-2021, Saat: 03:25)tmrksmt Adlı Kullanıcıdan Alıntı: [ -> ]Hangi yöntemi kullanıyorsunuz tabi bilemiyorum ama şayet xml ise benim soap servislerinde eskiden kullandığım yöntem şu şekildeydi;
xiDHTTP1 := TIdHTTP.Create(nil);
xidHttp1.ConnectTimeout := 20000;
ResponseData := TMemoryStream.Create;
PostData := TStringStream.Create(SoapMsg, TEncoding.UTF8);
xIdHTTP1.HTTPOptions := xIdHTTP1.HTTPOptions + [hoNoProtocolErrorException, hoWantProtocolErrorContent];
xIdHTTP1.Request.ContentType := 'text/xml';
xIdHTTP1.Request.Charset := 'utf-8';
xIdHTTP1.Request.Accept := 'text/xml';
xIdHTTP1.Request.CacheControl := 'no-cache';
xIdHTTP1.Request.CustomHeaders.Values['SOAPAction'] := 'http://tempuri.org/GetMessage';
xIdHTTP1.Post(YPostUrl, PostData, ResponseData);
PostData.Free;
xstr := TStringList.Create;
xstr.Clear;
xstr.BeginUpdate;
xstr.Add(Format('Response Code: %d', [xIdHTTP1.ResponseCode]));
// xstr.Lines.Add(Format('Response Text: %s', [xIdHTTP1.ResponseText]));
ResponseData.Position := 0;
//// ReadStringsAsCharset fonksiyonu için Uses'e bunu ekle = IdGlobalProtocols
ReadStringsAsCharset(ResponseData, xstr , xIdHTTP1.Response.Charset);
xstr.EndUpdate;
xmldoc := TXMLDocument.Create(nil);
xmldoc.XML.Text:=xstr.Text;
xmldoc.Active:=true;
Siparisler1 := XMLParse_01( xmldoc.XML.Text );
Umarım size bir faydası olur...
Merhaba.
Ben SOAP ile veri gönderip cevap almak için,
HTTPReqresp1.Execute(GelecekCevapVerisi. GonderilenXMLVerisi);
Şeklinde kullanıyorum. Siz sadece POST yani gönderim yapıyorsunuz.
Sizi anladım. Ancak örnek kodlarıma dikkat ederseniz proje icabı POST Metodunu kullandığımda dönen değeri Stream olarak alıyorum. Gerçi artık xml kullanan web servis de pek kalmadı. Ben de bu yüzden Rest API kullanıyorum ama belki bir yardımı dokunur diye paylaşmak istedim. Kolay gelsin.