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 6196217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:36:21+00:00 2026-05-24T03:36:21+00:00

I am using KSoap2 for calling web-services for my Android app. I am using

  • 0

I am using KSoap2 for calling web-services for my Android app. I am using following code to call the web-service.

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("PageSize", 20);
request.addProperty("PageIndex", currentPage);

SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(request);
HttpTransportSE aht = new HttpTransportSE(URL);

try {
  aht.call(SOAP_ACTION, soapEnvelope);
  SoapObject result = (SoapObject) soapEnvelope.getResponse();

  Log.d("resBundle", String.valueOf(resBundle)); 

  int elementCount = resSoap.getPropertyCount();
  for(int i = 0;i<elementCount;i++){
    /////////////////////how to get the property name here////////////////
  }

}catch (Exception e) {
  e.printStackTrace();
  return null;
}

I am getting response from the web-services perfectly. The String.valueOf of response is below:

anyType{NewsID=2186; NewsSubject=Lil Wayne Shows Up to Heat Game With Mystery Chick & Drake; NewsDetail=Looks like Weezy found him a main chick! Lil Wayne showed off his mystery girl yet again, this time at the Miami Heat Eastern Conference Finals game. Wanye looked proud to be with his girl while he kept his arm around her for most of the game. Drake was also in attendance with Wanye and it looks like he was having a great time cheering on the Heat as they beat the Bulls in overtime. Chad Ochocinco was also spotted enjoying the game, but Evelyn was no where to be seen. Check out more pics from the Miami game:; NewsArtist=494; ModifiedDate=2011-05-26T12:03:04.567+01:00; CreateDate=26 May, 2011 12:03PM; ImageName=26052011120304.jpg; ImageAlt=anyType{}; ShortNewsDetail=Looks like Weezy found him a main chick! Lil Wayne showed off his mystery girl y; }

Now, I can easily get the value of property easily, but I also want to get the name property (e.g. NewsID, NewsSubject, NewsArtist, ModifiedDate). How do I get the name of the property?

  • 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-24T03:36:22+00:00Added an answer on May 24, 2026 at 3:36 am

    Where you loop trough your response you can get access to the PropertyInfo from the difrent property’s. I used the following setup to get the names of the parameters and the values that go with them:

    //Inside your for loop
    PropertyInfo pi = new PropertyInfo();
    resSoap.getPropertyInfo(i, pi);
    Log.d(TAG, pi.name + " : " + resSoap.getProperty(i).toString());
    

    This creates a PropertyInfo object, adds the information from the property in that object and then gives you access to all this information. And then prints it to your LogCat in the format off “propertyname : propertyvalue”

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

Sidebar

Related Questions

Calling a .net SOAP1.1 web service from android using ksoap2 lib I met a
I have an Android app that fetches data from the web service using ksoap2,
I am consuming a dotnet webservice on android code using ksoap2.I can successfully call
I'm using ksoap2 for web service method calls. I used ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar and was able
I'm using ksoap2-android to make a call to wcf service over SSL. I can
I am using ksoap2 to operate an azure web service, and the service uses
I am using ksoap2 API to call .net webservices from Android. I am getting
I am using ksoap2 library for connecting to a wcf web service. When I
I'm trying to do web service using android. I created the web service using
i am using ksoap library to call webservice in android. i dont see request

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.