aspose file tools*
The moose likes Web Services and the fly likes Is Endpoint.publish necessaary if I deploy my webservice to a webserver? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Is Endpoint.publish necessaary if I deploy my webservice to a webserver?" Watch "Is Endpoint.publish necessaary if I deploy my webservice to a webserver?" New topic
Author

Is Endpoint.publish necessaary if I deploy my webservice to a webserver?

Marco Di Baggio
Greenhorn

Joined: Apr 11, 2009
Posts: 12
Hi Community,

I am new to web services and have a newbie question. Almost all the books/articles I read on web services
always intruduce the Enpoint.publish() method as a means of publishing a webservice.

For example:


My questions quite simply is, if I intended to create a web service, for testing/learning and package
that web service in a war file, then deploy it to Glassfish (say for example), is the Endpoint.publish(...)
still necessary?

If the Endpoint.publish(...) is not necessary given my scenario, then how does one specify/modify the desired
endpoint/publish address?

Hopefully someone understands my confusion
Thanks once again
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!

My free books and tutorials: http://www.slideshare.net/krizsan
 
Consider Paul's rocket mass heater.
 
subject: Is Endpoint.publish necessaary if I deploy my webservice to a webserver?