S svein berg Member Licensed User Longtime User Jun 21, 2016 #1 Hi. I try to connect to my web service with SOAP. Using HTTP: is working fine, but excat same code is not working when calling HTTPS: ? I have libraries; Network 1.51 OKHttp 1.01 In Process_Global; Dim myhttp As OkHttpClient Dim Myreq As OkHttpRequest In Create; 'myhttp.Initialize ("Http1") myhttp.InitializeAcceptAll("Http1") In a button click; Myreq.InitializePost2("https://My.Adress/wip/wipv1.asmx",Autenticate("123","123").GetBytes("UTF-8")) Myreq.SetContentEncoding ("UTF-8") Myreq.SetContentType("application/soap+xml;charset=UTF-8;action=""http://My.Adress/wip/v1/AuthenticateEmployee""") myhttp.Execute(Myreq,1) This works fine with either of the .initialize i create. But just changing the "Http:" in line 1 in button click to "Https:" and the APP isnt sending anything. ?? Can anyone help?? regards svein
Hi. I try to connect to my web service with SOAP. Using HTTP: is working fine, but excat same code is not working when calling HTTPS: ? I have libraries; Network 1.51 OKHttp 1.01 In Process_Global; Dim myhttp As OkHttpClient Dim Myreq As OkHttpRequest In Create; 'myhttp.Initialize ("Http1") myhttp.InitializeAcceptAll("Http1") In a button click; Myreq.InitializePost2("https://My.Adress/wip/wipv1.asmx",Autenticate("123","123").GetBytes("UTF-8")) Myreq.SetContentEncoding ("UTF-8") Myreq.SetContentType("application/soap+xml;charset=UTF-8;action=""http://My.Adress/wip/v1/AuthenticateEmployee""") myhttp.Execute(Myreq,1) This works fine with either of the .initialize i create. But just changing the "Http:" in line 1 in button click to "Https:" and the APP isnt sending anything. ?? Can anyone help?? regards svein
Reviewnow Active Member Licensed User Longtime User Jun 21, 2016 #2 Your web service first has to accept HTTPS and be a valid certificate your soap web service code has to be changed <WebService(Namespace:=https://My.Address)> _ Use the InitializeAcceptAll("Http1") Upvote 0
Your web service first has to accept HTTPS and be a valid certificate your soap web service code has to be changed <WebService(Namespace:=https://My.Address)> _ Use the InitializeAcceptAll("Http1")
Erel B4X founder Staff member Licensed User Longtime User Jun 21, 2016 #3 Don't use OkHttpClient. You should instead use OkHttpUtils2. Modify HttpUtil2Service and call InitializeAcceptAll: https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content If it doesn't work then please post the error message from the logs. Note that it will fail if the server's supported protocols are too old. Upvote 0
Don't use OkHttpClient. You should instead use OkHttpUtils2. Modify HttpUtil2Service and call InitializeAcceptAll: https://www.b4x.com/android/forum/threads/okhttp-replaces-the-http-library.54723/#content If it doesn't work then please post the error message from the logs. Note that it will fail if the server's supported protocols are too old.