Hello all!
 
I really need help with webservices in mono. I don't have a clue what i'm doing wrong.
I have a very simple webservice, it's something like this:
<%@ WebService language="C#" class="myApp.myService" %>
 
using System;
using System.Web.Services;
 
namespace myApp {
        public class myService : WebService {
                [WebMethod]
                public string Hello() {
                        return "Hello, this is a string from Linux";
                }
        }
}
 
This works fine in the browser, using the test-form.
It also works great when i'm ading a web reference from Visual Studio .NET to the service.
 
But, how do i use my webservice from a webform in mono (Running XSP)? The basic question is, instead of adding a web reference (as in Visual Studio) what do i have to do to make it work with mono? I did download the client proxy, which is autogenerated. Then, i'm not sure what to do...
 
The "Codebehind" code looks like this:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
 
namespace myApp {
public class WebForm1 : System.Web.UI.Page {
        protected System.Web.UI.WebControls.Label Label1;
 
        private void Page_Load(object sender, System.EventArgs e) {
                myService obj = new myService();
                Label1.Text = obj.Hello();
        }
}
}
 
And the actual page is just a simple aspx page with one asp:label.
 
If someone out there could write a simple list of actions to take, i would be happy for days :)
 
Thanks
Jonas Lindau
 
 
 
 
 
 
 
 

Reply via email to