hi, i am trying to access to server. but i'm getting an error in
the HttpTransportSE. i have added the jar for ksoap also. Below i will
mention the whole code.
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 web extends Activity {
private static final String METHOD_NAME = "AuthenticateUser";
private static final String NAMESPACE =
"http://exalt.com/webservices/AuthenticateUser";
private static final String URL =
"http://202.88.239.14:81/yoddleservice/yoddlewebservice.asmx?op=AuthenticateUser";
TextView tv;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv=(TextView)findViewById(R.id.text);
call();
}
private void call() {
try {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("username", "password");
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
Object result = (Object)envelope.getResponse();
tv.setText(result.toString());
} catch (Exception e) {
tv.setText(e.getMessage());
}
}
Any suggestions?
Thanks in advance
--
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