I would like my Qt app to expose a service to another app written in .Net using WCF. Is there any support in Qt for implementing WCF services?
A:
AFAIK there is no 'native' Qt support for WCF or extensions; however as you know WCF can consume and expose a web service (in addition to a WCF or remoting service, etc.) All you need to do is expose it as a Web Service for the other .NET app to consume.
But that brings up an interesting aspect; usually you would write a windows service (I presume you are on Windows) which is exposed as a Web service rather than one via Qt. Qt is not ideal as it is a GUI framework (and a very good one); you will get into a few interesting situations as discussed here. It is usually easier to consume a web service with Qt as shown in this example.
Do you have the option to expose your service using some other stack such as ASP.NET or WCF or Java?
bahree
2010-01-25 16:31:37
Thanks for the answer. I was investigating the possibility of using WCF for doing IPC between two applications. I think I will just stick with some pipes for communication then.
Morten Fjeldstad
2010-01-26 09:27:52
You can certainly use WCF for IPC/RPC - the model of WCF of seperating the comms stack from the app stack is extremely flexible and can used as you are thinking. It also gives you the flexibility that if you need to change it at some point in the future you can do so with minimal code changes (just add a new endpoint and load up the appropriate config). If you look up on MSDN you can get a lot of intro articles on it. Feel free to ping me if you need more details.
bahree
2010-01-26 20:20:51