Webservice Http Authentication - KSOAP2 on Android

£可爱£侵袭症+ 提交于 2019-11-29 11:23:10
Bogdan

I hope it is not too late. That is how I access SAP webservice with KSOAP:

List<HeaderProperty> headers = new ArrayList<HeaderProperty>();
headers.add(new HeaderProperty("Authorization", "Basic XXXXXXXXXX"));
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
Object result = null;               
final Object response = androidHttpTransport.call(SOAP_ACTION, envelope, headers);

Replace the XXXXXXXX with the encoded hash of your username and password. To get it just look in soapUI raw header request. Hope it helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!