• java应用maven插件动态生成webservice代码


    pom.xml如下

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.wisdombud</groupId>
        <artifactId>com.wisdombud.ws</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    
        <properties>
            <guava.version>14.0.1</guava.version>
            <spring.version>3.0.6.RELEASE</spring.version>
            <cxf.version>2.7.5</cxf.version>
            <junit.version>4.8.1</junit.version>
            <slf4j.version>1.6.2</slf4j.version>
            <struts.version>2.2.3.1</struts.version>
            <zyzxbm.version>0.0.1-SNAPSHOT</zyzxbm.version>
        </properties>
    
        <build>
            <plugins>
    
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${cxf.version}</version>
                    <executions>
                        <execution>
                            <id>generate-sources</id>
                            <phase>generate-sources</phase>
                            <configuration>
                                <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
                                <wsdlOptions>
                                    <wsdlOption>
                                        <wsdl>http://172.16.20.100/humiture/overt/MsgManager?wsdl</wsdl>
                                    </wsdlOption>
                                </wsdlOptions>
                            </configuration>
                            <goals>
                                <goal>wsdl2java</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.m2e</groupId>
                        <artifactId>lifecycle-mapping</artifactId>
                        <version>1.0.0</version>
                        <configuration>
                            <lifecycleMappingMetadata>
                                <pluginExecutions>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.apache.cxf</groupId>
                                            <artifactId>cxf-java2ws-plugin</artifactId>
                                            <versionRange>[2.4.3,)</versionRange>
                                            <goals>
                                                <goal>java2ws</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <ignore />
                                        </action>
                                    </pluginExecution>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.apache.cxf</groupId>
                                            <artifactId>cxf-codegen-plugin</artifactId>
                                            <versionRange>[2.7.5,)</versionRange>
                                            <goals>
                                                <goal>wsdl2java</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <ignore />
                                        </action>
                                    </pluginExecution>
                                </pluginExecutions>
                            </lifecycleMappingMetadata>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </project>
  • 相关阅读:
    文件下载的多种方法
    WebService返回DataTable问题
    PowerDesigner设置
    C#中简单的写日志的方法
    sql server 汉字的长度
    validateRequest="false"属性及xss攻击
    TotoiseSVN的基本使用方法
    有选择性的生成一个表的插入脚本,不是选择全部数据生成
    xml2-config not found.
    Ueditor编辑旧文章,从数据库中取出要修改的内容
  • 原文地址:https://www.cnblogs.com/wardensky/p/4126729.html
Copyright © 2020-2023  润新知