Open akil-rails opened 3 months ago
Thanks for the report and especially for the reproducer @akil-rails!
It is a naming clash. When generating the ancillary classes, the default name of the operation is taken from the method name. Then for the two sayHello
methods only one com.spliceforms.jaxws_asm.SayHello
class is generated that suits only one of the services.
There are several ways how you can work around the issue:
@jakarta.jws.WebMethod
to set an alternative name.Let me check whether/how we can fix it.
I'd say the issue is in CXF code around here:
It looks like the class name is not taken into account when creating the name of the generated request and response class.
For the record, here is the stack trace from the reproducer:
java.lang.IllegalArgumentException: argument type mismatch
[WARNING] [stderr] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[WARNING] [stderr] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[WARNING] [stderr] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[WARNING] [stderr] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[WARNING] [stderr] at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:114)
[WARNING] [stderr] at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:91)
[WARNING] [stderr] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
[WARNING] [stderr] at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
[WARNING] [stderr] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
[WARNING] [stderr] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
[WARNING] [stderr] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
[WARNING] [stderr] at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
[WARNING] [stderr] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
[WARNING] [stderr] at jdk.proxy6/jdk.proxy6.$Proxy132.sayHello(Unknown Source)
[WARNING] [stderr] at com.spliceforms.NoWsdlClient2Test.testSayHello(NoWsdlClient2Test.java:22)
I have filed this CXF issue: https://issues.apache.org/jira/browse/CXF-9003
On Quarkus CXF side, we could at least make the class generation fail at build time when this kind of a clash happens.
Had reported it in the main repo, but have been asked to raise here --
Describe the bug
Expected behavior
Actual behavior
No response
How to Reproduce?
Reproducer The steps are mentioned in ReadMe.
Output of
uname -a
orver
Darwin Akhileshs-Air.domain.name 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112 arm64
Output of
java -version
openjdk version "21" 2023-09-19 LTS OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS) OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode)
Quarkus version or git rev
3.9.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /Users/akil/.m2/wrapper/dists/apache-maven-3.9.6-bin/3311e1d4/apache-maven-3.9.6 Java version: 21, vendor: Eclipse Adoptium, runtime: /Users/akil/.sdkman/candidates/java/21-tem Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "14.4.1", arch: "aarch64", family: "mac"
Additional information
Adding a @RequestWrapper annotation removes this error - but this annotation is optional, and should not be required.