在WebSphere AS 8.5上部署JAX-WS Web Service时出现错误

时间:2013-03-01 15:19:08

标签: xml web-services websphere jax-ws

我正在尝试在安装在* nix操作系统上的WAS 8.5服务器上部署JAX-WS Web服务。 我收到以下错误:

[3/1/13 15:31:19:687 CET] 000003c0 WSServerMetad E   WSWS7055E: The WEB-INF/wsdl/KeyPushTargetService.wsdl Web Services Description Language (WSDL) file specified by annotations in class com.cryptomathic.ckms.KeyPushTargetServiceSoapImpl cannot be loaded correctly due to the following error: java.lang.RuntimeException: WSWS7035E: The http://www.w3.org/2001/XMLSchema.dtd metadata file could not be found.
[3/1/13 15:31:19:698 CET] 000003c0 WSModuleDescr E   WSWS7011E: The configuration for the CKTC_MQ_WEB.war application module cannot load correctly. 
The following error occurred:  com.ibm.ws.websvcs.exception.DeploymentException: java.lang.RuntimeException: WSWS7035E: The http://www.w3.org/2001/XMLSchema.dtd metadata file could not be found.
    at com.ibm.ws.websvcs.deployment.WSServerMetadataMerger.attachWSDLDefinition(WSServerMetadataMerger.java:1852)
    at com.ibm.ws.websvcs.deployment.WSServerMetadataMerger.associateWSDLDefinitions(WSServerMetadataMerger.java:1688)
    at com.ibm.ws.websvcs.deployment.WSServerMetadataMerger.mergeMetadata(WSServerMetadataMerger.java:746)
    at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.initDBCMap(WSModuleDescriptorImpl.java:2058)
    at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.buildJAXWSServices(WSModuleDescriptorImpl.java:1303)
    at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl._containsJAXWSWebServices(WSModuleDescriptorImpl.java:481)
    at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.containsJAXWSWebServices(WSModuleDescriptorImpl.java:456)
    at com.ibm.ws.webservices.admin.utils.ServiceContainmentHelper.<init>(ServiceContainmentHelper.java:71)
    at com.ibm.ws.webservices.admin.utils.CommonUtils.getServiceContianmentHelper(CommonUtils.java:690)
    at com.ibm.ws.webservices.admin.utils.CommonUtils.hasWebServices(CommonUtils.java:295)
    at com.ibm.ws.webservices.admin.utils.CommonUtils.hasJAXWSWebServices(CommonUtils.java:238)
    at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.getWebServiceType(DeploymentValidation.java:309)
    at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateEarModules(DeploymentValidation.java:381)
    at com.ibm.ws.webservices.admin.deploy.DeploymentValidation.validateOperation_Required(DeploymentValidation.java:204)
    at com.ibm.ws.management.application.task.ValidateAppTask.performTask(ValidateAppTask.java:392)
    at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:315)
    at java.lang.Thread.run(Thread.java:772)
Caused by: java.lang.RuntimeException: WSWS7035E: The http://www.w3.org/2001/XMLSchema.dtd metadata file could not be found.
    at com.ibm.ws.websvcs.wsdl.BaseWSDLLocator.getImportInputSource(BaseWSDLLocator.java:251)
    at com.ibm.wsdl.xml.EntityResolverAdapter.resolveEntity(EntityResolverAdapter.java:40)
    at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2245)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:869)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:903)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:691)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(WSDLReaderImpl.java:647)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:353)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2409)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2373)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2426)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2447)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2481)
    at com.ibm.ws.websvcs.deployment.WSServerMetadataMerger.attachWSDLDefinition(WSServerMetadataMerger.java:1818)

WAS是否真的试图下载DTD W3C服务器并且没有这样做? 我没有直接访问服务器机器所以我无法直接验证它(但我可以问)。 我们在Windows系统上成功地在WAS 7.0和WAS 8.5上部署了相同的JAX-WS Web服务(我们确信WAS在Windows服务器上部署时不会尝试从Internet下载任何DTD。)

有什么想法吗?

谢谢, 乔瓦尼

2 个答案:

答案 0 :(得分:0)

我不知道具体的答案,但我有几个想法可以做出贡献。

您是否将在Windows上部署的EAR / WAR与您在* nix安装上部署的EAR / WAR进行了比较?我假设它们是相同的,但我要检查的第一件事就是确保部署工件中存在WEB-INF / wsdl / KeyPushTargetService.wsdl。

如果WAS尝试下载XMLSchema定义,我会觉得很奇怪。这可能表明服务器存在一些配置问题。如果要测试它,可以尝试创建另一个基本的JAX-WS服务(如HelloWorld示例)进行部署,看看是否遇到同样的问题。

作为最后的手段,您还可以尝试将DTD放入EAR / WAR中,看看是否会导致问题消失。我不会使用永久修复,但它可能让你暂时移动。

如果其中任何一项有效,请告诉我。

答案 1 :(得分:0)

检查运行时jar是否有xml解析器 - 看起来你有类路径问题。