How to pass parameter value to webservice in android -



How to pass parameter value to webservice in android -

hi friends using ksoap2 in android can tell how pass parameter value webservice in android

thanks

public class androidclientservice extends activity { private static final string soap_action = "http://10.120.10.87:8080/testservice/services/testservice/saveservices"; private static final string operation_name = "saveservices"; private static final string wsdl_target_namespace = "http://10.120.10.87:8080/testservice/services/testservice?wsdl"; private static final string soap_address = "http://10.120.10.87:8080/testservice/services/testservice"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); textview textview = new textview(this); setcontentview(textview); soapobject request = new soapobject(wsdl_target_namespace, operation_name); /* * propertyinfo pi = new propertyinfo(); pi.setname("celcius"); pi.type * = propertyinfo.object_class; pi.setvalue(100); * request.addproperty(pi); */ request.addproperty("number", "8806007"); soapserializationenvelope envelope = new soapserializationenvelope( soapenvelope.ver11); envelope.dotnet = true; envelope.setoutputsoapobject(request); httptransportse httptransport = new httptransportse(soap_address); seek { httptransport.call(soap_action, envelope); object response = envelope.getresponse(); textview.settext(response.tostring()); } grab (exception exception) { textview.settext(exception.tostring()); } }

}

refer : webservice

android

Comments

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -