简体   繁体   English

javax.xml.ws.WebServiceException:找不到以wsdl命名的服务

[英]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 ? 怎么了?

My wsdl is: WSDL FILE 我的wsdl是: WSDL文件

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.

相关问题 javax.xml.ws.WebServiceException:找不到名为的服务 - javax.xml.ws.WebServiceException: Could not find service named 调用 WSDL 服务时出现 javax.xml.ws.WebServiceException - javax.xml.ws.WebServiceException when invoking WSDL service javax.xml.ws.WebServiceException: 无法访问 WSDL - javax.xml.ws.WebServiceException: Failed to access the WSDL “ javax.xml.ws.WebServiceException:不是有效的服务。”代理问题? - “javax.xml.ws.WebServiceException: is not a valid service.” proxy issue? 无法创建服务异常javax.xml.ws.WebServiceException: - Failed to create service exception javax.xml.ws.WebServiceException: javax.xml.ws.WebServiceException:不是有效的端口 - javax.xml.ws.WebServiceException: is not a valid port javax.xml.ws.WebServiceException:方法X暴露为WebMethod,但是没有对应的wsdl操作 - javax.xml.ws.WebServiceException: Method X is exposed as WebMethod, but there is no corresponding wsdl operation 出现CXF错误:javax.xml.ws.WebServiceException:WSDL元数据不可用于创建代理 - Getting CXF error: javax.xml.ws.WebServiceException: WSDL Metadata not available to create the proxy javax.xml.ws.WebServiceException:未定义的端口类型Java Struts SOAP WSDL - javax.xml.ws.WebServiceException: Undefined port type Java Struts SOAP WSDL javax.xml.ws.WebServiceException:无法访问WSDL。 回复:'401:未经授权' - javax.xml.ws.WebServiceException: Failed to access the WSDL. Response: '401: Unauthorized'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM