gs-consuming-web-service icon indicating copy to clipboard operation
gs-consuming-web-service copied to clipboard

Upgrade to a newer version of jaxb-xjc

Open esfomeado opened this issue 4 years ago • 7 comments
trafficstars

The version used on the tutorial is old and the new ones introduce a few problems so I guess this needs a update.

esfomeado avatar Jul 14 '21 10:07 esfomeado

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 avatar Aug 24 '21 03:08 sc-yan

@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 avatar Apr 05 '22 02:04 kubota-akihiro

@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.

sc-yan avatar Apr 05 '22 03:04 sc-yan

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 avatar Oct 31 '22 07:10 jimmywshee

@jimmywshee your link is not referring to any issue. could you double check?

sc-yan avatar Oct 31 '22 07:10 sc-yan

Updated the link issue.. suppose it can helped to solved jaxb tooling issue

jimmywshee avatar Oct 31 '22 13:10 jimmywshee

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

Buzzardo avatar Oct 17 '23 17:10 Buzzardo