I’m searching for an easy way to access a java webservice via javascript.
Since apache cxf supports this ‘http://server.com/svc/wsdl?js’ annoation, i decided to implement my Webservices with cxf.
As this is not going to be a big thing i don’t want to use Tomcat. I want to publish my webservice with the classes from javax.xml.ws.*
Can you provide me a tutorial or some snippets, showing me how i implement a single method on this way?
(The tutorials i found were all dealing with tomcat)
You will need a servlet container one way or the other if you want to use HTTP transport.
CXF has a built-in standalone HTTP transport though which doesn’t require you to run an external container. Internally it is using Jetty.
See http://cxf.apache.org/docs/standalone-http-transport.html for details.