DPWS on desktop .NET Version
When I published my message about implementing DPWS on .NET Micro Framework I had some questions how to make a Client on the Full .NET Framework.
I tried it and had some succes by disassembling the Micro Framwork DPWS implementation with the Refractor tool, modifying some dependencies and fixing some function differences. This is a solution but obvious not the right solution. I’ve send an e-mail to Steve Maillot if I could make my example public. When doing so I would provide a reverse-engineered and modified version of Microsoft libraries and that’s quite logical not allowed.. Not the solution thus..
Next solution is to make our own basic DPWS client, not the most impossible task in the world but Steve ensured me Microsoft is working on a document explaining how to use WCF to connect to a DPWS device, Not with device discovery, that is planned for the 4.0 .NET release.
So stay tuned.. beter to wait a while than make you’re own half baked solution.
did you disassembled the libraries for running under windows xp since a DPWS client library (known as WSDAPI) is a part of Windows Vista ?
what exactly you made :
1) client is a winxp pc – service on an embedded device
2) client is an embedded device – service on winxp pc
or you played under win vista with a client ?
thanks ralf
What i’ve done, I ran the DPWS device (service host) on the Micro Framework device and a DPWS client on the Vista desktop. I know about the WSDAPI library, It only lacks the discovery part of DPWS. The bennefit of using the dpws assemblies of .NET MF is that you don’t need to change your MFSvcUtil generated code and you have discovery. But the problem is.. disassembling and the releasing you’re own modified assamblies is not allowed, logical, most software vendors don’t allow this for obvious reasons..
So we’ve just got to wait for 4.0 WCF for discovery. You should make you’re own (posible incompatible later) version of Ws-Discovery..
Regards,
Elze
a ok so you used the mf assemblies (disassebmled, rewritten partly) and referenced they on a .net console project under vista
hi elze
did you used .NET Reflector from red gate (earlier from lutz roeder) ?
its possible with reflector to save the whole disassembled classes for the dpws assemblies of .NET MF in files or i have to use copy&paste ?
regards sanny
Yes it’s possible.. There is a collection of free addons of .NET reflector.. You can find it here:
http://www.codeplex.com/reflectoraddins
Be aware that publishing reverse enginered and modified is not allowed!
ok thx – yes i know about publishing reverse enginered assemblies, its only for testing purposes
1) now i successfully created the source from MFDpwsClient
2) opend the project in vstudio and compiled (lot of errors)
3) added references to MFDpwsExtensions, MFWsStack, System, System.Xml (all from MF assemblies) and now i can compile the source
4) added a win console project (and also added MFDpwsExtensions, MFWsStack, System, System.Xml from MF and MFDpwsClient), and tried the client sample ->
but on DpwsClient.Init:
this.m_udpSeviceHost = new WsUdpServiceHost(m_discoServiceEndpoints);
i get the exception:
“ECall methods must be packaged into a system module.”
am i doing something wrong ?
now a i am able from a win xp client discovering elzes service on a .net mf device (MF_DWPS_Host)
>Found device:
ModelName: Elze Dpws Test Device
ModelNumber: 1.0
FirmwareVersion: alpha
FriendlyName: Service1Soap
SerialNumber: 12345678
Service endpoint found:http://172.22.82.251:8084/34140142-47e3-441e-a534-0b659a9
7e3c3
also the multipy service now works fine (win xp client is consumig a .net mf device service)
@sanny: Great work! I know it’s posible but I’m a little afraid of telling excactly how, I don’t want to help people commit a crime by publishing their reverse engineered projects. I hope I inspired you.. Now you have to source you can filter out the realy needed parts and write you’re own sourcecode for it..
yea this was only a testing project – the win xp client works great and consumes the mutiply service of your project