本文介绍了简单的web服务的例子tomEE不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从tomEE部署简单的WS例子: http://openejb.apache.org/examples-trunk/simple-webservice/

I'm trying to deploy the simple WS example from tomEE:http://openejb.apache.org/examples-trunk/simple-webservice/

由于没有什么特别的地方,我会详细后我做了什么。也许有人认为我在做什么错的:

As there is nothing special about it, I will post in detail what I did. Maybe someone sees what I'm doing wrong:

机:Win7的是,Eclipse,服务器:tomEE +

Machine: Win7, Eclipse, Server: tomEE+

-created新的动态Web项目运行时目标= tomcat的tomEE服务器

-created new Dynamic Web Project with runtime target = the tomcat tomEE server

-created新包/ src目录,并添加3类有:计算器为CalculatorWS CalculatorTest

-created new package in /src, and added 3 classes there: Calculator, CalculatorWS, CalculatorTest.

-rightclick项目>运行方式>在服务器上运行>选择tomEE。

-rightclick project > run as > run on server > choose tomEE.

服务器启动时,启动 http://127.0.0.1:8080/testproject

这将导致404,因为我还没有设置任何JSF页面。总之,要的http://本地主机:8080 / TestProject的/计算器WSDL 的http://本地主机:8080 / TestProject的/ Web服务/计算器?WSDL没有找到作为例子说明,我也得404。明显的Web服务都没有部署?

Which results in 404, as I have not set up any jsf page.Anyhow, going to http://localhost:8080/testproject/Calculator?wsdl or http://localhost:8080/testproject/webservices/Calculator?wsdl as the example suggests, I too get 404 not found. Obvious the Webservices are not deployed?

这可能是错的这个基本的和简单的例子?

What could be wrong with this basic and simple example?

推荐答案

我使用的Eclipse靛蓝和tomee 1.5.2。我有一个类x.y.z.MyWS。它标注了@WebService和@Stateless。

I am using eclipse indigo and tomee 1.5.2. I have a class x.y.z.MyWS. It's annotated with @WebService and @Stateless.

tomee登录,启动过程中的阿帕奇说,

The apache tomee log, during startup, says

INFO: Webservice(wsdl=http://localhost:8080/MyWebApp/webservices/MyWS, qname={http://z.y.x/}MyWSService) --> Ejb(id=MyWS)

所以WSDL是

So the WSDL is

http://localhost:8080/MyWebApp/webservices/MyWS?wsdl

请检查你的日志。

这篇关于简单的web服务的例子tomEE不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!