diff --git a/pom.xml b/pom.xml index e79e37cfd2ab90b121eb781071a323ed3cea27d0..ce702973ecee00f902a86b5663f1402d04a47b53 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ <!-- build versions --> <cxf.version>4.0.3</cxf.version> -<!-- <cxf-xjc.version>4.0.0</cxf-xjc.version>--> + <cxf-xjc.version>4.0.0</cxf-xjc.version> <!-- Build settings --> <timestamp>${maven.build.timestamp}</timestamp> @@ -28,7 +28,58 @@ </properties> <dependencies> + <!-- CXF--> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxws</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf.xjcplugins</groupId> + <artifactId>cxf-xjc-ts</artifactId> + <version>${cxf-xjc.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf.xjcplugins</groupId> + <artifactId>cxf-xjc-dv</artifactId> + <version>${cxf-xjc.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf.xjcplugins</groupId> + <artifactId>cxf-xjc-boolean</artifactId> + <version>${cxf-xjc.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf.xjc-utils</groupId> + <artifactId>cxf-xjc-runtime</artifactId> + <version>${cxf-xjc.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-features-logging</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-ws-security</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents.client5</groupId> + <artifactId>httpclient5</artifactId> + </dependency> + <dependency> + <groupId>org.apache.cxf.services.xkms</groupId> + <artifactId>cxf-services-xkms-common</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf.services.sts</groupId> + <artifactId>cxf-services-sts-core</artifactId> + <version>${cxf.version}</version> + </dependency> + <!-- Test --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> @@ -65,10 +116,24 @@ <artifactId>jacoco-maven-plugin</artifactId> </plugin> <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> - </plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>${project.build.directory}/cxf</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> @@ -150,6 +215,8 @@ </extraarg> <!--- Do verbose output --> <extraarg>-verbose</extraarg> + <!-- Generate client side code --> + <extraarg>-client</extraarg> <!--- Generate sample implementation classes --> <!-- <extraarg>-impl</extraarg> --> <!--- Enable header processing even if not defined in port secion of wsdl --> @@ -162,7 +229,17 @@ </extraargs> </wsdlOption> </wsdlOptions> + <!-- <additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs> --> + <encoding>UTF-8</encoding> </configuration> + <executions> + <execution> + <goals> + <goal>wsdl2java</goal> + </goals> + <phase>generate-sources</phase> + </execution> + </executions> </plugin> </plugins> </build> diff --git a/src/test/java/de/ozgcloud/xta/client/XtaClientTest.java b/src/test/java/de/ozgcloud/xta/client/XtaClientTest.java index e9192969d064e0ebc5f3d1fa8e4f20798002866f..e7e673b17da04d65e11fee27be1a36114d5a68e5 100644 --- a/src/test/java/de/ozgcloud/xta/client/XtaClientTest.java +++ b/src/test/java/de/ozgcloud/xta/client/XtaClientTest.java @@ -7,6 +7,9 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import genv3.eu.osci.ws.x2014.x10.transport.PartyIdentifierType; +import genv3.eu.osci.ws.x2014.x10.transport.PartyType; + class XtaClientTest { @DisplayName("get messages metadata") @@ -15,6 +18,10 @@ class XtaClientTest { @DisplayName("should something") @Test void shouldSomething() { + var p = new PartyType(); + var selfIdentifier = new PartyIdentifierType(); + selfIdentifier.setValue("selfIdentifier"); + p.setIdentifier(selfIdentifier); var client = createClient(); assertThrows(NotImplementedException.class, () -> client.getMessagesMetadata("selfIdentifier"));