简体   繁体   中英

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.

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.

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:

      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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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