我有一个首先创建 WSDL 的 CXF 服务服务,当我将 WAR 部署到 glassfish 应用服务器 2.1.1 中时,出现以下异常:
java.io.FileNotFoundException: C:\Sun\AppServer\domains\domain1\config\TestService.wsdl
如果我将 WSDL 放在那个位置,一切正常。如何设置我的 WAR 以便将 TestService.wsdl 放入配置文件夹?
谢谢!
更新:我仍然无法将此服务部署到 Glassfish。因为它在 Tomcat 中部署和运行良好。
我在构建期间将 -wsdlLocation 属性设置为“WEB-INF/wsdl/TestService.wsdl”,但是现在当我在 glassifish 中部署应用程序时,我在 server.log 中得到以下异常
[#|2010-02-01T10:47:06.164-0500|SEVERE|sun-
appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Thread-
501;_RequestID=d3a3f49b-9329-477d-b6fc-24e0f4e4f3fa;|wsdl file
file:/C:/development/wexlink/FileUploadService/wsdl/FileUploadService.wsdl does not
exist for web service FileUploadService|#]
[#|2010-02-01T10:47:06.977-0500|SEVERE|sun
appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Thread-
501;_RequestID=d3a3f49b-9329-477d-b6fc-24e0f4e4f3fa;|Exception occured in J2EEC
Phasejava.lang.RuntimeException: wsdl file
file:/C:/development/wexlink/FileUploadService/wsdl/FileUploadService.wsdl does not
exist for web service FileUploadService
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment
descriptors for module [FileUploadService] -- wsdl file
file:/C:/development/wexlink/FileUploadService/wsdl/FileUploadService.wsdl does not
exist for web service FileUploadService
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:426)
at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:160)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:182)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)
引起:java.lang.RuntimeException:wsdl 文件文件:/C:/development/wexlink/FileUploadService/wsdl/FileUploadService.wsdl 不存在用于 com.sun.enterprise.deployment.util.ModuleContentValidator.accept 的 Web 服务 FileUploadService( ModuleContentValidator.java:187) 在 com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1410) 在 com.sun.enterprise.deployment.archivist.WebArchivist.postOpen(WebArchivist.java:171) 在 com.sun .enterprise.deployment.archivist.Archivist.open(Archivist.java:215) 在 com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:813) 在 com.sun.enterprise.deployment.archivist.ApplicationArchivist .openArchive(ApplicationArchivist.java:794) 在 com.sun.enterprise.deployment.backend.Deployer。loadDescriptors(Deployer.java:365) ... 还有 10 个 |#]