Ich schrieb einen Webservice, der versucht, zu implementieren, aber ich Fehler mit der Bibliothek Apache CXF verbunden.Fehler während der Bereitstellung ws Modul Apache CXF
meine Web-pom wie folgt aus:
<?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>
Ich habe auch versucht jboss-Deployment-structure.xml hinzuzufügen:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
aber Fehler nicht verschwunden.
Muss ich einige zusätzliche Bibliotheken hinzufügen?
Ich werde für Ihre Hilfe dankbar
Sie sollten keine neue Antwort hinzufügen, sondern die ursprüngliche Frage bearbeiten oder eine neue Frage öffnen. Außerdem, um Ihnen zu antworten, brauchen wir mehr Information, dass für die ursprüngliche Frage. Und versuchen Sie, das Protokoll in die Frage einzufügen, anstatt das Bild zu posten. – davidxxx