This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Web Services and the fly likes Endpoint.Publish clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Endpoint.Publish clarification" Watch "Endpoint.Publish clarification" New topic

Endpoint.Publish clarification

narain ashwin
Ranch Hand

Joined: Dec 27, 2007
Posts: 48
I have a query on the Endpoint.publish() method

Whenever I run this class in my eclipse Helios IDE it seems to start a new server. But when I try to run this from command line it gives and exception that

I am not able to understand the cause of this error. Should I include any libraries ?

My second question is how does Endpoint.Publish starts a server in my IDE, since it is a pojo how can it start a server and bind a port in my machine? The only difference I note is that I have included Apache CXF libraries in classpath while running the server from IDE, is Apache CXF responsible for starting a new server. Please help out

I drink two cappuccinos a day.Is that of any help to solve java problems??
JBoss 6 - Admin console Username/pwd: admin/admin
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
Endpoint publishes a JAX-WS endpoint implementation class. This is mainly suitable for testing web service endpoint implementation classes.
Yes, you can say that it starts a server, albeit a limited server.
Endpoint is part of the JavaSE 6 API and you do not need any additional libraries. If you haven't already, I recommend taking a look at the API documentation for the class in question!
What does your myWSImplementor class look like - is it annotated?
In order for Endpoint to be able to publish it, it must be annotated with @WebService or @WebServiceProvider.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Endpoint.Publish clarification
It's not a secret anymore!