Objective: Development of a “Service” for a mobile device which provides various communication & interfacing options to a user
Planned Environment/Platform: Windows Mobile 5.0 devices (to make use of the new managed APIs) running .NET CF 2.0 (primarily because of COM Interop support)
Invokers of the Service: Both Native and Managed Components/Applications
Receivers of the Service: Service itself can invoke Web Service (managed), UPnP Service (either managed or native) and COM Component (native).
I am thinking of 3 possible options for the implementation. I want to know the feasibility of all these options and the best possible option in my case.
Option 1: Implement the Service as COM Component written in C# and deploying it on a Mobile device. Writing the component in C# will allow me to make use of the available managed APIs in Windows Mobile 5.0 and will also ease in consuming external Web Services. Of course the cost of COM Interop has to be tolerated in any case when manage and native components need to deal with each other. I want to know whether this solution is really possible on a mobile device running .NET CF 2.0 i.e. not the full version of .NET framework.
Option 2: Developing a Web Service instead of writing a COM Component and hosting it on a mobile device. Communication with COM components can be achieved by using the COM Interop Bridge. I am not sure whether it is really a good idea as mobile devices are ONLY used as clients to external Web Service residing on some static server. Is it really possible to host a web service on a mobile device (with the entire necessary infrastructure) assuming Web Service itself has a small footprint
Option 3: To develop a UPnP service (preferably in a managed environment). I am not really aware of the pros and cons of this option as my knowledge for UPnP is fairly limited at the moment.
Your comments will be highly appreciated. Thanks in advance.

COM Component, UPnP & Web Services on Mobile Devices
dagfari
Hi Arsalan - Can you describe exactly what you mean by "Service" Your option 1 is to write the service as a COM component in C#. What is the executable that this component would plug into Do you mean a Service in that sense of something started by the OS when it boots Or do you already have a native executable that you wish to plug the component into
THanks,
Steven
Aamir Iqbal
patforna
Thanks Steven for you reply. It has been a long time I posted this question. Let me also update my message along with answering your query. By "Service" I mean stand-alone active service that can be either started by Pocket PC OS or manually started by the user. But not a passive dll.
I have also realized that option 2 is impossible using .NET CF. This leaves me with the following options (I think):
1. Writing "Service" as a COM Component in native code (C++). COM Interop is not required in this case. External Web Services can be accessed by "Service" through pocketSOAP, gSOAP toolkits.
2. Writing "Service" as UPnP Device which can be accessed/invoked by appropriate control point. However I feel that presently UPnP technology for the pocket pc platform is not very mature. DCOM is not supported on pocket pc and many other issues like broadcasting & service discovery. What do you say
3. Write a Service as a passive managed class library (C# dll) with a service facade that listen/polls to certain socket for communication.
Your input and comments will be highly appreciated.