Need to create a jar out of the web service client files

别说谁变了你拦得住时间么 提交于 2020-01-06 03:53:10

问题


I have the WSDL file for a JAX-WS web service. I have created a maven-archetype-quickstart project(simple java project) and imported it to Eclipse Kepler workspace using import->existing maven project. I copied the wsdl file to the project's src/main/resources folder(created resources newly). I generated the web service client using the maven plugin

<plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>2.7.11</version>
            <executions>
                <execution>
                    <id>generate-sources</id>
                    <phase>generate-sources</phase>

                    <configuration>
                        <sourceRoot>ext</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>src/main/resources/test.wsdl</wsdl>
                                <extraargs>
                                    <extraarg>-impl</extraarg>
                                    <extraarg>-verbose</extraarg>
                                </extraargs>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

The client files are generated in the ext folder. But I want to generate a JAR file out of the web service client files. I saw that WSDL2Java command has a -clientjar option, but I dont know how to use it with the above plug in. Any help is greatly appreciated. Thanks.

来源:https://stackoverflow.com/questions/23338077/need-to-create-a-jar-out-of-the-web-service-client-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!