You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Oliver (JIRA)" <ji...@apache.org> on 2018/02/20 07:51:00 UTC
[jira] [Comment Edited] (CXF-5052) Classpath references should be
understood using wsdlRoot batch processing options in cxf-codegen
[ https://issues.apache.org/jira/browse/CXF-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16369786#comment-16369786 ]
Oliver edited comment on CXF-5052 at 2/20/18 7:50 AM:
------------------------------------------------------
[~dkulp] Are there any plans to resolve this issue or is there some workaround? We currently use the cxf-codegen-plugin to generate classes for over 50 wsdl files in one project.
If we use <wsdlRoot> the wsdl path is generated with the local path (i. e. [file:/C:/path/to/my.wsdl|file:///C:/path/to/my.wsdl]) in the java classes.
We use the following configuration:
{code:java}
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<id>generate-wsdl</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlRoot>${basedir}/src/main/resources/Service/</wsdlRoot>
<includes>
<include>**/*.wsdl</include>
</includes>
<excludes>
<exclude>**/*Abstract*</exclude>
</excludes>
<defaultOptions>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-server</extraarg>
<extraarg>-client</extraarg>
</extraargs>
</defaultOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
was (Author: oli_ver):
[~dkulp] Are there any plans to resolve this issue or is there some workaround? We currently use the cxf-codegen-plugin to generate classes for over 50 wsdl files in one project.
If we use <wsdlRoot> the wsdl path is generated with the local path (i. e. file:/C:/path/to/my.wsdl) in the java classes.
We use the following configuration:
{code:java}
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<id>generate-wsdl</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<!-- TODO Seems not to be resolved using the client certificate set
in the system props. Why? -->
<!-- <wsdlOptions> <wsdlOption> <wsdlArtifact> <groupId>com.daimler.gepard</groupId>
<artifactId>gepard-wsdl</artifactId> <version>0.9.0-SNAPSHOT</version> </wsdlArtifact>
</wsdlOption> </wsdlOptions> -->
<!-- Temporary workaround: Use local wsdl TODO: Set active mq host programmatically
to different host -->
<wsdlRoot>${basedir}/src/main/resources/Service/</wsdlRoot>
<includes>
<include>**/*.wsdl</include>
</includes>
<excludes>
<exclude>**/*Abstract*</exclude>
</excludes>
<defaultOptions>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-server</extraarg>
<extraarg>-client</extraarg>
</extraargs>
</defaultOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
> Classpath references should be understood using wsdlRoot batch processing options in cxf-codegen
> ------------------------------------------------------------------------------------------------
>
> Key: CXF-5052
> URL: https://issues.apache.org/jira/browse/CXF-5052
> Project: CXF
> Issue Type: Improvement
> Components: Tooling
> Affects Versions: 2.7.5
> Environment: All
> Reporter: Zach Melnick
> Priority: Major
>
> The generated client code should be able to reference a relative classpath rather than an absolute one when using the wsdlRoot option to generate clients and services via the cxf-codegen plugin.
> Relative classpaths can be specified when using the non-batch processing wsdlLocation options. This can be done when using something like <wsdlLocation>classpath:wsdl/foo.wsdl</wsdlLocation>.
> However, using the classpath reference in wsdlRoot does not work in the same fashion.
> <wsdlRoot>classpath:wsdl/</wsdlRoot> should be able to find the wsdl directory in ${basedir}/src/main/resources/wsdl, and generate the clients with a wsdlLocation value relative to the classpath, making the behavior between <wsdlRoot> and <wsdlLocation> consistant.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)