[Mono-list] Need help with Webservices

Lluis Sanchez lluis@ximian.com
Thu, 19 Feb 2004 13:44:39 +0100


Hi

1) Generate the web service proxy using the WSDL tool or downloading it
from the WS information page.
2) Compile it into a DLL.
3) Add the DLL in the bin directory of your web
4) That's all.

Lluis.

On dj, 2004-02-19 at 00:17, Jonas Lindau wrote:
> 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
>  
>  
>  
>  
>  
>  
>  
>