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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:00:37+00:00 2026-06-14T09:00:37+00:00

I created an asp.net web service that has two methods the first is getBoughtApps(String

  • 0

I created an asp.net web service that has two methods the first is getBoughtApps(String imei)
and the other one is getAllApps() . The service name is ArttechApps . I need a code that invokes these methods using java or android
can anyone 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-06-14T09:00:38+00:00Added an answer on June 14, 2026 at 9:00 am

    You should write a middleware service that returns xml or json to your client.

    Create a new web project, on your iis with receiver.aspx

    Clear your aspx file codes, only left,

     <%@ Page Language="C#" AutoEventWireup="true" CodeFile="receiver.aspx.cs" Inherits="receiver" %>
    

    Then your code page (.cs file)

    add your service to this project

    on pageload

     if (Request.QueryString["ID"] != null)
     {
            string id = Request.QueryString["id"]; // ID parameter will be taken from your client.I will explain.
    
            if (id == "getBoughtApps")
            {
               string imei= Request.QueryString["imei"];  
               // IMEI parameter will be taken from your client.I will explain.
    
                // Use your service method here then create an xml and write 
                // look at Example below 
    
                DataSet ds = SqlHelper.ExecuteDataset(connStr, CommandType.StoredProcedure, sp_Get_BoughtApps"
                    , new SqlParameter("@imei", imei));
    
                string str = @"<?xml version=""1.0"" encoding=""utf-8"" ?><test>";
    
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    str += "<item>";
                    str += "<ID>" + dr["ID"].ToString() + "</ID>";
                    str += "<appName>" + dr["appName"].ToString() + "</appName>";
                    str += "</item>";
                }
    
                str += @"</test>";
    
                Response.Write(str); // it returns an xml and your client will catch it
            }
    
            if (id == "getAllApps")
            {
                  // write your code
            }
        }
    

    On your client side:

    private class asynGetBoughtApps extends AsyncTask<String, Void, Integer> {
        protected Integer doInBackground(String... params) {
            try {
                final Uri.Builder uri = new Uri.Builder();
                uri.scheme("http");
                uri.authority(ip or domainname); // "127.0.0.1"
                uri.path(alias name ); // "android/reciever.aspx"
                uri.appendQueryParameter("id", "getBoughtApps"); // you can sent querystring with this
                uri.appendQueryParameter("imei", "35464545454");
    
    
                URL url = new URL(uri.toString());
                DocumentBuilderFactory dbf = DocumentBuilderFactory
                        .newInstance();
                DocumentBuilder db = dbf.newDocumentBuilder();
                Document doc = db.parse(new InputSource(url.openStream()));
                doc.getDocumentElement().normalize();
    
                NodeList nodeList = doc.getElementsByTagName("item"); // xml node which will loop in
    
                for (int i = 0; i < nodeList.getLength(); i++) {
                    
                    Node node = nodeList.item(i);
                    Element fstElmnt = (Element) node;
    
                    NodeList nodelist = null;
                    Element element = null;
                    
                    nodelist = fstElmnt.getElementsByTagName("ID"); 
                    element = (Element) nodelist.item(0);
                    nodelist = element.getChildNodes();
                    if ((nodelist.item(0)) != null)
                        string ID = (nodelist.item(0)).getNodeValue().toString();
    
                                        nodelist = fstElmnt.getElementsByTagName("appName");
                    element = (Element) nodelist.item(0);
                    nodelist = element.getChildNodes();
                    if ((nodelist.item(0)) != null)
                        string appName= (nodelist.item(0)).getNodeValue().toString();
    
                    
                }
            } catch (Exception e) {             
                return 0;
            }
    
            return 1;
        }
    
        protected void onPostExecute(Integer result) {
            try {
                // Now you get data from your server and you can use it in your app
            } catch (Exception e) {             
            }
    
            super.onPostExecute(result);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an ASP.NET 2.0 site. A 3rd party has created a web service
I want to create a web service in ASP.NET that fetches data from a
What I have created a very simple asp.net web service using .NET framework 3.5,
I've created a [WebMethod] on ASP.NET Web Service which reads XML documents from different
I have created Web-Service in asp.net with c# . Now i want to pass
I have created a new VS2008 ASP.Net Web service project, with the default name
I've created an asp.net web service for a client of ours which returns multiple
I've create a regular old ASMX web service in ASP.NET and added SoapDocumentMethod(OneWay =
I created MVC ASP.Net Web application and tried insert Thai language data to SQL
I have the following scenario. I have created an ASP.NET web application (framework 3.5)

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.