[英]How to call asp.net web service in android java?
Hi Everyone, How to call asp.net web service using android my web service is having fnsendsms(phoneno,message) on click of sendsms button i want to call fnsendsms function how to call that using java for that i have to download any jar files please help我謝謝。
首先,下載ksoap2 android jar。 然后您可以調用 web 服務,如:
SoapObject request = new SoapObject(YOUR_CONNECTION_NAMESPACE, methodName);
//add parameters to web service method..
request.addProperty(parameterName, parameterValue);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(YOUR_CONNECTION_URL);
androidHttpTransport.call(YOUR_ACTION_NAME, envelope);
result = (Object) envelope.getResponse();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.