Javascript – Generating JavaScript stubs from WSDL

javascriptsoapwsdl

I'm looking for a tool to generate a JavaScript stub from a WSDL.

Although I usually prefer to use REST services with JSON or XML, there are some tools I am currently integrating that works only using SOAP.

I already created a first version of the client in JavaScript but I'm parsing the SOAP envelope by hand and I doubt that my code can survive a service upgrade for example, seeing how complex the SOAP envelope specification is.

So is there any tool to automatically generate fully SOAP compliant stubs for JavaScript from the WSDL so I can be more confident on the future of my client code.

More: The web service I try to use is RPC encoded, not document literal.

Best Answer

Apache CXF has tools that generate JavaScript clients that talk soap.

Actually, any CXF service can have a javascript client autogenerated by doing a get to the URL with ?js appended. (just like ?wsld produces the wsdl) There are command line tools as well, but the dynamic generated stuff is kind of neat.