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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:30:34+00:00 2026-06-09T15:30:34+00:00

How do I create a webservice using Mono For Android? It seems like everything

  • 0

How do I create a webservice using Mono For Android? It seems like everything is about consuming a webservice, and not really about creating one.

I’ve tried using this: http://www.mono-project.com/Writing_a_WebService

But System.Web.Services.WebService doesn’t exist. System.ServiceModel hasn’t been translated yet either. Does anyone have clues on how to create a webservice on Mono For Android?

Thanks

  • 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-09T15:30:36+00:00Added an answer on June 9, 2026 at 3:30 pm

    I have now tried to implement the following code and tried to run it in the emulator, but the request I make either through my browser or through a REST client, never reaches the HandleRequest.

    protected override void OnCreate(Bundle bundle) {
        base.OnCreate(bundle);
    
        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);
    
        var startBtn = FindViewById<Button>(Resource.Id.StartBtn);
        stopBtn.Clickable = false;
    
        startBtn.Click += SetupListener;
    }
    
    private void SetupListener(object sender, EventArgs e) {
        _httpListener = new HttpListener();
        _httpListener.Prefixes.Add("http://*:9876/");
        _httpListener.Start();
        _httpListener.BeginGetContext(HandleRequest, _httpListener);
    }
    
    private void HandleRequest(IAsyncResult result) {
        var context = _httpListener.EndGetContext(result);
        var response = "<html>Hello World</html>";
        var buffer = Encoding.UTF8.GetBytes(response);
    
        context.Response.ContentLength64 = buffer.Length;
        context.Response.OutputStream.Write(buffer, 0, buffer.Length);
        context.Response.OutputStream.Close();
    
        _httpListener.BeginGetContext(HandleRequest, _httpListener);
    }
    

    I have tried making request like the following: http:// localhost:9876/ , http:// 10.1.1.190:9876/ and http:// 10.0.2.2:9876/ but none of them actually reaches into the application.

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

Sidebar

Related Questions

I am learning how to create an android app and webservice using: Eclipse IDE
I want to create and publish simple WebService using Java. Everything compiles. When I
I want to create a .NET webservice using C# with JSON. but I've error
I'm using Sudzc to create my WebService proxy classes for an iOS app. The
I am using netbeans glassfish bundle to create a webservice. I am adding operations
I have created one application in flex that is accessing the Java webservice using
We have tried to create sample webservices helloworld in Java using Jersey and Tomcat
I create a complete pluggin in Wordpress using ZendFramework and now i'd like to
This question is regarding the ASP.NET webservice that i am creating using the DAL-BLL
I am trying to create a webservice using the PHP Soap extension and I

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.