org.jboss.wsf.spi.WSFException:JBWS024109:无法获取端点的WSDL合同

时间:2018-11-28 14:15:46

标签: java spring soap jboss cxf

在我的项目中,我试图将应用程序正在tomcat中的工作文件称为soap Web服务。 但是,当我在jboss中部署相同的项目时,我遇到了异常。

Caused by: org.jboss.wsf.spi.WSFException: JBWS024109: Could not get WSDL contract for endpoint com.selva.ws.HelloPortTypeImpl at classpath:Hello.wsdl
    at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.getWsdlLocationURL(MetadataBuilder.java:283)
    at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:90)
    at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:42)
    at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    ... 5 more

我使用jboss-deployment-descriptor.xml忽略了jboss的Web服务,但直到出现上述错误。

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>
<exclude-subsystems>

            <subsystem name="resteasy" />
            <subsystem name="jaxrs" />
<subsystem name="webservices" />
<subsystem name="logging" />
        </exclude-subsystems>
<exclusions>

            <module name="javaee.api" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
<module name="org.slf4j.ext" />
<module name="org.slf4j.jcl-over-slf4j" />
<module name="org.apache.commons.logging" />
<module name="org.apache.log4j" />
</exclusions>
<dependencies>
<module name="javax.activation.api" />
<module name="javax.annotation.api" />
<module name="javax.ejb.api" />
<module name="javax.el.api" />
<module name="javax.enterprise.api" />
<module name="javax.inject.api" />
<module name="javax.interceptor.api" />
<module name="javax.jms.api" />
<module name="javax.mail.api" />
<module name="javax.management.j2ee.api" />
<module name="javax.persistence.api" />
<module name="javax.resource.api" />
<module name="javax.rmi.api" />
<module name="javax.security.auth.message.api" />
<module name="javax.security.jacc.api" />
<module name="javax.servlet.api" />
<module name="javax.servlet.jsp.api" />
<module name="javax.transaction.api" />
<module name="javax.validation.api" />
<module name="javax.xml.bind.api" />
<module name="javax.api" />
</dependencies>
</deployment>
</jboss-deployment-structure>

下面是我的课程

    @javax.jws.WebService(
                          serviceName = "Hello",
                          portName = "Hello",
                          targetNamespace = "http://ws.selva.com",
                          wsdlLocation = "classpath:Hello.wsdl",
                          endpointInterface = "com.selva.ws.HelloPortTypeImpl")

public class HelloPortTypeImpl implements HelloPortType {

如何解决此问题?任何帮助将不胜感激!!!

0 个答案:

没有答案