ciscoo / cxf-codegen-gradle

Gradle plugin to generate Java artifacts from WSDL
Apache License 2.0
26 stars 6 forks source link

Classpath in jax-ws-catalog.xml #65

Closed Fafan2008 closed 1 year ago

Fafan2008 commented 1 year ago

I defined the location of xsd files by using jax-ws-catalog.xml with classpath:.

But every compilation is wrong and catching error:

There is the stack over flow question and description of problem( https://stackoverflow.com/questions/75415171/cxf-codegen-plugin-in-gradle-classpath-in-jax-ws-catalog-xml

ciscoo commented 1 year ago

It is not immedately clear if it is a problem with either of the following:

  1. This plugin itself and how it configures the classpath for the wsdl2java tool.
  2. The wsdl2java tool itself

I've left a comment on the question, so continue the discussion there since this issue tracker is primiarly for issues with the plugin or feature requests.

However, if it turns out it is indeed an issue with this plugin, then I will reopen this issue as a bug.

Fafan2008 commented 1 year ago

It is not immedately clear if it is a problem with either of the following:

  1. This plugin itself and how it configures the classpath for the wsdl2java tool.
  2. The wsdl2java tool itself

I've left a comment on the question, so continue the discussion there since this issue tracker is primiarly for issues with the plugin or feature requests.

However, if it turns out it is indeed an issue with this plugin, then I will reopen this issue as a bug.

I discovered the next: My gradle module is imported like library for main spring project. There are two steps. 1) Compilation (when java classes are generating by wsdl and xsd) 2) Runtime (When application using this java classes and jax-ws package from my library)

When program are compiling, there are no classpath, and at the runtime there is classpath. So I just duplicated this jax-ws-catalog.xml file into resource/jax-ws-catalog.xml and resource/META-INF/jax-ws-catalog.xml

After that at the programm compilation I am using relative path from resource/jax-ws-catalog.xml, and at the programm runnig I am using classpath from resource/META-INF/jax-ws-catalog.xml

Answer will be here https://stackoverflow.com/questions/75415171/cxf-codegen-plugin-in-gradle-classpath-in-jax-ws-catalog-xml