java 导入 javax.xml.rpc.encoding 无法解析

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17008188/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-01 00:41:31  来源:igfitidea点击:

The import javax.xml.rpc.encoding cannot be resolved

javasoap

提问by ivita

I'm trying to run this code http://www.nactem.ac.uk/software/termine/webservice/termine_soap_client.java

我正在尝试运行此代码 http://www.nactem.ac.uk/software/termine/webservice/termine_soap_client.java

and I get the following error: The import javax.xml.rpc.encoding cannot be resolved.

我收到以下错误:无法解析导入 javax.xml.rpc.encoding。

I'm using Oracle Java 7. What do I need to add to get this resolved?

我正在使用 Oracle Java 7。我需要添加什么才能解决这个问题?

Thanks, Ivelina

谢谢,伊维琳娜

采纳答案by NINCOMPOOP

Add the relevant jars to your build path : axis.jar, jaxrpc.jar and xerces.jar.

将相关的 jar 添加到您的构建路径: axis.jar、jaxrpc.jar 和 xerces.jar。

回答by alexdefelipe

In case someone is using Maven, these are the only dependencies I needed in order to make wsdl2java goal work:

如果有人使用 Maven,这些是我需要的唯一依赖项,以便使 wsdl2java 目标工作:

    <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>jaxrpc-api</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.axis</groupId>
        <artifactId>axis</artifactId>
        <version>1.4</version>
    </dependency>