generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a reproducer for #580 Clients with a class with postponed initial…
…ization in their method signatures cannot be compiled to native
- Loading branch information
Showing
7 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...rc/main/java/io/quarkiverse/cxf/client/it/rtinit/ClientWithRuntimeInitializedPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual | ||
* contributors by the @authors tag. See the copyright.txt in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.quarkiverse.cxf.client.it.rtinit; | ||
|
||
import jakarta.jws.WebMethod; | ||
import jakarta.jws.WebService; | ||
|
||
/** | ||
* We declare {@link Operands} and {@link Result} as runtime initialized in {@code application.properties} to make | ||
* sure that we fixed <a href="https://github.com/quarkiverse/quarkus-cxf/issues/580">#580</a> properly. | ||
* <p> | ||
* The addOperands() operation is copied from | ||
* https://github.com/l2x6/calculator-ws/blob/1.0/src/main/java/org/jboss/as/quickstarts/wscalculator/CalculatorService.java | ||
* CXF should be able to use this to produce a partial client communicating with a compatible service endpoint. | ||
*/ | ||
@WebService(targetNamespace = ClientWithRuntimeInitializedPayload.TARGET_NS, name = "CalculatorService") | ||
public interface ClientWithRuntimeInitializedPayload { | ||
|
||
public static final String TARGET_NS = "http://www.jboss.org/eap/quickstarts/wscalculator/Calculator"; | ||
|
||
@WebMethod | ||
public Result addOperands(Operands arg0); | ||
} |
51 changes: 51 additions & 0 deletions
51
integration-tests/client/src/main/java/io/quarkiverse/cxf/client/it/rtinit/Operands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
package io.quarkiverse.cxf.client.it.rtinit; | ||
|
||
import java.util.Objects; | ||
|
||
public class Operands { | ||
private int a; | ||
private int b; | ||
|
||
public Operands() { | ||
} | ||
|
||
public Operands(int a, int b) { | ||
super(); | ||
this.a = a; | ||
this.b = b; | ||
} | ||
|
||
public int getA() { | ||
return a; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(a, b); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Operands other = (Operands) obj; | ||
return a == other.a && b == other.b; | ||
} | ||
|
||
public void setA(int a) { | ||
this.a = a; | ||
} | ||
|
||
public int getB() { | ||
return b; | ||
} | ||
|
||
public void setB(int b) { | ||
this.b = b; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
integration-tests/client/src/main/java/io/quarkiverse/cxf/client/it/rtinit/Result.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
package io.quarkiverse.cxf.client.it.rtinit; | ||
|
||
import java.util.Objects; | ||
|
||
public class Result { | ||
private int result; | ||
|
||
private Operands operands; | ||
|
||
public Result() { | ||
} | ||
|
||
public Result(int result, Operands operands) { | ||
super(); | ||
this.result = result; | ||
this.operands = operands; | ||
} | ||
|
||
public int getResult() { | ||
return result; | ||
} | ||
|
||
public void setResult(int result) { | ||
this.result = result; | ||
} | ||
|
||
public Operands getOperands() { | ||
return operands; | ||
} | ||
|
||
public void setOperands(Operands operands) { | ||
this.operands = operands; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(operands, result); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Result other = (Result) obj; | ||
return Objects.equals(operands, other.operands) && result == other.result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters