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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:52:18+00:00 2026-05-24T10:52:18+00:00

How to process Data table in android>My service return dataTable.How to handle it? public

  • 0

How to process Data table in android>My service return dataTable.How to handle it?

public static final String APPURL = "http://192.168.1.213:6969/MySalesServices";    
private static final String METHOD_NAME = "SalesList";
private static final String NAMESPACE = "http://tempuri.org/"; 
private static String SOAP_ACTION = "http://tempuri.org/IMySalesServices/SalesList";

 SoapPrimitive responsePrimitive = null;
ArrayList<String> tablesName = new ArrayList<String>();
 public void onCreate(Bundle savedInstanceState) {
      ..................

  }

  public SoapPrimitive soapPrimitive(String METHOD_NAME, String SOAP_ACTION,String NAMESPACE, String URL) throws IOException,   XmlPullParserException {
    SoapPrimitive responses = null;
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); // set up
    request.addProperty("strExec", strExecutive);
    request.addProperty("strBusinessUnit", strBusinessUnit);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); // put all required data into a soap
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);
    httpTransport.debug = true;

    try {
        httpTransport.call(SOAP_ACTION, envelope);
        responses = (SoapPrimitive) envelope.getResponse();

        }catch(SocketException ex){
            ex.printStackTrace();
        } catch (Exception e) {
           e.printStackTrace();
        }

    return responses;
}

I got following error :

   AnyType{element=anyType{complexType=anyType{choice=anyType{element=anyType{complexType=anyType{sequence=anyType{element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; }; }; }; }; }; }; }

please help me

  • 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-24T10:52:18+00:00Added an answer on May 24, 2026 at 10:52 am

    You return the Method type as String & concert it Datatable to Json as String that is good way to do & easy

      //Converting table to json
        public String ConverTableToJson(DataTable dtDownloadJson)
        {
            string[] StrDc = new string[dtDownloadJson.Columns.Count];
            string HeadStr = string.Empty;
    
            if (dtDownloadJson.Rows.Count > 0)
              {
    
                for (int i = 0; i < dtDownloadJson.Columns.Count; i++)
                {
    
                    StrDc[i] = dtDownloadJson.Columns[i].Caption;
                    HeadStr += "\"" + StrDc[i] + "\" : \"" + StrDc[i] + i.ToString() + "¾" + "\",";
                }
             if (HeadStr.Length > 0)
                {
                    HeadStr = HeadStr.Substring(0, HeadStr.Length - 1);
                    StringBuilder Sb = new StringBuilder();
                    Sb.Append("{\"" + dtDownloadJson.TableName + "\" : [");
    
                    for (int i = 0; i < dtDownloadJson.Rows.Count; i++)
                    {
    
                        string TempStr = HeadStr;
                        Sb.Append("{");
    
                        for (int j = 0; j < dtDownloadJson.Columns.Count; j++)
                        {
                            TempStr = TempStr.Replace(dtDownloadJson.Columns[j] + j.ToString() + "¾", dtDownloadJson.Rows[i][j].ToString());
                        }
    
                        Sb.Append(TempStr + "},");
                    }
    
                    Sb = new StringBuilder(Sb.ToString().Substring(0, Sb.ToString().Length - 1));
                    Sb.Append("]}");
                    return Sb.ToString();
                }else
                {
                 return "0";
                }
              }
               else
               {
                   return "0";
               }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing an ajax work where web service will return data and on client
i have little problem with boost::asio library. My app receive and process data asynchronously,
I am going to develop an application which will process online data (comming through
In my web application there is a process that queries data from all over
I have a kernel module that provides data to a userland process through read().
I need to have a process that compiles daily data into an PDF that
What is a good way to render data produced by a Java process in
I have a process in a website (Asp.net 3.5 using Linq-to-Sql for data access)
I'm trying to read the data in a Win32 ListView owned by another process.
I'd like a bit of advice on how to retrieve, process and store data.

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.