[英]Error in application android to fetch data in the database postgreSQL by WebServices with Ksoap2
[英]Android And .Net WebServices With Out KSoap2 and Other Jar Libraries
我需要学习使用熟悉的android本地对象来询问.net web服务,以逐步学习SOAP协议和WebServices,或者可以通过传递SomeImput参数对.net WebService进行请求/响应的示例代码。
谢谢
android没有提供任何内置库来调用webservice。但是在谷歌搜索后,我发现下面的链接,其中作者描述了如何在不使用第三方库和android native API的情况下调用soap webservices。
http://android-pro.blogspot.in/2011/06/calling-soap-web-services-with-android.html
使用kSoap2,我可以这样调用soap网络服务:
SoapObject request = new SoapObject(AppConstants.NAMESPACE, AppConstants.METHOD_NAME_GetLiveCalls);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
//androidHttpTransport.debug = true;
androidHttpTransport.call(AppConstants.SOAP_ACTION_GetLiveCalls, envelope);
SoapPrimitive result = (SoapPrimitive)envelope.getResponse();
response = result.toString();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.