Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6071285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:01:47+00:00 2026-05-23T10:01:47+00:00

In my web services program I am getting the response as a string value

  • 0

In my web services program I am getting the response as a string value to the logcat. the value is 1 if its success and 0 if its failure and -1 if field is empty.

I want to Parse my response answer(0 ,1) to store in a local variable and I want to show the alert like

 if(result==1)
                 {
           show the alert"Registered"
}

else if(result==0){
    show alert"Try Again"
}

else if(result == -1)
{
show alert "Field is empty"
}

How ever showing the alert is easy, but as I am new to web services, I don’t know how to parse the result and store in a local variable. someone please help me to solve this

Help is always appreciated….!

         request.addProperty("email", email);
        request.addProperty("contact", contact);
        request.addProperty("fname", fname);
        request.addProperty("lname", lname);
        request.addProperty("gender", gender);
        request.addProperty("dateofbirth", dob);
        request.addProperty("password", password);
        request.addProperty("latitude", "76");
        request.addProperty("longitude", "82");
        request.addProperty("device_id", "12345"); 

            aht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); 
            aht.call(SOAP_ACTION, soapEnvelope);

            SoapObject resultsRequestSOAP = (SoapObject) soapEnvelope.bodyIn;
            Log.v("TAG", String.valueOf(resultsRequestSOAP));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:01:48+00:00Added an answer on May 23, 2026 at 10:01 am

    You can use Sax parsing,Dom parsing or other two parsing method if you have simple xml file in the web.If you work with complex web page then you can use Jsoup.here i told how to use jsoup to parse any kind of data from any pages

    here is the link of how you can use SAX/DOM for simple XML file parsing

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to consume an external web service from my VB6 program. I want
I have been working on a Android Web Services program that uses a number
I'm dynamically calling web services in my program using the WSProxy class here ,
In my program i am using postmethod to call the web services . But
I'm going to be writing a program which has some web services in it
I have a web service I'm trying to load test. I created a program
I have a client program that consumes a web service. It works quite well
I have an ASP.NET web service that I can access via a windows program
Our web services are distributed across different servers for various reasons (such as decreasing
With web services it is considered a good practice to batch several service calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.