[SOAP] wsdl & maven & java 1.8

Einen wunderschönen guten Tag... =)
Ich habe folgendes Problem.
<unwichtig>
Für meine BA soll ich mit Hilfe von Inhabiation eine Android Applikation erstellen. Dazu muss ich einen Codegenerator schreiben der einen Webservice anspricht.
</unwichtig>
Benutzt habe ich dazu Java 1.8 mit JavaFX und Eclipse 4.4.0
Dabei muss ich einen Webservice auf SOAP Basis ansprechen. (noch nie vorher gemacht, REST <3)
Jetzt habe ich mir die wsdl Datei gezogen und mit dem Standad Java Tools (wsimport oder so glaube ich) in classes übersetzt... lösche ich nun die wsdl Datei oder benutze das Project auf einem anderen Rechner läuft gar nix mehr... ist das richtig so? oder habe ich da schon nen Fehler gemacht?

Schön und gut hab ich mir gedacht und Maven angeschmissen.
Dazu habe ich mir das
Code:
<plugin>
		<groupId>org.apache.axis</groupId>
		<artifactId>maven-wsdl2java-plugin</artifactId>
		<version>${wsdl.version}</version>
</plugin>
maven plugin geschnappt.

Meine gante pom sieht so aus
Code:
<artifactId>client</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<wsdl.version>1.4.1-SNAPSHOT</wsdl.version>
		<log.version>1.2.17</log.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log.version}</version>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.axis</groupId>
				<artifactId>maven-wsdl2java-plugin</artifactId>
				<configuration>
					<file>${basedir}/InhabitationService.wsdl</file>
					<generate>client</generate>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.axis</groupId>
					<artifactId>maven-wsdl2java-plugin</artifactId>
					<version>${wsdl.version}</version>
				</plugin>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.cxf
										</groupId>
										<artifactId>
											cxf-codegen-plugin
										</artifactId>
										<versionRange>
											[${cxf.version},)
										</versionRange>
										<goals>
											<goal>wsdl2java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
Leider wird aus meinen WSDL Dateien keine classen erstellt und eingebunden =/
Was mache ich falsch?

lg. Dagobert
 
Okay ich habe jetzt mal das Plugin gewechselt...
und dies macht schon mal mehr =) Jetzt scheint erstmal die wsdl Datei fehlerhaft zu sein...

Code:
<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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.kotschenreuther.fabian.bachelor</groupId>
	<artifactId>client</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<log.version>1.2.17</log.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log.version}</version>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>axistools-maven-plugin</artifactId>
				<version>1.4</version>
				<configuration>
					<wsdlFiles>
						<wsdlFile>InhabitationService.wsdl</wsdlFile>
					</wsdlFiles>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>javax.mail</groupId>
						<artifactId>mail</artifactId>
						<version>1.4</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.cxf
										</groupId>
										<artifactId>
											cxf-codegen-plugin
										</artifactId>
										<versionRange>
											[${cxf.version},)
										</versionRange>
										<goals>
											<goal>wsdl2java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
lg. Dagobert
 
Und was hat Maven in die Konsole geschrieben? Teile dein WSDL hier, vielleicht etwas fehlt, z.b. es referenziert fehlende XSD schema oder etwas.
 
Zuletzt bearbeitet:
Okay das hat sich schonmal erledigt... Das .net schreibt inkompatible Sachen heraus... womit Java/Maven-Plugin nichts anfangen kann ...
(warum ignoriert wsimport diese Fehler bzw warnt nur und die maven plugins können nichts mit der Datei anfangen oO)

Jedoch läuft das bauen noch nicht rund.
Wenn ich jetzt mvn compile aufrufe kommt folgender Fehler:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building client 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ client ---
[INFO] Deleting D:\programmieren\bachelorarbeit\Client\target
[INFO]
[INFO] --- axistools-maven-plugin:1.4:wsdl2java (default) @ client ---
[INFO] about to add compile source root
[INFO] Processing wsdl: D:\programmieren\bachelorarbeit\Client\src\main\wsdl\InhabitationService.wsdl
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 1331 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 31 source files to D:\programmieren\bachelorarbeit\Client\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/BasicHttpBinding_IInhabitationService1Stub.java: Some input files use unchecked or unsafe operations.
[WARNING] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/BasicHttpBinding_IInhabitationService1Stub.java: Recompile with -Xlint:unchecked for details.
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[75,47] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[92,46] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[99,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[111,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/com/microsoft/schemas/_2003/_10/Serialization/Arrays/ArrayOfstring.java:[91,47] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/com/microsoft/schemas/_2003/_10/Serialization/Arrays/ArrayOfstring.java:[109,46] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/com/microsoft/schemas/_2003/_10/Serialization/Arrays/ArrayOfstring.java:[116,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/com/microsoft/schemas/_2003/_10/Serialization/Arrays/ArrayOfstring.java:[128,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedProgramsAsObject.java:[75,47] package org.apache.axis.description does not exist
...
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedProgramsAsObject.java:...
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[10,71] package org.apache.axis.client does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[16,54] package org.apache.axis does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[20,118] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[42,109] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[53,133] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[73,88] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[92,124] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[124,109] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[138,118] package javax.xml.rpc does not exist
[INFO] 100 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.912 s
[INFO] Finished at: 2014-09-02T15:06:27+01:00
[INFO] Final Memory: 15M/95M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project client: Compilation failure: Compilation failure:
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[75,47] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[92,46] package org.apache.axis.description does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[99,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/GetConstructedPrograms.java:[111,43] package org.apache.axis.encoding does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/com/microsoft/schemas/_2003/_10/Serialization/Arrays/ArrayOfstring.java:[91,47] package org.apache.axis.description does not exist
....
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[124,109] package javax.xml.rpc does not exist
[ERROR] /D:/programmieren/bachelorarbeit/Client/target/generated-sources/axistools/wsdl2java/org/tempuri/InhabitationServiceLocator.java:[138,118] package javax.xml.rpc does not exist
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoFailureException - Apache Maven - Apache Software Foundation
Was läuft da also noch falsch?

lg. Dagobert
 
Zuletzt bearbeitet:
Dein pom.xml ist falsch, weil du hast viele kompilation Fehler, z.b. "package org.apache.axis.description does not exist". Du solltest zusätzliche Dependencies hinzufuegen.

Hier ist ein Beispiel:

<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>

Das sollte die "package javax.xml.rpc does not exist" Fehler lösen.

Andere Dependencies kannst du hier finden Maven Repository: Search/Browse/Explore, suche nach der fehlenden Java Paket.
 
Zuletzt bearbeitet:
Ja die hat gefehlt und
Code:
<dependency>
	<groupId>org.apache.axis</groupId>
	<artifactId>axis</artifactId>
	<version>1.4</version>
</dependency>
hat auch noch gefehlt =) Thx dafür schonmal...
Werden iwo im MavenRepo die benötigten Abhängigkeiten eigentlich mit angegeben? War ich heute so blind? :D bzw woher weiß ich welche Abhängigkeiten schon da sind und welche nicht?

lg. Dagobert
 
Zuletzt bearbeitet:
Passende Stellenanzeigen aus deiner Region:

Neue Themen

Oben