Search code examples
ajaxweb-servicessoapwsdl

Forming a SOAP request message through WSDL


I'm very new to webservices. I'm trying to figure out how I can formulate a request message (and determine what the response message) would be based on the wsdl description that I have.

This is from a third party web service. The WSDL description that I have access to gives me a bunch of information like <types> <message> <operation> etc.

But in the examples that I've seen online, it's showing the request mesage within the "soap:envelope" tag.

What am I missing?

Eventually I'd like to be able to call this webservice using JQuery. But I can't even figure out how to formulate the request message let alone make an ajax call to it.

any help would be appreciated.


Solution

  • For these types of situations I would download soapUI, point it to your WSDL and use it to generate a few sample requests to get familiar with the endpoints, messages and the data model (XSD) for the service.

    Armed with soapUI's sample requests it should be fairly easy to move this to jQuery's SOAP client (assuming of cause that the service is not humongous and requires you to transfer a big object graph as XML - in these cases you might want to check if your service vendor has a REST API as these are generally very easy to work with from jQuery).