How to implement OCPP with soap in NodeJS - ocpp

I intend to develop OCPP Soap central system in Node.js. For OCPP 1.6 implementation, there are so many examples over Internet. But for OCPP1.5 there is not sufficient examples on Internet. Is there any basic example? Thanks

Related

REST for Yaws: roll one's own solution or use Yaws + Webmachine?

I was reading a couple of articles on how to use Yaws in a RESTful way, how Webmachine maps HTTP semantics to resources and all of them helped a lot to grasp the concept.
Example API in Zack Kessin's Building Web Applications with Erlang
Steve Vinoski's RESTful Services with Erlang and Yaws
Sheehy/Vinoski - Developing RESTful Web Services with Webmachine
This is the point where I got confused: it seems like that Webmachine as a good REST toolkit and Yaws as a mature web server would complement each other instead of writing a REST implementation each time but I had found no trace of these tools being used together. The only relevant google hits were Steve Vinoski's twitter and his github experiment.
I am fairly new to OTP (and Yaws, web development etc) and I might be missing something. Webmachine is a full OTP application, bundled with Mochiweb so my guess would be that it is an overkill but that's just a shot in the dark.
(I know Cowboy has its own REST implementation too but Yaws is more appealing to me and REST is not always a necessity of course.)

Difference between Sip Servlet and Jain Sip

I want to know the difference between Sip Servlet and JAIN-SIP.
From the stack overflow question's answer, here . I cannot understand the difference between sip servlet and JAIN-SIP. I want to know what is the purpose of JAIN-SIP specification when both sip servlet and JAIN-SIP specification has to create SIP application.
Please also guide me; I want to develop a mobile(android) application in which I want video chat and also conference call functionality. Is this can be done by using JAIN-SIP? (Guide me on this) Please... Thank you
JAIN-SIP is a low-level light-weight SIP stack API while Sip Servlets extends HTTP Servlets and has other dependencies. In general you have more freedom and fine-grained APIs with JAIN-SIP and you can integrate it anywhere. Sip Servlets is a simplified API like HTTP servlets and usually comes with its own integrated environment, a Java EE container or HTTP servlet container.
In terms of flexibility Sip Servlets has some restrictions on which headers you are allowed to touch. You can't stamp your own data into tags, branch ids or IPs for example. Sip Servlets also usually don't allow for more stateless designs. Sip Servlets is best suited for a stateful server, UAS or B2BUA apps with enterprise logic, but it can work in other roles too.
For an android client app JAIN-SIP is the best choice no doubt about it. On the server side, it depends on the specifics of the application.

What is Cometd ? Why it is used and how to work on that

i'm just a beginner in cometd , and i'm interested and wanted to learn what cometd is and what for it is used i googled it out and found some resource.Under the following link
1.http://docs.cometd.org/reference/installation.html#d0e346.
I tried out with the given demo but i could not able to get the expected output from it. can anybody post some resource url's so that i can learn ?
Disclaimer: I'm the CometD project leader.
CometD is a set of library to write web applications that perform messaging over the web.
Whenever you need to write applications where clients need to react to server-side events, then CometD is a very good choice. Think chat applications, online games, monitoring consoles, collaboration tools, stock trading, etc.
See more at the preface.
CometD ships a JavaScript client library, a Java client library and a Java server library.
This allows you to write applications in the browser with fine-grained logic and control on the server.
The server library, being in Java, leverages the high scalability of the JVM and the powerful asynchronous I/O API that the JVM and the Servlet specification provide.
CometD is transport agnostic: you write your applications using high level APIs, and CometD takes care of delivering the messages over the wire using the best transport available: WebSocket or HTTP, also providing a transparent fallback in case WebSocket does not work.
CometD provides a clustering solution called Oort that allows you to scale horizontally your web applications.
CometD comes with a ton of features and an extended documentation along with tutorials and demos you can use as a starting point for your project.
Join CometD to start hacking on your CometD-based web applications.
The CometD tutorials are currently written for CometD 2.x, but a port to CometD 3.x (the current version of CometD) is currently underway, so that requires a bit of patience.
But you can start right away by following the primer and deploying the demos.
I hope you can get started with CometD with the above references.
Drop an email on the mailing lists for any help you may need.

