What is the function of Web Service in Android
Most people do not understand the knowledge points of this article "what is the role of Web Service in Android", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the role of Web Service in Android" article.
Android mobile phone platform actually has limited resources and can not do a lot of calculation and storage. For complex application guides are deployed on remote servers, and in order to allow Android applications to interact with remote servers, Web Service is a good choice
Web Service is mainly related to SOAP,WSDL,UDDI
SOAP
Simple object access Protocol is an oil extensible XML message protocol. SOAP allows one application to send XML messages to another. A SOAP message is an one-way message from a SOAP sender to a SOAP receiver. Any application can act as a sender or receiver. SOAP can be transmitted over HTTP,JMS or SMIT protocols.
WSDL
Web Service description language, using XML to describe Web Service, including information necessary to access and use Web Service, defining the location, function, and how to communicate of the Web Service
UDDI
Unified description, discovery and integration of protocols, it has two characteristics: based on web and distributed
To get Web Service data
Create a HttpTransportSE object that invokes the Web Service operation in Crescent Lake
Create a SoapSerializationEnvelope object
To create a SoapObject object, you need to pass in the namespace and the name of the Web Service method to call Web Service.
If there are parameters that need to be passed to the Web Service server, call the addProperty method of the SoapObject object to set the parameters
Call the setOutPutSoapObject method of SoapSerializationEnvelope
Call the call method and call the remote Web Service with SoapSerializationEnvelope as a parameter
After the call is completed, access the bodyIn property of the SoapSerializationEnvelope object and return a SoapObject object, which represents the return message of Web Service. You can get the return value of calling Web Service by parsing the object.
The above is about the content of this article on "what is the role of Web Service in Android". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.