Call SOAP Service from Javascript / jQuery

So I typed the title of this article into Google and it gave me a whole lot of articles but none of them are what I was looking for because I had to craft the SOAP envelopes myself. It left me wondering if there was an easier way. One of my developers previously had hand coded the SOAP envelopes himself finding that articles online were either advocating this or the libraries they offered were stale. I felt like maybe I was asking the wrong question and again was left stating to myself that there must be an easier way!!!

Well there is – – and it doesn’t require jQuery from the looks of it. I found this by doing a google search for “WSDL to JavaScript”. Why I had to search for such a specific term to find this I’ll never know. On top of that, why more forum articles don’t point to this solution that I’ll also never know. Now that I’ve found it, it feels so obvious. So in case you’re like my developer and you totally overlooked that specific search term, I’m here to guide you to your saviour. This set of tools will do a number of script generations for you in addition to generating JavaScript client side proxies to communicate with a SOAP web service. To generate the JavaScript objects for a given WSDL, just provide the URL of the WSDL to the command line tool wsdl2js and wait for the magic to happen.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s