Scenerio:
I'm working on a protocol which is designed to be implemented with SOAP over HTTP. WSDL files are provided by a third party.
I used wsdl.exe to generated a proxy class and created a Web Service Project in VS.
wsdl.exe yourFile.wsdl /l:CS
I got a cs from a unwrapping wsdl.
Snippet:
[System.Web.Services.Protocols.SoapHeaderAttribute("chargeBoxIdentity")]
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("/ClearCache",
RequestElementName="clearCacheRequest",
RequestNamespace="urn://Ocpp/Cp/2012/02/",
ResponseElementName="clearCacheResponse",
ResponseNamespace="urn://Ocpp/Cp/2012/02/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("status")]
public abstract ClearCacheStatus ClearCache();
Implementation 1 (Server Side) A central system (Server) connected to devices. When a device initialized, it sends an authorisation to central system. And Server response an authorisation message back.
There are couple of other operations defined by this wsdl file and available in my wcf service.
So, now I want to create a client, which can connect these hardware componenets(which are hosting service based on this wsdl file). client should be able to connect on any of these hardware components given an ip. at the same time, i have to listen to requests sent by these hardware componenets aswell.
What I understood from R&D on this topic, there is a
Central System Service (Client) <---------------------> Charge point Service
Chargepoint Service (Client) <-------------------------> ChargeBox Service
Where Central System (one system) can send requests/response to chargepoint Service (many instances, behind different networks). and Chargepoint Service Client can send requests/response to (many) chargeboxes based on need . every chargebox is on separte IP address and have a service running in it.
My target is to create RESTServices for CentralSystem and ChargePoint, so i can easily consume them in number of applications, with a mechanism to track calls, maintain a connection with chargesboxes as well through chargePoint.
I tried to lookup up different possible options for it, but nothing seems befitting so far. I have seens couple of threads at stackoverflow, where questions related to OCPP implements wcf for this purpose. I am new to webservices and i do not have the right knowledge to interpret the best practice adopting this scenario in .Net framework.
Any link, code sample, guidness regarding architecture, procedure or technology would be highly appreciated
OCPP 1.6 protocol : http://www.openchargealliance.org/protocols/ocpp/ocpp-16/
PS: I am trying to implement OCPP 1.6