On Sun, Sep 9, 2012 at 3:48 AM, TreKing <[email protected]> wrote:

> On Sat, Sep 8, 2012 at 3:44 AM, rauf qureshi <[email protected]>wrote:
>
>> i am troubling with above code
>
>
> Learn to debug your own code or post a *small* sample of code with a *
> clear* explanation of the problem you're having.
>
> Posting a giant blob of code with nothing more than "I have a problem with
> this" is a fantastic way to get ignored.
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>
>

public class LoginService extends Service
{
 String url="http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php";;
String NAME_SPACE="http://demo3.idhasoft.us/iLoyal";;
String SOAP_METHOD="customer.login";
String SOAP_ACTION="
http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.login";;
 @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
 try{
 SoapObject result=(SoapObject)getWeather();
System.out.println("result  "+result.toString());
}
    catch(Exception e)
{
System.out.println("exp in soap "+e);
}
 stopService(intent);
}
public SoapObject getWeather() throws Exception
{
    SoapObject request = new SoapObject(NAME_SPACE , SOAP_METHOD);

        PropertyInfo id=new PropertyInfo();
id.setName("email");
id.setValue("[email protected]");
id.setType(String.class);
request.addProperty(id);


PropertyInfo pass=new PropertyInfo();
pass.setName("password");
pass.setValue("12345678");
pass.setType(String.class);
request.addProperty(pass);


PropertyInfo website=new PropertyInfo();
website.setName("website");
website.setValue("base");
website.setType(String.class);
request.addProperty(website);

    SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);


            envelope.setOutputSoapObject(request);
            transport.call(SOAP_ACTION, envelope);
              return  (SoapObject) envelope.getResponse();

}


@Override
public void onDestroy()
{
// TODO Auto-generated method stub
super.onDestroy();
System.out.println("destroy me aaya");
}

}


Hello treking,

         In above code i have soap api when i use addProperty method it
take parameter in following format

             customer.login{[email protected]
;password=12345;website=base;}

           but i want to send request in the following format
             {"email":"[email protected]
","password":"12345","website":"base"}

now can you please tell me the solution.
Thanks

-- 
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

Reply via email to