Hi!
No, the Endpoint class is not needed, in fact cannot be use, when publishing a web service to, for instance, GlassFish.
The address of the web service you deploy is determined by the server address and the context path of the "web application".
GlassFish even uses the address of the incoming request as the endpoint address in WSDL documents served to clients.
Example:
My web service is packaged in MyServiceApp.war and the name of the service is HelloService (as per the WSDL).
If I want to send a request to a local GlassFish instance to which this service has been deployed, I can use the following URL:
http://localhost:8080/MyServiceApp/HelloService
Best wishes!