Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/391.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java jaxws导入。正在忽略绑定文件_Java_Maven_Wsdl_Jaxb - Fatal编程技术网

Java jaxws导入。正在忽略绑定文件

Java jaxws导入。正在忽略绑定文件,java,maven,wsdl,jaxb,Java,Maven,Wsdl,Jaxb,我正在尝试使用jaxws生成我的java类。问题是我的绑定文件被忽略了。bindingDirectory中有两个绑定文件。也许有人能帮忙 <profiles> <profile> <id>Generate model (POJOS) from wsdl</id> <activation> <activeByDefault>true</active

我正在尝试使用jaxws生成我的java类。问题是我的绑定文件被忽略了。bindingDirectory中有两个绑定文件。也许有人能帮忙

    <profiles>

    <profile>
        <id>Generate model (POJOS) from wsdl</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>

        <build>
            <!-- JAX-WS provides a tool called wsimport which takes the WSDL of a 
                web service and generates proxy classes or the WSDL's service and port definitions. 
                These can then be used to access the web service endpoint. -->
            <plugins>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jaxws-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>Id1</id>
                                <goals>
                                    <goal>wsimport</goal>
                                </goals>
                                <configuration>
                                <wsdlUrls>
                                    <wsdlUrl>http://intan.local:8080/toa/ws/airService?wsdl</wsdlUrl>
                                </wsdlUrls>
                                <target>2.1</target>
                            <xjcArgs>
                                <xjcArg>-XautoNameResolution</xjcArg>
                            </xjcArgs>
                            <verbose>true</verbose>
                            <extension>true</extension>
                            <bindingFiles>
                                <bindingFile>src/main/resources/schemas/2011b/xjb/global.xjb</bindingFile>
                                <bindingFile>src/main/resources/schemas/2011b/xjb/TPA_ExtensionsType.xjb</bindingFile>
                            </bindingFiles>
                            <keep>true</keep>
                                    <packageName>gr.intan.toa._2011b</packageName>
                                    <sourceDestDir>src/main/generated</sourceDestDir>
                                <extension>true</extension>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                    <dependency>
                            <groupId>javax.xml</groupId>
                                <artifactId>webservices-api</artifactId>
                                <version>1.4</version>
                            </dependency>
                            <dependency>
                                <groupId>com.sun.xml.bind</groupId>
                                <artifactId>jaxb-xjc</artifactId>
                                <version>2.1.12</version>
                            </dependency>
                            <dependency>
                                <groupId>com.sun.xml.ws</groupId>
                                <artifactId>jaxws-rt</artifactId>
                                <version>2.1.4</version>
                            </dependency>
                    </dependencies>
                        <configuration>
                            <target>2.1</target>
                            <xjcArgs>
                                <xjcArg>-XautoNameResolution</xjcArg>
                            </xjcArgs>
                            <bindingDirectory>src/main/resources/schemas/2011b/xjb</bindingDirectory>
                            <keep>true</keep>
                        </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

提前感谢

我认为bindingDirectory只有在显式配置xjc插件时才起作用。您应该尝试bindingFile语义:

<configuration>
 <wsdlOptions>
  <wsdlOption>
   <wsdl>${basedir}/src/main/wsdl/myService.wsdl</wsdl>
   <bindingFiles>
    <bindingFile>${basedir}/src/main/resources/wsdl/async_binding.xml</bindingFile>
   </bindingFiles>
  </wsdlOption>
 </wsdlOptions>
</configuration>

我认为bindingDirectory只有在显式配置xjc插件时才起作用。您应该尝试bindingFile语义:

<configuration>
 <wsdlOptions>
  <wsdlOption>
   <wsdl>${basedir}/src/main/wsdl/myService.wsdl</wsdl>
   <bindingFiles>
    <bindingFile>${basedir}/src/main/resources/wsdl/async_binding.xml</bindingFile>
   </bindingFiles>
  </wsdlOption>
 </wsdlOptions>
</configuration>

您好,在您的评论之后,我按照您的建议编辑了我的pom。现在,即使在mavne中使用调试输出,我也会得到一个没有任何信息的异常。该异常源于:org.apache.maven.plugin.MojoExecutionException:执行错误:wsimport还有其他想法吗?正如你所看到的,我已经编辑了关于你告诉我的问题。再次感谢您使用最新版本的插件/依赖项吗?尝试运行mvn版本:显示插件更新和mvn版本:显示依赖项更新并相应地更新您的版本。我将进一步调查并回来。我相信问题在于我的出价没有正确设置。当我解决了这个问题或有一个好问题时,我会回来。谢谢你的帮助。嗨,在你的评论之后,我按照你的建议编辑了我的pom。现在,即使在mavne中使用调试输出,我也会得到一个没有任何信息的异常。该异常源于:org.apache.maven.plugin.MojoExecutionException:执行错误:wsimport还有其他想法吗?正如你所看到的,我已经编辑了关于你告诉我的问题。再次感谢您使用最新版本的插件/依赖项吗?尝试运行mvn版本:显示插件更新和mvn版本:显示依赖项更新并相应地更新您的版本。我将进一步调查并回来。我相信问题在于我的出价没有正确设置。当我解决了这个问题或有一个好问题时,我会回来。谢谢你的帮助。你找到这个问题的解决方案了吗?你找到这个问题的解决方案了吗?