<p>I'm looking for a tool to generate a JavaScript stub from a WSDL.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

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

[{'answer_id': 42491, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 4, 'selected': True, 'text': '<p>I had to do this myself in the past and I found this <a href="http://www.codeproject.com/KB/ajax/JavaScriptSOAPClient.aspx" rel="noreferrer">CodeProject article</a>.  I changed it up some, but it gave me a good foundation to implement everything I needed.  One of the main features it already has is generating the SOAP client based off the WSDL.  It also has built in caching of the WSDL for multiple calls.</p>\n\n<p>This article also has a custom implementation of XmlHttpRequest for Ajax calls.  This is the part that I didn\'t use.  During that time, I think I was using <a href="http://www.prototypejs.org/" rel="noreferrer">Prototype</a> javascript library and modified the code in this article to use it\'s Ajax functions instead.  I just felt more comfortable using Prototype for the ajax calls, because it was widely used and had been tested on all the browsers.</p>\n'}, {'answer_id': 43337, 'author': 'Slartibartfast', 'author_id': 4433, 'author_profile': 'https://Stackoverflow.com/users/4433', 'pm_score': 2, 'selected': False, 'text': '<p>It would probably be an overkill, but NetBeans has this feature.</p>\n'}, {'answer_id': 73334, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 4, 'selected': False, 'text': '<p>Apache CXF has tools that generate JavaScript clients that talk soap.</p>\n\n<p>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.</p>\n'}]
['https://Stackoverflow.com/questions/41446', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/268/']