简体   繁体   English

不含KSoap2和其他Jar库的Android和.Net WebServices

[英]Android And .Net WebServices With Out KSoap2 and Other Jar Libraries

I Need to learn to ask .net webservices using android native objects you know sometutorial or site to learn step by step SOAP Protocols and WebServices or can you get me an example code with a request/response to .net WebService passing SomeImput PArameters. 我需要学习使用熟悉的android本地对象来询问.net web服务,以逐步学习SOAP协议和WebServices,或者可以通过传递SomeImput参数对.net WebService进行请求/响应的示例代码。

Thanks 谢谢

android doesnt provide any built in libraries to call webservice.But after googling i have find the below link in which writer describes how to call soap webservices without using third party libraries and with android native API's. android没有提供任何内置库来调用webservice。但是在谷歌搜索后,我发现下面的链接,其中作者描述了如何在不使用第三方库和android native API的情况下调用soap webservices。

http://android-pro.blogspot.in/2011/06/calling-soap-web-services-with-android.html http://android-pro.blogspot.in/2011/06/calling-soap-web-services-with-android.html

With kSoap2, I am able to call soap webservices like this: 使用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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM