新人用eclipse 的soa tools platform插件产生问题

3 views
Skip to first unread message

jerom...@gmail.com

unread,
Dec 10, 2007, 11:02:32 AM12/10/07
to cxf-zh
我用wsdl文件生成的代码,为什么会产生这种问题?
过程:创建项目:soa tools->wsdl first project,然后选择wsdl文件,并生成代码
然后用插件自带的测试
BroadcastServicePortType_BroadcastServiceHttpPort_Server_server_lsms启动服
务器
启动正常,用自带的测试客户端
BroadcastServicePortType_BroadcastServiceHttpPort_Client_client_lsms启动客
户端,发现以下错误,请问什么原因啊
信息: Could not find the configuration file cxf.xml on the classpath.
Exception in thread "main" javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not
find definition for service {http://192.168.0.20:8080/web/services/
BroadcastService}BroadcastService.
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:109)
at
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:
55)
at javax.xml.ws.Service.<init>(Service.java:57)
at
localhost._8080.web.services.broadcastservice.BroadcastService.<init>(BroadcastService.java:
41)
at
localhost._8080.web.services.broadcastservice.BroadcastServicePortType_BroadcastServiceHttpPort_Client.main(BroadcastServicePortType_BroadcastServiceHttpPort_Client.java:
50)
Caused by:
org.apache.cxf.service.factory.ServiceConstructionException: Could not
find definition for service {http://192.168.0.20:8080/web/services/
BroadcastService}BroadcastService.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
114)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:
116)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:107)
... 4 more
同时我用http://localhost:8080/web/services/BroadcastService?wsdl可以显示正常的xml代

为什么会这样呢?请问大家怎么回事啊?
还有启动过程中出现以下信息,但是我都没有看到他说的这些文件,请高手指点一下
2007-12-10 23:59:23,937 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf.xml]
2007-12-10 23:59:24,109 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-soap.xml]
2007-12-10 23:59:24,203 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-management.xml]
2007-12-10 23:59:24,218 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-rm.xml]
2007-12-10 23:59:24,296 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-addr.xml]
2007-12-10 23:59:24,328 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-http-binding.xml]
2007-12-10 23:59:24,359 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-jms.xml]
2007-12-10 23:59:24,406 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-jaxws.xml]
2007-12-10 23:59:24,437 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-local.xml]
2007-12-10 23:59:24,453 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-http-jetty.xml]
2007-12-10 23:59:24,515 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-http.xml]
2007-12-10 23:59:24,546 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-object-
binding.xml]
2007-12-10 23:59:24,562 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-http.xml]
factoryMethodName=null; initMethodName=null; destroyMethodName=null;
defined in class path resource [META-INF/cxf/cxf-extension-http.xml]]
2007-12-10 23:59:24,609 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-policy.xml]
2007-12-10 23:59:24,640 INFO [main] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-extension-xml.xml]

jerom...@gmail.com

unread,
Dec 10, 2007, 11:24:10 AM12/10/07
to cxf-zh
另外我client测试的代码有一行定义一个QName是
private static final QName SERVICE_NAME = new QName "http://localhost:
8080/web/services/BroadcastService", "BroadcastService");
这样启动时不出现错误,但是在第一个调用的时候停很长时间
把localhost改为本机的IP地址192.168.0.20,就出现上面说的那个错误,请问这是什么原因?这两个不应该是一样的吗?
Reply all
Reply to author
Forward
0 new messages