简体   繁体   English

没有Tomcat的Apache CXF Web服务

[英]Apache CXF Webservice without Tomcat

I'm searching for an easy way to access a java webservice via javascript. 我正在寻找一种通过javascript访问Java网络服务的简便方法。

Since apache cxf supports this 'http://server.com/svc/wsdl?js' annoation, i decided to implement my Webservices with cxf. 由于apache cxf支持此'http://server.com/svc/wsdl?js'注释,因此我决定使用cxf实现我的Web服务。

As this is not going to be a big thing i don't want to use Tomcat. 因为这不是一件大事,所以我不想使用Tomcat。 I want to publish my webservice with the classes from javax.xml.ws.* 我想使用javax.xml.ws。*中的类发布我的Web服务。

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) (我发现的教程都是关于tomcat的)

You will need a servlet container one way or the other if you want to use HTTP transport. 如果要使用HTTP传输,则将需要一种方式的servlet容器或另一种方式。

CXF has a built-in standalone HTTP transport though which doesn't require you to run an external container. CXF具有内置的独立HTTP传输,尽管它不需要您运行外部容器。 Internally it is using Jetty. 内部使用Jetty。

See http://cxf.apache.org/docs/standalone-http-transport.html for details. 有关详细信息,请参见http://cxf.apache.org/docs/standalone-http-transport.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM