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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:16:43+00:00 2026-05-13T10:16:43+00:00

I am using KSOAP2 to call a .NET webservice from android application,and the response

  • 0

I am using KSOAP2 to call a .NET webservice from android application,and the response from the web service is in the following format

anyType{
UserName=anyType{}; 
Password=anyType{}; 
ApplicationCode=JOB; 
ActionType=Query; 
MessageParameters=anyType{Parameters=anyType{}; }; 
TableData=anyType{TableNo=167; 
          TableName=Job; 
      DataRows=
      anyType{
        DataRow=
          anyType{
             DataRowValues=
            anyType{
                DataRowValue=
                anyType{
                    FieldNo=1; 
                    FieldName=No.; 
                    PrimaryKey=true; 
                    FieldType=Code20; DataValue=DEERFIELD, 8 WP; 
                       };
               DataRowValue=
                anyType
                       {
                    FieldNo=3; 
                    FieldName=Description; 
                    PrimaryKey=false; 
                    FieldType=Text50; 
                    DataValue=Setting up Eight Work Areas; 
                       };
             DataRowValue=
                anyType
                       {
                    FieldNo=4; 
                    FieldName=Description 2; 
                    PrimaryKey=false; 
                    FieldType=Text50; 
                    DataValue=anyType{}; 
                       }; 
                }; 
              }; 
           }; 
       }; 
    }; 
 ResponseForRequest=GETTABLEDATA; 
 CustomIdentifier=TestBB; 
Applications=anyType{}; 
Forms=anyType{}; 
Menu=anyType{}; 
}

I am not aware about the format of this response and i don’t know how to parse this response to get particular result.Any one knows about it please help me.

Note: i manually formatted this response for your understanding.

  • 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-13T10:16:43+00:00Added an answer on May 13, 2026 at 10:16 am

    Actually this a known format if you know Java Script.These data in this format are infact JSON Object‘s and JSON Array‘s. I hope you are using the KSOAP2 library.So here is how you can parse this result.

    eg:

    private Bundle bundleResult=new Bundle();
    private JSONObject JSONObj;
    private JSONArray JSONArr;
    Private SoapObject resultSOAP = (SoapObject) envelope.getResponse();
    /* gets our result in JSON String */
    private String ResultObject = resultSOAP.getProperty(0).toString();
    
    if (ResultObject.startsWith("{")) { // if JSON string is an object
        JSONObj = new JSONObject(ResultObject);
        Iterator<String> itr = JSONObj.keys();
        while (itr.hasNext()) {
            String Key = (String) itr.next();
            String Value = JSONObj.getString(Key);
            bundleResult.putString(Key, Value);
            // System.out.println(bundleResult.getString(Key));
        }
    } else if (ResultObject.startsWith("[")) { // if JSON string is an array
        JSONArr = new JSONArray(ResultObject);
        System.out.println("length" + JSONArr.length());
        for (int i = 0; i < JSONArr.length(); i++) {
            JSONObj = (JSONObject) JSONArr.get(i);
            bundleResult.putString(String.valueOf(i), JSONObj.toString());
            // System.out.println(bundleResult.getString(i));
        } 
    }
    

    Initially i had a lot of trouble with this kind of data but finally i got it all working.From then I have been using this.I hope this helps you solve your problem.

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

Sidebar

Related Questions

I am using Ksoap from Android to access a .net web service. The wsdl
Possible Duplicate: Parsing ksoap2 response So I managed to call a webservice using KSoap2
I developed a webservice in .net and I'm trying to call it in Android.
i am using ksoap library to call webservice in android. i dont see request
has any one been able to connect to a soap server using ksoap2 android
I want to develop a application on Android platform to connect to salesforce. From
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using JDeveloper , I started developing a set of web pages for a project

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.