【发布时间】:2016-01-25 13:32:38
【问题描述】:
我的 Java servlet 使用 JDeveloper 11g R2 开发并部署在 WebLogic Server 10.3.6 上,需要与 tiers 公司开发的特定 WebService 进行通信。
javax.xml.ws.Service 是使用wsdlDocumentLocation 作为 URL ('file:Authentication.wsdl') 创建的。
在我禁用防火墙的服务器上一切正常。
但在客户服务器上,我收到以下错误:
file:Authentication.wsdl
Jan 22, 2016 9:27:32 AM weblogic.wsee.jaxws.spi.WLSProvider createServiceDelegate WARNING: Could not read WSDL Definition from URL wsdlDocumentLocation: 2 counts of InaccessibleWSDLException.
Jan 22, 2016 9:27:32 AM weblogic.wsee.jaxws.spi.WLSServiceDelegate addWsdlDefinitionFeature SEVERE: Failed to create WsdlDefinitionFeature for wsdl location: file:Authentication.wsdl, error: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException, message: 2 counts of InaccessibleWSDLException.
我怀疑客户服务器上的防火墙阻止了对文件Authentication.wsdl的访问?
我不确定,但据我所知,使用带有file: 的 URL 指向某个网络协议访问的本地文件?我说的对吗?
如果是真的,你能解释一下我应该在我的防火墙 (Linux) 中设置什么类型的规则来访问这个本地文件吗?
file:Authentication.wsdl 是指http://localhost:Authentication.wsdl 还是类似http://localhost/myServletContext/Authentication.wsdl 的意思?
我不知道我需要做什么来解决这个问题。
我做了进一步的测试并显示了有关 URL 对象的信息。对于新 URL('file:/tmp/Authentication.wsdl'),getPort() 返回 -1,getHost() 不返回任何内容,getPath() 返回 /tmp/Authentication.wsdl。
我的 Authentication.wsdl 在我的 jar 文件中,我在我的 war 文件中使用它。
【问题讨论】:
-
Authentication.wsdl 在你的 .war 文件中吗?
-
Authentication.wsdl 在 jar 文件中,而我的 war 文件中。
标签: java web-services servlets wsdl