4 |
using System.Web.Services; |
using System.Web.Services; |
5 |
using DotGNU.XmlRpc; |
using DotGNU.XmlRpc; |
6 |
|
|
7 |
[WebService(Description="A Class Exposing Methods", Namespace="http://nfluid.com")] |
[WebService( Description = "A Class Exposing Methods", Namespace = "http://nfluid.com" )] |
8 |
public class TestWS : XmlRpcService |
public class TestWS : WebService |
9 |
{ |
{ |
10 |
public TestWS() : base() {} |
public TestWS() : base() {} |
11 |
|
|
12 |
[WebMethod(Description="Say Hello")] |
[WebMethod( Description = "Say Hello" )] |
13 |
public static string SayHello( String who ) |
public static string SayHello( String who ) |
14 |
{ |
{ |
15 |
return ( "Hello " + who ); |
return ( "Hello " + who ); |
16 |
} |
} |
17 |
} |
} |
18 |
|
|
19 |
[WebService(Description="Another Funky Class Exposing Methods")] |
[WebService( Description = "Another Funky Class Exposing Methods" )] |
20 |
public sealed class TestClass2WS |
public sealed class TestClass2WS : WebService |
21 |
{ |
{ |
22 |
[WebMethod(Description="Say Goodbye, too-d-loo")] |
[WebMethod( Description = "Say Goodbye, too-d-loo" )] |
23 |
public static String SayGoodbye( String ToWho, int howmany ) |
public static String SayGoodbye( String ToWho, int howmany ) |
24 |
{ |
{ |
25 |
for( int i = 0; i < howmany; i++ ) { |
for( int i = 0; i < howmany; i++ ) { |
26 |
Console.WriteLine( "Goodbye " + ToWho + "[{0}]", i+1 ); |
Console.WriteLine( "Goodbye " + ToWho + "[{0}]", i+1 ); |
27 |
} |
} |
|
|
|
28 |
return "Hoo"; |
return "Hoo"; |
29 |
} |
} |
30 |
} |
} |