Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Endpoint.Publish clarification

 
narain ashwin
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
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!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic