Reputation: 11
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
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:
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