相关疑难解决方法(0)

javax.xml.namespace 包可从多个模块访问:<unnamed>、eclipse webservice 中的 java.xml

我在 Eclipse 动态项目中运行分数和 Scoreservices 类,我创建了一个 Web 服务并运行它,但它给了我错误消息The package javax.xml.namespace is accessible from more than one module: <unnamed>, java.xml。不知道如何处理这个输出

分数等级

package startAgain;

import javax.xml.bind.annotation.*;
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
public class Score {
public int wins, losses, ties;
}   
Run Code Online (Sandbox Code Playgroud)

分数服务类

package startAgain;

import javax.ejb.*;
import javax.jws.*;
@Stateless
@WebService
public class ScoreService {
private static Score score = new Score();
public Score updateScore (int wins, int losses, int ties) {
    score.wins = wins;
    score.losses = losses;
    score.ties = ties;
    return score;
}
@WebMethod(operationName="resetScore") …
Run Code Online (Sandbox Code Playgroud)

java eclipse web-services

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

eclipse ×1

java ×1

web-services ×1