Android Connecting To WebServices
Android Connecting To WebServices
4/10/12
What is SOAP?
Web Service.
4/10/12
important: The Web Service Namespace The Web Service Method Name The Web Service URL
4/10/12
and is called SOAP_ACTION, but that is basically a concatenation of the Namespace and Method name: SOAP_ACTION = NAMESPACE + METHOD_NAME;
4/10/12
SoapObject(NAMESPACE, METHOD_NAME);
4/10/12
Passing Parameters
Parameters in KSOAP are passed
4/10/12
Creating Object for Soap Envelop SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); Assigning Parameters : envelope.setOutputSoapObject(request);
4/10/12
result: AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); SoapObject response = (SoapObject)envelope.bodyIn; String result = response.getProperty(0).toString(); } catch(Exception e) { e.printStackTrace();
4/10/12
4/10/12