[英]javax.xml.ws.WebServiceException: Could not find service named in wsdl
I use CXF 2.7 and tomcat 7. I have create a web project with eclipse Juno that expose some web services. 我使用CXF 2.7和tomcat7。我创建了一个带有Eclipse Juno的Web项目,该项目公开了一些Web服务。 After deployment on tomcat i get wsdl from browser and all looks fine. 在tomcat上部署后,我从浏览器中获取了wsdl,而且一切看起来都很好。
Then i create a second web project that is the consumer and i deploy it on tomcat. 然后,我创建另一个使用者的Web项目,并将其部署在tomcat上。 When i try to call any web service from consumer i get the following error: 当我尝试从使用者调用任何Web服务时,出现以下错误:
javax.xml.ws.WebServiceException: Could not find service named {http://service.example.com/}UserSrvImpl in wsdl http://xxxx:8088/TaxisNetTestUI/services/UserSrvImplPort?wsdl javax.xml.ws.WebServiceException:在wsdl中找不到名为{http://service.example.com/}UserSrvImpl的服务http:// xxxx:8088 / TaxisNetTestUI / services / UserSrvImplPort?wsdl
My service call example is: 我的服务呼叫示例是:
UserSrvImpl service = new UserSrvImpl();
UserSrvImplPortType client = service.getUserSrvImplPort();
client.register(ObjetValue);
What going wrong ? 怎么了?
I guess you need 我想你需要
UserSrv service = new UserSrvImpl();
UserSrvImplPortType client = service.getUserSrvImplPort();
client.register(ObjetValue);
Use interfase instead of implementation class as link 使用interfase而不是实现类作为链接
I create again the web services, but this time i create manually my interface. 我再次创建Web服务,但是这次我手动创建界面。 I create a class that iplements this interface and then i create the web service and all works fine! 我创建了一个实现该接口的类,然后创建了Web服务,并且一切正常!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.