我想试验WildFly AS。创造了一个非常简单的JAX-WS例如端点:WildFly 9.0.2失败jax-ws简单的战争部署
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;
@WebService(serviceName = "HelloService")
@Stateless()
public class HelloService {
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
return "Hello " + txt + " !";
}
}
试图将其部署到服务器,但有:
Cannot upload deployment: {"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {"Services that were unable to start:" => ["jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.CREATE","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.START","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.VIEW.\"com.mycompany.soaptest.HelloService\".SERVICE_ENDPOINT","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".deploymentCompleteService","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".moduleDeploymentRuntimeInformation","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".moduleDeploymentRuntimeInformationStart","jboss.undertow.deployment.default-server.default-host.\"/SoapTest-1.0-SNAPSHOT\"","jboss.undertow.deployment.default-server.default-host.\"/SoapTest-1.0-SNAPSHOT\".UndertowDeploymentInfoService"],"Services that may be the cause:" => ["jboss.clustering.registry.ejb.default"]}}
Does WildFly need any special treatment to run such a simple code ?
I have deployed the same code on WebLogic 12.1.3 (with javaee 6 target) and the deployment run without any issues. Here is my project pom:
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>SoapTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>SoapTest</name>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
我在部署简单的Rest端点时也有类似的行为。 –
我把你的代码,pom.xml,部署到我的野蛮9.0.2服务器(全新安装)的战争,启动它使用独立模式,它工作正常。我可以请求部署到http:// localhost:8080/test-1.0/HelloService/HelloService?wsdl的HelloService wsdl。你如何部署你的应用程序?你如何启动你的野蛮服务器?你能提供更多的日志吗?你有没有修改默认野蛮配置中的东西(例如编辑默认的standalone.xml文件) –