hello guys ,
i am new to webservices , my friend has built a webservice that i need to
use in order to complete my project
i have used this code snippet for the purpose of using this webservice , but
it always keep giving me and exception
when i reach this call : androidHttpTransport.call(SOAP_ACTION, envelope);
please help me in this ... !!
here is my code
import org.ksoap2.SoapEnvelope;
> import org.ksoap2.serialization.SoapObject;
> import org.ksoap2.serialization.SoapSerializationEnvelope;
> import org.ksoap2.transport.HttpTransport;
>
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class androidWebService extends Activity
> {
> private static final String SOAP_ACTION = "";
> private static final String METHOD_NAME = "updateSeats";
> private static final String NAMESPACE = "http://managedBean.jsf.icps/
> ";
> private static final String URL = "
> http://carpooling.kicks-ass.org/test/UpdateSeatsServicePort";
> private Object resultRequestSOAP = null;
>
> @Override
> public void onCreate(Bundle icicle)
> {
> super.onCreate(icicle);
> //setContentView(R.layout.main);
> TextView tv = new TextView(this);
> setContentView(tv);
>
>
> SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
>
>
> //SoapObject
> request.addProperty("1", "John");
>
> SoapSerializationEnvelope envelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
> envelope.setOutputSoapObject(request);
>
>
> HttpTransport androidHttpTransport = new HttpTransport(URL);
> try
> {
> androidHttpTransport.call(SOAP_ACTION, envelope);
> resultRequestSOAP = envelope.getResponse();
> String[] results = (String[]) resultRequestSOAP;
> tv.setText( results[0]);
> }
> catch (Exception aE)
> {
> aE.printStackTrace ();;
> }
> }
> }
--
Regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---