I'm trying to create a bean from sources that were generated by wsdl2java
.
Every time I try to run my Spring Boot app, I get the following error:
Caused by: java.lang.ClassCastException: class
org.apache.cxf.endpoint.ClientImpl cannot be cast to class
com.xignite.services.XigniteCurrenciesSoap
(org.apache.cxf.endpoint.ClientImpl and
com.xignite.services.XigniteCurrenciesSoap are in unnamed module of
loader 'app')
I'm not sure how exactly I'm to include generated sources in my main Spring Boot application as a module.
My directory structure is:
├── build
│?? └── generatedsources
│ └── src
│ └── main
│ └── java
│ └── com
│ └── xignite
│ └── services
│
└── src
└── main
├── java
│?? └── io
│?? └── mateo
│?? └── stackoverflow
│?? └── soapconsumption
└── resources
?? └── wsdls
Relevant system info:
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
- Spring Boot 2.1.2.RELEASE
- Gradle 5.2
I've also uploaded the project onto Github here: https://github.com/ciscoo/soap-consumption-spring-boot
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…