简体   繁体   English

加载 Apache CXF SOAP web 服务而不验证 wsdl 文件

[英]Loading Apache CXF SOAP webservices without validating wsdl files

The Apache CXF based SOAP web services works fine in a setup with internet connection available.基于 Apache CXF 的 SOAP web 服务在具有可用互联网连接的设置中运行良好。 However a client has reported problem in a setup with no internet connection available.但是,客户端报告了没有可用 Internet 连接的设置中的问题。 The wsdl files is dependent on couple of xsd files which inturn references many external online sites. wsdl 文件依赖于几个 xsd 文件,这些文件又引用了许多外部在线站点。 The error getting is something similar as follows.得到的错误类似于以下内容。

javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing file 
/........../webservices/WEB-INF/wsdl/xxx.xsd java.net.UnknownHostException www.w3.org errors

Is it possible to have web services loaded without validating wsdl files?是否可以在不验证 wsdl 文件的情况下加载 web 服务? The cxf-beans.xml too has external references. cxf-beans.xml 也有外部参考。 One option I could think of defining all external references (online references) as local to file systems.我可以考虑将所有外部引用(在线引用)定义为本地文件系统的一种选择。 But this looks non practical since it has lot of references.但这看起来不实用,因为它有很多参考资料。 Any other suggestions to make it work in a system with no internet connections?还有其他建议可以让它在没有互联网连接的系统中工作吗?

Was able to resolve parsing error on startup of the product by removing wsdlLocation from cxf-beans.xml and also from the @javax.jws.WebService annotation in the SOAP service implementation class.能够通过从 cxf-beans.xml 以及 SOAP 服务实现 ZA2F2ED4F8EBC2ABC61DZC 中的 @javax.jws.WebService 注释中删除 wsdlLocation 来解决产品启动时的解析错误。 Client code without SSL is working, but with SSL has some issues.没有 SSL 的客户端代码可以工作,但是使用 SSL 有一些问题。

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

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