Android: Reading xml from .NET webservice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    Android: Reading xml from .NET webservice

    Hi

    I found a perfect example of using a web service

    http://wowjava.wordpre ss.com/2011/01/16/login-application-for-android/

    Really good tutorial.

    I have implemented this and it works perfect the only problem is that once I get a response back the string reads the whole XML response created by the webservice.

    Code:
    try
    				{
    					response = CustomHttpClient.executeHttpPost("http://jonathan.dev.pushplay.co.za/ppws.asmx/signIn", postParameters);
    					String res = response.toString();
    					res= res.replaceAll("\\s+","");
    					if (res.equals("true"))
    					{
    						set.setText("Logged in achieved");
    					}else
    					{
    						set.setText("boom");
    					}
    				}catch(Exception ex)
    				{
    					Log.e(response, ex.toString());
    				}
    here is what the string consists of once executed

    <boolean xmlns="http://www.pushplay.co .za/webservice">fal se</boolean>

    How do I get it just to use the variable that I need which is only the false.
Working...