topical media & game development
mashup-amazon-13-13-02-TestService-App-Code-myService.cs / cs
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
Summary description for myService
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class myService : System.Web.Services.WebService {
public myService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
[WebMethod]
public string DoWork()
{
//This is just a simple web service to demonstrate asynchronous calls.
// You could replace this logic with code that calls out to a third party.
string strStart = DateTime.Now.ToString() + ", " + DateTime.Now.Millisecond.ToString() + " milliseconds ";
// Sleep for a full second
System.Threading.Thread.Sleep(1000);
return "Web Service: DoWork started on thread " + System.Threading.Thread.CurrentThread.ManagedThreadId + " at " + strStart + " and ended at " + DateTime.Now.ToString() + ", " + DateTime.Now.Millisecond.ToString() + " milliseconds ";
}
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.