spring-guides / gs-consuming-web-service

Consuming a SOAP web service :: Learn how to create a client that consumes a WSDL-based service
http://spring.io/guides/gs/consuming-web-service
Apache License 2.0
135 stars 166 forks source link

Upgrade to a newer version of jaxb-xjc #54

Open esfomeado opened 3 years ago

esfomeado commented 3 years ago

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

sc-yan commented 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
kubota-akihiro commented 2 years ago

@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
sc-yan commented 2 years ago

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

jimmywshee commented 1 year ago

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.

sc-yan commented 1 year ago

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

jimmywshee commented 1 year ago

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

Buzzardo commented 11 months ago

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