HTTPRIO1 epttavm api
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Re: HTTPRIO1 epttavm api
çalışan soapui httplog çıktısı
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> "<soapenv:Envelope xmlns:soapenv="xhttp://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="xhttp://tempuri.org/">[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-C2492283E7FC1898DC15487924106921"><wsse:Username>xxxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password><wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">EvngjZ/4ax0uMlIOKaRNnQ==</wsse:Nonce><wsu:Created>2019-01-29T20:06:50.686Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <soapenv:Body>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <tem:AltKategoriListesi/>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " </soapenv:Body>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> "</soapenv:Envelope>"
**********************************************************************
delphi kodu
uses soap.wsse.security.userpass ;
procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
kategori : pttservice.ArrayOfKategoriDetay;
port :pttservice.IService;
kimlik:TSOAPHeader;
begin
try
kimlik := Security.Create('username','password');
HTTPRIO1 := THTTPRIO.Create(nil);
port:=pttservice.GetIService(True,'',HTTPRIO1);
HTTPRIO1.SOAPHeaders.Send(kimlik);
kategori := port.KategoriListesi;
memo1.Lines.Add(kategori[0].KategoriAdi);
Except
on Ex: Exception do
ShowMessage(Ex.ClassName + ' : ' + Ex.Message);
end;
*******************************************************
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> "<soapenv:Envelope xmlns:soapenv="xhttp://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="xhttp://tempuri.org/">[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-C2492283E7FC1898DC15487924106921"><wsse:Username>xxxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password><wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">EvngjZ/4ax0uMlIOKaRNnQ==</wsse:Nonce><wsu:Created>2019-01-29T20:06:50.686Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <soapenv:Body>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " <tem:AltKategoriListesi/>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> " </soapenv:Body>[\n]"
Tue Jan 29 23:06:51 AST 2019:DEBUG:>> "</soapenv:Envelope>"
**********************************************************************
delphi kodu
uses soap.wsse.security.userpass ;
procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
kategori : pttservice.ArrayOfKategoriDetay;
port :pttservice.IService;
kimlik:TSOAPHeader;
begin
try
kimlik := Security.Create('username','password');
HTTPRIO1 := THTTPRIO.Create(nil);
port:=pttservice.GetIService(True,'',HTTPRIO1);
HTTPRIO1.SOAPHeaders.Send(kimlik);
kategori := port.KategoriListesi;
memo1.Lines.Add(kategori[0].KategoriAdi);
Except
on Ex: Exception do
ShowMessage(Ex.ClassName + ' : ' + Ex.Message);
end;
*******************************************************
- Dosya ekleri
-
- soap.wsse.rar
- (8.19 KiB) 154 kere indirildi
Re: HTTPRIO1 epttavm api
@askorbik Delphi uygulamasının ürettiği soap xml'ini alabildiniz mi?
Re: HTTPRIO1 epttavm api
hayır nasıl alınacağı hakkında hiç bir fikrim yok
Re: HTTPRIO1 epttavm api
SoapUI'da mevcut olan metoda tıklayıp mock servis yaratıyorsunuz, size bir endpoint adresi girecek. Uygulamada bu adrese istek gönderirseniz otomatik yakalayacaktır. Diğer bir kolay seçenek proxy yaparak geçen datayı yakalamak.
Re: HTTPRIO1 epttavm api
delphinin ürettiği xml i yakaladım.
delphinin ürettiği xml :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="xhttp://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="xhttp://www.w3.org/2001/XMLSchema" xmlns:xsi="xhttp://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Security xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Timestamp xsi:nil="true"/>
<wsse:UsernameToken xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-">
<wsse:Username>xxxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxx</wsse:Password>
<wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"></wsse:Nonce>
<Created xsi:nil="true"/></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><KategoriListesi xmlns="xhttp://tempuri.org/"/></SOAP-ENV:Body></SOAP-ENV:Envelope> ENV:Envelope>
Çalışan sopaui nın ürettiği xml :
<soapenv:Envelope xmlns:soapenv="xhttp://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-CB6BC389B22B8F46BA15488778794867">
<wsse:Username>xxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password>
<wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">zLEFmVdN9HFIAHwui8xG/g==</wsse:Nonce>
<wsu:Created>2019-01-30T19:51:19.486Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>
delphinin ürettiğinde UsernameToken-CB6BC389B22B8F46BA15488778794867 kısmındaki CB6BC389B22B8F46BA15488778794867 burayı nasıl üretiyor onu bulamadım birde nonce kısmındaki zLEFmVdN9HFIAHwui8xG/g== kısmı nasıl ürettiğini bulamadım. online base64 leri denedim sha-1 denedim ama olmadı.
delphinin ürettiği xml :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="xhttp://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="xhttp://www.w3.org/2001/XMLSchema" xmlns:xsi="xhttp://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Security xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Timestamp xsi:nil="true"/>
<wsse:UsernameToken xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-">
<wsse:Username>xxxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxx</wsse:Password>
<wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"></wsse:Nonce>
<Created xsi:nil="true"/></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><KategoriListesi xmlns="xhttp://tempuri.org/"/></SOAP-ENV:Body></SOAP-ENV:Envelope> ENV:Envelope>
Çalışan sopaui nın ürettiği xml :
<soapenv:Envelope xmlns:soapenv="xhttp://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-CB6BC389B22B8F46BA15488778794867">
<wsse:Username>xxx</wsse:Username><wsse:Password Type="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password>
<wsse:Nonce EncodingType="xhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">zLEFmVdN9HFIAHwui8xG/g==</wsse:Nonce>
<wsu:Created>2019-01-30T19:51:19.486Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>
delphinin ürettiğinde UsernameToken-CB6BC389B22B8F46BA15488778794867 kısmındaki CB6BC389B22B8F46BA15488778794867 burayı nasıl üretiyor onu bulamadım birde nonce kısmındaki zLEFmVdN9HFIAHwui8xG/g== kısmı nasıl ürettiğini bulamadım. online base64 leri denedim sha-1 denedim ama olmadı.
Re: HTTPRIO1 epttavm api
Sanırım kullandığınız kütüphaneleri düzenlemeye çalışmışsınız. Namespace'i değiştirmişsiniz ancak yeterli değil. Başka bir kütüphane ile çalışan bir örnek hazırladım, aşağıdadır.
https://github.com/mkysoft/soap-wsse-sample
https://github.com/mkysoft/soap-wsse-sample
Re: HTTPRIO1 epttavm api
evet doğru düzenlemeye çalıştım ama olmadı. Sizin gönderdiğiniz kod çalışıyor çok teşekkür ederim. Sorunum çözüldü size çok minnettarım.
Re: HTTPRIO1 epttavm api
Ben de minnettarım. Çünkü günlerce uğraştım arkadaş gibi bir çok yol denedim. Üstelik firmanın desteğine ne sorarsan sor bir C# kod örneğini yollamaktan başka hiç bir şey yapmadılar. Delphi den herkes elini çekiyor. Emeğinize sağlık.mkysoft yazdı: ↑31 Oca 2019 11:03 Sanırım kullandığınız kütüphaneleri düzenlemeye çalışmışsınız. Namespace'i değiştirmişsiniz ancak yeterli değil. Başka bir kütüphane ile çalışan bir örnek hazırladım, aşağıdadır.
https://github.com/mkysoft/soap-wsse-sample
-
- Üye
- Mesajlar: 1
- Kayıt: 18 Eyl 2019 04:08
Re: HTTPRIO1 epttavm api
Merhaba bu karşılaşan hatanın aynısını .Net Core 2.2 projesi ile ptt servisine bağlanırken alıyorum. .Net Core için soap header eklemeye çalışarak denemiştim ama hata düzelmedi. .Net Framework ile oluşturulan projede bu hata alınmıyor ama Core üzerinden hata ile karşılaşıyorum. şimdiden teşekkürlermkysoft yazdı: ↑31 Oca 2019 11:03 Sanırım kullandığınız kütüphaneleri düzenlemeye çalışmışsınız. Namespace'i değiştirmişsiniz ancak yeterli değil. Başka bir kütüphane ile çalışan bir örnek hazırladım, aşağıdadır.
https://github.com/mkysoft/soap-wsse-sample