How to provide a REST interface to a SOAP web service?

I know very little about web programming but I need to establish a license generation web service to provide licenses to users of my desktop software.
I have managed to create a working & debugged SOAP service on a Win2003 server but now I have discovered that the interface that I need to provide to my payment processor must be REST.
How would you recommend I deal with this, given that I simply don't have the time to learn PHP and rewrite my web service etc. I could bypass the SOAP altogether and easily create an executable which receives the license parameters and returns an encrypted license, but it's the web interface bit that I am stuck on. I will probably subcontract someone to write a utility for this on elance, but I don't know what to ask for.
Manu thanks,
Michael
You can expose the same service as SOAP based as well as RESTful. Axis2 with WSDL 2.0 has support for this.
Please see this article RESTful Web Services with Apache Axis2 - explains things in detail..
Thanks..
There's no easy conversion from SOAP to REST. SOAP WebServices RESTful APIs use different approaches. I think it is very easy to do with Ruby on Rails (which will take care of 90% of RESTful APi for you). All you need is to implement your logic.
Sinatra example:
get '/hi' do
"Hello World!"
end

[iPhone and Web Services]: REST vs SOAP

I've started my degree project, a mobile application suitable for iPhone, Android and (in the near future) Symbian. The server architecture is the following:
web site (for "standard" users);
web service (for mobile connections), based on TomCat and Axis2;
mySQL DB to storage users data.
Surfing across the web, I've read a lot of discussion about the interaction between the iPhone and Web Services, and I've to say that I've not a clear idea of what I can do and what not.
Let's start from the protocol used to retrieve data from the DB: the Android-side application uses SOAP protocol, can I do the same with iPhone? Are there some limitations or problems?
I have also read about the using of REST instead of SOAP, could it be possible with the server architecture described above? Which are the main advantages/disadvantages?
Sorry if these questions sound "n00b", but it's my first real experience with iPhone and the lot of informations found on the web messed up my mind and I'm scared to be confused. Forgive me for any error.
SOAP is simply too heavy for mobile communications. Why do all the work to wrap requests in an additional XML layer you'll have to parse? You send more data than you need to, and impose greater CPU burden on client and server.
Use REST. If you are doing a cross-platform project JSON makes a great payload container, otherwise plists work well for sending data from the server.
You can definitely do SOAP on the iPhone. Here is a nice tutorial on the subject. After all, SOAP is a HTTP based protocol and you have all the libraries you need to do HTTP on the iPhone.
Having said that, RESTful APIs are simpler than SOAP, so you might want to consider them. They're also HTTP based so you won't have any problems on doing that on iPhone. On the server side, if you use Java, you will have to use JAX-RS to implement that part.
Hope it helps.
Google Buffers
If your looking for a language and platform agnostic solution have a look at Google Buffers. You can easily serialise objects for transmission over the wire.
This question should get you started in Objective-C.
JSON
I have also used JSON within iPhone Apps with great success. Again, relatively language and platform agnostic but much simpler than Google Buffers.
SOAP with Fast Infoset is suited for small devices:
JAX-WS 2.0 and its reference implementation support both Fast Infoset and MTOM/XOP. This article includes information about Web Service Performance for Fast Infoset vs. MTOM/XOP:
http://www.devx.com/xml/Article/35385/1954
Fast Infoset is optimized for small
devices that have bandwidth
constraints, and is supported by many
vendors such as Microsoft .NET and
.NET CF, Sun GlassFish, BEA WebLogic,
IBM SDK for Java 6.0 and others.
http://en.wikipedia.org/wiki/Fast_Infoset