Łukasz Zdobylak
Łukasz Zdobylak

Reputation: 11

Local WSDL vs downloaded remotely from server?

I was recently working quite a lot on SOAP web services and one question bothers me in that context. What would be better?

A. Get the WSDL and store it locally on client side and then only make calls to the service

B. Use WSDL location as remote resource (HTTP) and download WSDL each time client instance is created?

What are some pros and cons?

Upvotes: 1

Views: 2943

Answers (1)

Bogdan
Bogdan

Reputation: 24590

Which is better depends on your setup and your needs but personally I would prefer having the WSDL locally, inside the client for these reasons:

  • no extra call to the server to get the WSDL (as you mentioned);
  • if server keeps backward compatibility the local WSDL will still be OK to use (as you mentioned);
  • if the service WSDL changes in an incompatible way and your client suddenly starts to fail you still have the old WSDL locally and you can compare it with the new one to see what's different.

The following point is usually not an issue:

you are not able to get endpoint URL from WSDL so if service endpoint location has changed (but WSDL not) you need to reconfigure the client.

The endpoint URL in the WSDL is not always correct and even if it was, you normally have the WSDL accessible at the same URL as the service by just sticking a ?wsdl parameter after it so if the location changes you won't find the service but you wont find the WSDL either. The service endpoint URL needs to be configurable in your client anyways.

Upvotes: 4

Related Questions