我寫了一個web服務,它試圖實現,但是我錯誤地與Apache CXF庫相關聯。在部署ws模塊期間出現錯誤Apache CXF
我的網頁POM這樣的:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>SieciowyWS</artifactId>
<groupId>SieciowyWS</groupId>
<version>1.0</version>
</parent>
<packaging>war</packaging>
<modelVersion>4.0.0</modelVersion>
<artifactId>WebService</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.org.jboss.as.plugins.maven.plugin>7.3.Final</version.org.jboss.as.plugins.maven.plugin>
<version.org.jboss.spec.jboss.javaee.6.0>3.0.0.Final</version.org.jboss.spec.jboss.javaee.6.0>
<version.compiler.plugin>3.6.0</version.compiler.plugin>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<cxf.version>2.2.9</cxf.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>${version.org.jboss.spec.jboss.javaee.6.0}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
<version>4.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>JBOSS</id>
<name>JBoss Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>JBOSS</id>
<name>JBoss Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${version.org.jboss.as.plugins.maven.plugin}</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/api.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
<artifactId>maven-jaxws-tools-plugin</artifactId>
<version>1.1.0.GA</version>
<executions>
<execution>
<id>My execution</id>
<goals>
<goal>wsconsume</goal>
</goals>
<configuration>
<sourceDirectory>${basedir}/src/main/gen-src</sourceDirectory>
<wsdls>
<wsdl>${basedir}/src/main/resources/wsdl/api.wsdl</wsdl>
</wsdls>
<targetPackage>com.rogal.sieciowyandroid</targetPackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我想也加入JBoss的部署,structure.xml:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
但錯誤沒有消失。
我需要添加一些額外的庫嗎?
我將是你的幫助感激
您不應該添加新答案,而是編輯原始問題或打開一個新問題。此外,爲了回答您,我們需要更多關於原始問題的信息。並嘗試複製粘貼日誌中的問題,而不是張貼圖像。 – davidxxx