package com.example.splashscreentest;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.IBinder;

public class RegistrationService extends Service{
 String SOAP_ACTION="
http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.addIloyalCustomer
";
String SOAP_METHOD="customer.addIloyalCustomer";
String NAME_SPACE="http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php";;
String url="http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/?wsdl";;

@Override
public IBinder onBind(Intent intent)
{
//TODO Auto-generated method stub
return null;
}

@Override
public void onStart(Intent intent, int startId)
{
//TODO Auto-generated method stub
super.onStart(intent, startId);
try{
     SoapObject result=(SoapObject)getWeather();
     System.out.println(""+result.toString());
}catch(Exception e)
{
System.out.println("exception in soap   "+e);
}
     stopService(intent);
}
public SoapObject getWeather() throws Exception
{
    SoapObject request = new SoapObject(NAME_SPACE, SOAP_METHOD);
    //request.addProperty("PlaceName", city);
        request.addProperty("firstname", "rauf");
        request.addProperty("lastname", "qureshi");
        request.addProperty("email", "rauf.qure...@gmail.com");
        request.addProperty("password", "12345");
        request.addProperty("mobile", "8286459963");
        request.addProperty("DOB", "15/04/88");
        request.addProperty("zipcode", "400092");

    SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    // It seems that it is a .NET Web service because it doesn't work
without next line
    envelope.dotNet = true;

    HttpTransportSE transport = new HttpTransportSE(url);
    System.out.println("service me conncetion checking se pahle aaya");

//    ConnectivityManager cm = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
//        NetworkInfo netInfo = cm.getActiveNetworkInfo();
//
//        if (netInfo != null && netInfo.isConnectedOrConnecting())
//        {
//           System.out.println("connected"+netInfo.getExtraInfo());
//        }
//        else
//        {
//        System.out.println("not connceted");
//        }

    System.out.println("request   "+request);
        System.out.println("1=================================");
    transport.call(SOAP_ACTION, envelope);
    System.out.println("2=================================");
    return (SoapObject) envelope.getResponse();
}
@Override
public void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
 }

}

I am getting this problem can any body solve it
org.xmlpull.v1.xmlpullparserexception expected start_tag


Thnaks 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to