The developer does know the endpoint - it's part of the WSDL. Whether it's used by a human being to create client code, or by a tool doing the same thing, is not important.
If you (or the tools you use to create client-side code) didn't know the endpoint, how could you access the WS?
Almost. You are not *accessing* it using the WSDL. You (or some tool) *creates client code* using the WSDL. After that, the information characterizing the end point is part of the code that is used to access the WS.
Is 'creating client code' to consume web services not same as 'accessing a web service'?
Web services are application components with some functionality which are exposed over the internet which can be ACCESSED by another application or clients which can consume it by exchanging data in form of xml.
Ulf Dittmer wrote:
Is 'creating client code' to consume web services not same as 'accessing a web service'?
No. To create the client code you'd access the WSDL, not the WS.
Web services are application components with some functionality which are exposed over the internet which can be ACCESSED by another application or clients which can consume it by exchanging data in form of xml.
The general definition of WS does not prescribe what the data format is. It is XML for SOAP WS, but can be something else. RESTful WS sometimes use XML, but more often use JSON (and occasionally something else entirely).
Is both wsdl/webservice URL & end point URL is needed to obtain response for the request via java code?
Regards, Sujeeth Pakala
SCJP, SCWCD, SCBCD, ICAD, XML Master Basic, Certified SOA Professional
Is both wsdl/webservice URL & end point URL is needed to obtain response for the request via java code?
to develop service client, definitely WSDL (deployment descriptor) is needed and this contains end point URL (servlet path).
It is nature of web services that it returns the WSDL file when you enter this URL in this format <web service end point>?wsdl in browser.
Regards, Sujeeth Pakala
SCJP, SCWCD, SCBCD, ICAD, XML Master Basic, Certified SOA Professional