XML & Web services: Should Web Service client be able to access WSDL file in browser
Hi, if a server hosts a web service, should it return the WSDL file to the client if they put into the browser the end point address of the web service plus ?WSDL i.e http://someWSEndPoint?WSDL ??? I have been googling a long time and I still can not find out whether there is any standard or requirment for the web service hosting party to listen to HTTP GET and return the WSDL file. Anyone help? Many thanks in advance!
- Posted by: Derek Lin
- Posted on: March 22 2007 08:07 EDT
- Re: Should Web Service client be able to access WSDL file in bro by Ivor Bosloper on March 22 2007 10:10 EDT
Hi Derek, There is no requirement for a web service to provide the WSDL document in a specific way. However, without the WSDL the client will not be able to use the web service, so it has to get hold of it somehow. You can mail it to your clients (if it's a small group), or bundle it with the additional (semantic) information of the service (e.g. on a web page). For convenience, many webservice frameworks will provide an HTML page linking to the WSDL if you access the endpoint with a browser (like the link you mentioned). The original idea was that people would 'discover' WSDL documents through the means of UDDI, but that hasn't really taken of. The people behind WS-MetadataExchange assume you somehow know the endpoint, and WS-MEX -as it's called- provides a standardized way to access the WSDL (and additional service metadata) using SOAP. The reason to use SOAP instead of an HTTP GET request is the one that holds for many of the WS-* specifications; eventhough simpler (non-XML) protocols are available (like SSL, HTTP, TCP/IP), SOAP has to become a messaging protocol on it's own and it should not be dependend on HTTP or other protocols.
Thanks so much Ivor! I appreciate your help.