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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:03:10+00:00 2026-05-24T07:03:10+00:00

I am using the KSoap2 for communicating with the server. The communication is fine

  • 0

I am using the KSoap2 for communicating with the server. The communication is fine and returns a set of values that i have mentioned below. I am not sure with the way i am handling the response. I wrote a separate java class that implements KvmSerializable for mapping the XML objects with the java objects. After a long research in the web, i found the use of the parser like SAX, DOM ..etc is more standard and flexible.

Is there any way i can bring the SAX for parsing the following response… if so,please provide some references..

This is the response that i got after i send a request to the server from my android client app. Please note, This response is not ended with .xml / returns as a .xml file.

This is the webclient response :

http://134.1.10.5/Maxima/MaximaSystem.asmx/ValidateLogin

<DataSet>
<xs:schema id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="UserIcode" type="xs:int" minOccurs="0"/>
<xs:element name="UserUserName" type="xs:string" minOccurs="0"/>
<xs:element name="UserPassword" type="xs:string" minOccurs="0"/>
<xs:element name="UserTypeICode" type="xs:int" minOccurs="0"/>
<xs:element name="ProfileTable" type="xs:string" minOccurs="0"/>
<xs:element name="UserTypeDesc" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

<diffgr:diffgram>

<NewDataSet>
<Table diffgr:id="Table1" msdata:rowOrder="0">
<Name>Frecan </Name>
<UserIcode>634</UserIcode>
<UserUserName>dairy</UserUserName>
<UserPassword>dairy123</UserPassword>
<UserTypeICode>632</UserTypeICode>
<ProfileTable/>
<UserTypeDesc>Dentist</UserTypeDesc>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>

This is the response. No XML Tags …anything…Please suggest the best way that i can parse it using the native parser of Android. If so, Please provide some references.

This is the sample of the response that i get, when i ping server through Android Client

 anyType{schema=anyType{element=anyType{complexType=anyType{choice=anyType{element=an
 yType{complexType=anyType{sequence=anyType{element=anyType{....
 // some values ........
 };
 element=anyType{};
 element=anyType{}; element=anyType{}; element=anyType{};     element=anyType{}; 
 element=anyType{}; }; }; }; }; };unique=anyType{selector=anyType{};
 field=anyType{};}; }; }; diffgram=anyType{}; }

Please let me know, is it possible to use native parsers in Android.

Thanks in Advance.

  • 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-24T07:03:10+00:00Added an answer on May 24, 2026 at 7:03 am
    SoapObject result = (SoapObject)envelope.bodyIn;
    
        if(result != null){
    
            int count = result.getPropertyCount();
            //TextView t = (TextView)this.findViewById(R.id.resultbox);
            //t.setText("SOAP response:\n\n" + count);
    
            SoapObject nameResult = (SoapObject) result.getProperty(0);
            // TextView t = (TextView)this.findViewById(R.id.resultbox);
            //t.setText("SOAP response:\n\n" + nameResult.toString());
    
            SoapObject test = (SoapObject) nameResult.getProperty(1);
            // TextView t = (TextView)this.findViewById(R.id.resultbox);
            // t.setText("SOAP response:\n\n" + test.toString());
    
            SoapObject dar = (SoapObject) test.getProperty(0);
            //TextView t = (TextView)this.findViewById(R.id.resultbox);
            //t.setText("SOAP response:\n\n" + dar.toString());
    
            SoapObject suvas = (SoapObject) dar.getProperty(0);
            int c = dar.getPropertyCount();
            TextView t = (TextView)this.findViewById(R.id.resultbox);
            t.setText("SOAP response:\n\n" + suvas.toString());
            //t.setText("SOAP response:\n\n" + c);
            //SoapObject nivas = (SoapObject) suvas.getProperty(NewsId);
            //TextView t = (TextView)this.findViewById(R.id.resultbox);
            // t.setText("SOAP response:\n\n" + nivas.toString());
    
        }
    

    First you have to get a soap response in soapObject and then after that count the total property.

    After getting count, please check one by one in which property you have your data ,
    you can also implement an inner loop.

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

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I have looked at several tutorials using android and ksoap2. My service works fine
I have an Android app that fetches data from the web service using ksoap2,
i am using following webservices for retrieving data from server server side:.net client side:ksoap2
I have an Android application that displays a list of names using checkboxes. I
I'm using ksoap2-Android on an Android project to upload a file. It's not working.
I have an android application acessing an webservice that returns a big result. The
has any one been able to connect to a soap server using ksoap2 android
I have written an app which fetches data from a server. I am not
Using online interfaces to a version control system is a nice way to have

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.