Yes I got it now. I just confused by refer some sample codes. So we have to write those classes. Thanks a lot. Also i have one more doubt in ksoap2. I tried to connect the android application to PHP. But it seems no response. Let me know what I did wrong...
---------
package com.org.WebTest;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class WebTest extends Activity {
/** Called when the activity is first created. */
private static final
String SOAP_ACTION = "HelloYou";
private static final String METHOD_NAME = "getHello";
private static final String NAMESPACE = "urn:HelloYou";
private static final String URL = "http://115.240.187.197/mypro/services.php";
private Object resultsRequestSOAP = null;
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
TextView tv = new TextView(this);
setContentView(R.layout.main);
// final TextView ot=(TextView)findViewById(R.id.tvv);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//SoapObject
request.addProperty("firstname", "prasanna");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try
{
androidHttpTransport.call(SOAP_ACTION, envelope);
resultsRequestSOAP = envelope.getResponse();
String[] results = (String[]) resultsRequestSOAP;
tv.setText( results[0].toString());
}
catch (Exception aE)
{
aE.printStackTrace ();
tv.setText(aE.toString());
}
}
-----
my PHP code is :
<?php
echo "prasanna";
?>
-------