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

  • SEARCH
  • Home
  • 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 8787849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:59:44+00:00 2026-06-13T21:59:44+00:00

So far I’ve managed to connect to a Web Service and get my SoapObject

  • 0

So far I’ve managed to connect to a Web Service and get my SoapObject response, but I’m having trouble narrowing down a good, clean way of parsing. Searching the Internet hasn’t really yielded much results, everyone has a different way and different process usually geared towards their own Web Service making it a one time use type of solution. Basically, below is the response that I get from a Web Service

anyType{
 schema=anyType{
  element=anyType{
   complexType=anyType{
    choice=anyType{
     element=anyType{
      complexType=anyType{
       sequence=anyType{
        element=anyType{}; 
           element=anyType{}; 
            element=anyType{}; 
              element=anyType{}; }; }; }; }; }; }; };   
      diffgram=anyType{
         NewDataSet=anyType{
          Rep_x0020_Information=anyType{
            Login=CorrectLogin; Password=InCorrectPass; }; }; }; }

And basically I want to be able to parse out just the two important fields (Login and Password). From what I read I tried just iterating through the SoapObject response based on the property count but that doesn’t seem to work. When I tried I get a property count of 2 for the response so instead I ended up doing some thing like this below:

SoapObject response=(SoapObject) envelope.getResponse();

                if  (response != null) {
                    Log.i("Message", "the response contains: " + response.toString());
                    SoapObject diffgram = (SoapObject) response.getProperty("diffgram");
                    SoapObject NewDataSet = (SoapObject) diffgram.getProperty("NewDataSet");
                    SoapObject RepInfo = (SoapObject) NewDataSet.getProperty("Rep_x0020_Information");
                    for (int i = 0; i < RepInfo.getPropertyCount(); i++) {
                        PropertyInfo info = new PropertyInfo();
                        RepInfo.getPropertyInfo(i, info);
                        Log.d("Info", info.name + " : " + RepInfo.getProperty(i).toString());
                    }


 //which gives the following message in LogCat
  D/Info(716): Login : InCorrectLogin
  D/Info(716): Password : InCorrectPass

This process works, as by the last loop I get the two objects I want but I just feel like there’s a cleaner way of doing this. I only ask because as I get further into this App there will be some more complex Web Service calls being made and I want to be able to have something that is reusable throughout the app instead of having to build several SoapObjects for each request just to get down to the objects I want.

  • 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-06-13T21:59:46+00:00Added an answer on June 13, 2026 at 9:59 pm

    There are 2 ways to parse object from web service:
    First, assume you are a web service owner or creator, you can make web service return a Json string, then from client, you can create an entity map to Json, and Json library will take care parsing for you.

    Second: web service usually response many complex objects, so you can make entities to map with these objects.
    You can follow this tutorial to understand how to map a simple object, then go to my answer from this question to know parsing the complex object.
    It’s just something like this:

     HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
     androidHttpTransport.call(SOAP_ACTION, envelope);// call
     Entity entity = (Entity)envelope.bodyIn;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

as far as I can get gowalla auth code response contains both expires_at and
As far as I know, C2DM is per app per device thing..but my question
So far i have the following code, but it doesn't seem to be working,
So far I've got the following regex that matches against regular domains but not
So far I have not been able to find an answer, but I wanted
So far I've got: :notice :alert :error but is there definitive list, that can
So far I got this program to run but I got stock in this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
So far, my experience in web design has been with very small scale sites
So far it seems that importing a service reference in VS2012 with generate task-based

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.