Open esfomeado opened 3 years ago
same here. after I run ./mvnw clean compile, the code generation failed. and I tried with gradle as well, still the same. error message:
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\samples\gs-consuming-web-service\complete\build.gradle' line: 36
@sc-yan
I have same problem. how did you solve this problem?
./gradlew compileJava
> Task :genJaxb
[ant:xjc] [ERROR] Connection refused: connect
[ant:xjc] unknown location
[ant:xjc]
> Task :genJaxb FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '\path\to\gs-consuming-web-service\complete\build.gradle' line: 36
* What went wrong:
Execution failed for task ':genJaxb'.
> java.lang.NullPointerException
@kubota-akihiro kind of forgot what I did but I think I didn't solve it. seems like jaxb-xjc is not easy to use. I decided to use this library to parse XML at last. not sure what your problem is but hope it helps.
Guys please refer to the guideline for solve the genJaxb issue. https://spring.io/guides/gs/consuming-web-service/#_run_the_target_web_service_locally It required to start the web service of server side only can run.
Follow the steps in the [companion guide](https://spring.io/guides/gs/producing-web-service/) or clone the [repository](https://github.com/spring-guides/gs-producing-web-service) and run the service (for example, by using mvn spring-boot:run) from its complete directory. You can verify that it works by visiting http://localhost:8080/ws/countries.wsdl in your browser. If you don’t do this you will see a confusing exception in your build later from the JAXB tooling.
@jimmywshee your link is not referring to any issue. could you double check?
Updated the link issue.. suppose it can helped to solved jaxb tooling issue
We're going to rewrite this guide soon. I'll leave this issue open, though, as a reminder of something to check when we do the rewrite. Paging @gregturn
The version used on the tutorial is old and the new ones introduce a few problems so I guess this needs a update.