Daniel Skowroński
Daniel Skowroński

Reputation: 411

Is it possible to call WCF 4.0 (SOAP or REST) from Unmanaged C (ZigBee device)?

I work currently on project that will be developed by two suppliers.

  1. First supplier my company is responsible for ASP.NET MVC 3 application that will be hosted on Azure. This application will analyze data gathered by RFID readers and ZigBee readers devices. I have to also design WCF service that will be responsible for communication. I would like to emphasize that we are not experts about hardware devices and unmanaged C.

  2. Second supplier, other company will deliver devices, and that will be device using ZigBee low energy wireless propagation network. Each device can work in 3 states, gather data, propage, or become manager for all. The "manager" will communicate with WCF service to transfer data to Azure SQL database.

Device specs:

  1. Micro-controller Stellaris (LM3S9B90)
  2. GPRS modem SIM900 SimCon, enables TCP/IP and HTTP communication
  3. Unmanaged C

And my questions are:

  1. Are you familiar with communicating with WCF from unmanaged C?
  2. Is there any DLL for C language to create proxy form WCF SOAP WSDL ?
  3. Is there any DLL for easy use REST WCF service from unmanaged C?
  4. Can I secure this WCF with x509 certificate and communicate on https, is it possible that under unmanaged C communication will be stable and secure?

I am under the pressure of time. So I will be grateful if you can point me any clues.

Thanks in advance.

Daniel

Upvotes: 1

Views: 921

Answers (2)

astaykov
astaykov

Reputation: 30903

As Kevin points, it would be exremely easier if you make your services REST based. Than you could refer this question. Quire relevant for the topic. You could secure your REST with X.509 certificate.

Please note that I have not personally tested the provided libraries, as I am not that much experienced with C/C++. But since the POCO libraries have HTTPRequest and HTTPResponse classes. They, along with X509Certificate should be enough for you. Of course, security may be a bit tricky, but these are good starting point.

Upvotes: 0

Kevin Junghans
Kevin Junghans

Reputation: 17540

When you say "unmanaged C" I am assuming that your development environment is Visual Studio using C/C++. Is that correct. There is a discussion on using a C++ client to communicate with WCF here. I have not personally used C for a client to a WCF service but I have used JavaScript and Java clients to call WCF when WCF was configured for REST. I would recommend REST for ease of implementation across platforms. There should be some way to make a simple HTTP request from C, which is all you need to be able to do for communicating with a REST API. The downside of REST will be security. I am not sure how secure this needs to be but you can provide some security by using certificates and requiring credentials in your API.

Upvotes: 1

Related Questions