Groups | Blog | Home
all groups > dotnet web services > january 2007 >

dotnet web services : Hosting a Web Service in a Windows Service



Diego L Espiñeira
1/4/2007 6:36:31 PM
Hi, all
I've got a windows service (server) application and a winforms (client)
application. What I need to do is to host a web service in the windows
service application so the client can request information about its current
state and request server's internal data to change on user's behalf, plus I
need to do it in a standard compliant way, such as xml/web services.

Any help/link/info would be very apreciated
Thanks

FrancoisViljoen
1/4/2007 10:21:00 PM
OK, if I understand correctly, the client needs to query and change state of
the service via an open communications layer.

I would develop the web service as a normal .NEt IIS hosted web service that
merely queries the service via some mechanism (remoting over TCP comes to
mind here)

I hope this helps.

[quoted text, click to view]
Tejasvi Hegde
2/2/2007 10:42:04 AM

[quoted text, click to view]

Web Services Enhancements (WSE) should solve your problem.

Refer:
http://msdn2.microsoft.com/en-us/library/aa529311.aspx

Rgds,
Tejasvi

BizTalk Utilities - Frustration free BizTalk Adapters
Tim
2/20/2007 5:30:47 PM
Assuming your server is .NET 2.0 application then WSE 3.0 is a possible
method you could use; as per the previous post. To elaborate you could WSE
enable your service and use the TCP transport mechanism to communicate to
your service using SOAP over the TCP protocol assuming you wanted to keep
this all in process?

Essentially within your service you can derive a class from SoapService and
register it with the SOAPReceivers collection specifying the endpoint
reference of your server host ip and a desired port to listen on.

Within your client application you can derive from SoapClient and
communicate via an endpoint reference to the ip/port that your service is
listening on.

There are samples that show this within the WSE 3.0 SDK download.

Rgds,
Tim.

[quoted text, click to view]
AddThis Social Bookmark Button