Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why SOAP without WSDL?

Tags:

soap

wsdl

Is there a good reason to deploy or consume a SOAP service without using a WSDL "file"?

Explanation:

I'm in a situation where a 3rd-party has created a SOAP service that does not follow the very WSDL file they have also created. I think I am forced to ignore the WSDL file in order to consume this service. Therefore I'm researching how to do this.

What I am really wondering is why it is even possible to do this? What is the intention?

Is it designed so that we can use poor services made by poor programmers? Surely there must be a better reason. I almost wish it wasn't possible. Then I could demand they write it properly.

like image 777
d-_-b Avatar asked Feb 09 '11 09:02

d-_-b


People also ask

Can SOAP work without WSDL?

SOAP can be used without WSDL, but such services will not be found using the discovery mechanics offered by WSDL. WSDL could be used to describe any form of XML exchange between two nodes. So other formats of XML can be used. REST services can be described using WSDL version 2.0.

Does SOAP use WSDL?

WSDL, or Web Service Description Language, is an XML based definition language. It's used for describing the functionality of a SOAP based web service. WSDL files are central to testing SOAP-based services.

Do I need a WSDL?

A WSDL document is used to describe a web service. This description is required, so that client applications are able to understand what the web service actually does. The methods which are exposed by the web service.

How can create mock service in SoapUI without WSDL?

You can just trick SOAPUi with some dummy WSDL, at least with a single request/response definition! Just replace the requests it generates with the XML document you wanted. You an also add additional requests with entirely different request/responses by copy and pasting! Save this answer.


1 Answers

The WSDL is supposed to be a public document that describes the SOAP service, so describes the signatures of all the methods available in the service.

Of course there may be service providers who want to expose a service to certain consumers, but who don't want to make the signature of the service public, if only to make it a little bit harder for people they don't want using the service to find it or attempt to use it. The signature of the services might expose some private information about the schema of their data for example.

But I don't see any excuse for writing a WSDL that doesn't match the service. I would worry that if they can't get the WSDL right what is the quality of the service going to be like?

To answer the other question yes you can consume the service without the WSDL. If you are using Visual Studio for example you could have VS build a proxy for you based on the incorrect WSDL and then tweak it to match the correct service method signatures. You just need to make sure your data contracts and method contracts in your proxy match the actual service data contracts and method contracts.

like image 187
James Gaunt Avatar answered Oct 21 '22 01:10

James Gaunt