Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Endpoint.Publish clarification

Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
    Bookmark Topic Watch Topic
  • New Topic