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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:06:35+00:00 2026-05-30T02:06:35+00:00

I am currently using Mono for Android to develop a mobile application. I have

  • 0

I am currently using Mono for Android to develop a mobile application. I have been trying to consume a WCF web service by adding a web reference to it but I can’t seem to make the call that way. I am now considering to bite the bullet and rewrite the code using Java which I am not as good at as I am with C#.

I have 2 questions:

  1. How do I consume a WCF webservice using Mono for android.
  2. If I am to use java how would I call a method that looks like the one below:

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "/MyMethod",
               RequestFormat = WebMessageFormat.Json,
               ResponseFormat = WebMessageFormat.Json)]
    void MyMethod(CustomObjectFromDataContract c_Object);
    

When I make the call I get a MessageBox that says Unhandled exception System.Net.WebException:. When I step into the code I see that the error happens when you call

  [System.Web.Services.Protocols.SoapDocumentMethodAttribute    ("http://tempuri.org/IMyService/MyMethod", RequestNamespace="http://tempuri.org/",    ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public void MyMethod([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]   CustomObjectFromDataContract c_Object) {
    this.Invoke("MyMethod", new object[] {
                    c_Object});
    }

The invoke is the one throwing the exception.

  • 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-30T02:06:36+00:00Added an answer on May 30, 2026 at 2:06 am

    I have resolved the issue. Here are the steps to make this work:
    1. The service has to be a RESTful service
    2. Instead of referencing Localhost (which I was in the generated code) use the IP address of the hosting machine. I think this is because Android runs in Dalvik VM which I suspect has a different local host from the one my Dev computer is using.
    I did that and my service works now.

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

Sidebar

Related Questions

I was currently developing a desktop application in C# using mono and testing in
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I
I am currently trying to implement some code using Android to detect when a
I'm currently using Monodroid to develop an android app. I'm rather new to phone
Looking to port an ASMX web service application to run on Mono under Apache.
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I am currently using Windows Server 2008 Standard and have several Hyper V machines.
UPDATE: IParcelable apparently cannot currently be implemented in Mono for Android . In the
I have to connect a Qt4 application to a mono Application. The current proof
I am currently using Mono Cecil to extract data from C# projects. Now 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.