Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
WSDL ile gönderilen zarfı nasıl görebilirim ?
#1
EDM ile e-fatura gönderme işlemine uğraşıyorum. Firmanın Login olma prosedürünü deniyorum. Kendi örnekleri ile XE6'da ve sorunsuz login olabiliyorum ama aynı kodu XE'de çalıştırdığım zaman kullanıcı adı şifre boş hatası alıyorum. Gönderilen zarfları karşılaştırmak adına kullanabileceğim bir site - araç vs. var mıdır ?
Topluluk mopluluk yok :/
Cevapla
#2
fiddler kullanabilirsiniz.

https://www.telerik.com/fiddler
WWW
Cevapla
#3
WireShark ile de görülebilir:
https://glenmazza.net/blog/entry/soap-ca...-wireshark
There's no place like 127.0.0.1
WWW
Cevapla
#4
HTTPS ile baglandigimiz bir sunucuya gden gelen paketlerin güvende oldugunu, WireShark ile izlenemeyecegini umuyordum ama hic de oyle degil, her şey acik net izlenebiliyormus.
Kimse uyanmadan şimdi ne yapacagiz?
Cevapla
#5
(25-02-2019, Saat: 09:31)boreas Adlı Kullanıcıdan Alıntı: EDM ile e-fatura gönderme işlemine uğraşıyorum. Firmanın Login olma prosedürünü deniyorum. Kendi örnekleri ile  XE6'da ve sorunsuz login olabiliyorum ama aynı kodu XE'de çalıştırdığım zaman kullanıcı adı şifre boş hatası alıyorum. Gönderilen zarfları karşılaştırmak adına kullanabileceğim bir site - araç vs. var mıdır ?

HTTPRIO1 bileşeni ile SOAP web servislerini çağırırken OnBeforeExecute eventı içerisinde gönderilen XML kodunu elde edebilir ve gönderilmeden önce bu XML kodu üzerinde değişiklik yapabilir hatta bu XML kodunu sıfırdan kendiniz oluşturabilirsiniz.

Aşağıdaki örnekte yapılan bir SOAP çağrısında gönderilecek XML kodu tamamen yeniden oluşturulmuş ve bizim elle oluşturduğumuz XML kodunun gönderilmesi sağlanmıştır.

procedure TForm1.HTTPRIO1BeforeExecute(const MethodName: string;
 SOAPRequest: TStream);
var
 StrList1: TStringList;
begin
 StrList1 := TStringList.Create;
 try
   SOAPRequest.Position := 0;
   StrList1.LoadFromStream(SOAPRequest);
   if MethodName = 'BlaBla' then
   begin
     StrList1.Clear;
     StrList1.Add('<?xml version="1.0" encoding="UTF-8"?>');
     StrList1.Add('<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">');
     StrList1.Add('   <s:Header>');
     StrList1.Add('      <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">');
     StrList1.Add('         <o:UsernameToken u:Id="uuid-b74abe12-c52d-4b40-a26c-d5610fa14225-2">');
     StrList1.Add('            <o:Username>' + FalanUser + '</o:Username>');
     StrList1.Add('            <oTongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' + FalanSifre + '</oTongueassword>');
     StrList1.Add('         </o:UsernameToken>');
     StrList1.Add('      </o:Security>');
     StrList1.Add('   </s:Header>');
     StrList1.Add('   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">');
     StrList1.Add('      <MCCI_IN000001TR01 xmlns="urn:hl7-org:v3">');
     StrList1.Add('         <id root="2.16.840.1.113883.3.129.2.1.2" extension="858b0066-fdec-494f-b5af-e8e0f7e8d671"/>');
     StrList1.Add('         <creationTime value="' + FormatDateTime('yyyymmddhhnnss', Now) + '"/>');
     StrList1.Add('         <responseModeCode code="Q"/>');
     StrList1.Add('         <interactionId root="2.16.840.1.113883.3.129.2.1.1" extension="MCCI_IN000001TR01"/>');
     StrList1.Add('         <processingCode code="P"/>');
     StrList1.Add('         <processingModeCode code="T"/>');
     StrList1.Add('         <acceptAckCode code="AL"/>');
     StrList1.Add('         <receiver typeCode="RCV">');
     StrList1.Add('            <device determinerCode="INSTANCE" classCode="DEV">');
     StrList1.Add('               <id root="2.16.840.1.113883.3.129.1.1.5" extension="e-Sağlık"/>');
     StrList1.Add('            </device>');
     StrList1.Add('         </receiver>');
     StrList1.Add('         <sender typeCode="SND">');
     StrList1.Add('            <device determinerCode="INSTANCE" classCode="DEV">');
     StrList1.Add('               <id root="2.16.840.1.113883.3.129.1.1.5" extension="123"/>');
     StrList1.Add('            </device>');
     StrList1.Add('         </sender>');
     StrList1.Add('         <controlActEvent moodCode="EVN" classCode="CACT">');
     StrList1.Add('            <subject typeCode="SUBJ">');
     StrList1.Add('               <ClinicalDocument moodCode="EVN">');

     StrList1.Add('               <Falan filan falan filan>');

     StrList1.Add('               </ClinicalDocument>');
     StrList1.Add('            </subject>');
     StrList1.Add('         </controlActEvent>');
     StrList1.Add('      </MCCI_IN000001TR01>');
     StrList1.Add('   </s:Body>');
     StrList1.Add('</s:Envelope>');
   end;

   SOAPRequest.Position := 0;
   StrList1.SaveToStream(SOAPRequest);
 finally
   StrList1.Free;
 end;
end;

Aynı şekilde OnAfterExecute eventı içerisinde geri dönen XML kodu okunabilir ve üzerinde değişiklik yapabilirsiniz.

procedure TForm1.HTTPRIO1AfterExecute(const MethodName: String;
 SOAPResponse: TStream);
var
 StrList1: TStringList;
begin
 inherited;
 StrList1 := TStringList.Create;
 try
   SOAPResponse.Position := 0;
   StrList1.LoadFromStream(SOAPResponse);
   ShowMessage('CEVAP OLARARAK GELEN XML KODLARI: ' + #13#10#13#10 + StrList1.Text + #13#10);
 finally
   StrList1.Free;
 end;
end;
WWW
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Uygulamaya responsive görünüm nasıl kazandırabilriz ? delphicim 0 218 04-01-2024, Saat: 15:24
Son Yorum: delphicim
  Delphi 7 ye göre MB Döviz kurları nasıl alırız maydin60 7 1.057 31-12-2023, Saat: 02:18
Son Yorum: maydin60
  ReadProcessMemory ile veri okuma nasıl yapılır eraendless 2 450 07-09-2023, Saat: 00:35
Son Yorum: veteran
  ARRAYi nasıl for'la dönerim. PREDATOR 16 10.041 26-08-2023, Saat: 14:33
Son Yorum: veteran
  Yandex Disk üzerinden TIdWebDAV ile nasıl dosya alabilirim adelphiforumz 2 869 17-03-2023, Saat: 16:53
Son Yorum: adelphiforumz



Konuyu Okuyanlar: 1 Ziyaretçi