So, it's all about connectivity!
Yeah, connectivity on a Windows Compact Embedded 7 machine aka WinCE 7.0! Connectivity has to asspects: the physical communication medium and application level connectivity. I will talk about application connectivity.
Application connectivity means a SDK/Toolkit, an API that abstracts the communication aspects like marshaling/unmarshaling, serialization/deserialization, fault management and so on, making programming agnostic - allowing us this way to focus on our business logic: send message A from computer 1 to computer 2, without worrying about all possible technical aspects.
What do we have available in a WinCE 7 to make a SOAP call? Some will say SOAP Toolkit - I said so also first time, unfortunately Microsoft is not so generous in giving lots of documentation for it. Moreover the API is not so handy, they don't deal entirely with the serialization/deserialization process. Another possible Microsoft API from the WinCE 7 platform it could be MSXML, but I had refused to investigated after SOAP Toolkit experience.
Finally I found two possible APIs which by chance are also Open Source too, and have a permissive license: PocketSOAP and gSOAP Toolkit. Both look good but PocketSOAP it wasn't available for x86 too, I didn't had time to migrate it, so I preferred to focus on gSOAP.
gSOAP it is the choice
gSOAP Toolkit is developed and maintained by Robert A. van Engelen - professor at Florida State University and is available for download from SourceForge or as an Enterprise version from Genivia.
The concept used by this toolkit is similar with the Web Reference from .net project in Visual Studio, you just add a web reference which is a path to your webservice, a tool parses the WSDL file and generates some proxy C# or Vb.Net classes that are included in your project. In a similar manner using two command prompt tools, a set of proxy classes are generated, these classes must be included in your project plus two extra files that are the engine core of this SOAP toolkit. gSOAP know how to generate pure C code if need it, and C++ with or without STL. The code is portable through multiple platforms, personally I compiled the same code on Win32 and WinCE. Another good thing is that gSOAP has a lot of documentation and good samples that you can use.
As a wishlist for gSOAP I would like to have an add-on in Visual Studio that can automate all this command prompt and integrate them automatically into my project.
Conclusion
I am sorry to say but WinCE 7 platform is lacking of a good API or Toolkit for building a SOAP/webservice client. I am wondering how Microsoft can market "The Internet of Things" with WinCE 7, since a SOAP communication it's something basic during these times?
And again: Good job Robert!
2 comentarii:
I assume you are talking about not-managed code only because framework 3.5 will give you great tools if you just add web reference into your project.
Yes, exactly I am speaking about native code, a pure C++ application. Compact framework has a great WCF client that is nice to be used and maybe it worth for separate post.
Trimiteţi un comentariu