Soap Axis2在目录前面添加src

Soap Axis2在目录前面添加src,soap,wsdl,pom.xml,axis2,wsdl2code,Soap,Wsdl,Pom.xml,Axis2,Wsdl2code,我正在尝试使用axis2从wsdl文件生成java类。正在生成代码,但目标目录不正确 运行包或编译命令后,我得到两个包: 域公司服务 src.domain.company.company.schema domain.company.service下的所有类均符合预期。 src.domain.company.company.schema下的所有文件都具有名称空间domain.company.company.schema 如何去掉作为前缀添加到生成的架构中的src目录? 请注意,我无法共享WSD

我正在尝试使用axis2从wsdl文件生成java类。正在生成代码,但目标目录不正确

运行编译命令后,我得到两个包:

  • 域公司服务
  • src.domain.company.company.schema
domain.company.service下的所有类均符合预期。 src.domain.company.company.schema下的所有文件都具有名称空间domain.company.company.schema

如何去掉作为前缀添加到生成的架构中的src目录? 请注意,我无法共享WSDL文件。我已经在它们里面到处找过了,但在任何地方都找不到src

期望的结果

  • 所有类中的命名空间都是src.domain.company.company.schema

  • 而不是将类放在
    src/domain/company/company/schema

  • 我希望它们位于域/公司/公司/模式下

我的pom.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.springframework</groupId>
        <artifactId>gs-spring-boot-docker</artifactId>
    <version>0.1.0</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.2.RELEASE</version>
    </parent>
    <properties>
        <java.version>1.8</java.version>
        <axis2.version>1.7.9</axis2.version>
        <log4j.version>1.2.17</log4j.version>
        <mapstruct.version>1.3.1.Final</mapstruct.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core -->
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180130</version>
        </dependency>
        <!-- Import Axis2 dependencies used to generate the stub files -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-kernel</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-xmlbeans</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxws -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxws</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxbri -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxbri</artifactId>
            <version>${axis2.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <!-- Axis2 plugin used to generate stubs from wsdl files -->
            <plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
                <version>${axis2.version}</version>
                <executions>
                    <execution>
                        <id>wsdl-serviceHub</id>
                        <goals>
                            <goal>wsdl2code</goal>
                        </goals>
                        <configuration>
                            <packageName>domain.company.service</packageName>
                            <wsdlFile>http://domain-name.com/service.wsdl
                            </wsdlFile>
                            <databindingName>jaxbri</databindingName>
                            <outputDirectory>src/main/java</outputDirectory>
                            <flattenFiles>true</flattenFiles>
                            <overWrite>true</overWrite>
                            <suppressPrefixes>true</suppressPrefixes>
                        </configuration>
                    </execution>
            </plugin>
        </plugins>
    </build>

</project>

4.0.0
org.springframework
弹簧靴装卸工
0.1.0
org.springframework.boot
spring启动程序父级
2.2.2.1发布
1.8
1.7.9
1.2.17
1.3.1.最终版本
org.springframework.boot
SpringBootStarterWeb
org.springframework.ws
SpringWS核心
org.json
json
20180130
org.apache.axis2
axis2内核
${axis2.version}
org.apache.axis2
axis2亚洲开发银行
${axis2.version}
org.apache.axis2
axis2传输http
${axis2.version}
org.apache.axis2
axis2本地传输
${axis2.version}
org.apache.axis2
axis2 xmlbeans
${axis2.version}
org.apache.axis2
axis2 jaxws
${axis2.version}
org.apache.axis2
axis2 jaxbri
${axis2.version}
org.springframework.boot
springbootmaven插件
org.apache.axis2
axis2-wsdl2code-maven-plugin
${axis2.version}
wsdl服务中心
wsdl2code
域公司服务
http://domain-name.com/service.wsdl
贾克斯布里
src/main/java
真的
真的
真的


第节,使用:

并最终删除或相应调整
参数。
“.”(点字符)当然代表当前目录符号



这有点太老套了,但——你知道——总比什么都没有好,当然也比仅仅为了重新排列目录结构而不得不编写额外的命令行脚本要好。同样的问题我最终没有悲哀地解决这个问题,因为该项目已经中断。解决这个问题的一种方法是在安装后运行一个脚本,删除src目录。然而,这并不干净。祝你好运