客户端调用时缺少 JAX-WS 项目 class 中的方法
A method in a class of JAX-WS project missing when called by client
我有一个名为 "Customer_Service" 的 Java Web 服务,它使用名为 "Customer" 的 class 作为类型。您可以使用 "Customer_Service" 将 "Customer" 对象添加到数据库。在客户端,我无法调用 "Customer" 中的某个方法。除此方法外,所有其他方法都可以正常工作。下面是我的客户 class 的样子。
public class Customer {
private int customerId;
private String dob;
public int getCustomerId() {
return customerId;
}
public void setCustomerId(int customerId) {
this.customerId = customerId;
}
public String getDob() {
return dob;
}
// this method cannot be accessed by client
public void setDob(String dob) {
this.dob = dob;
}
}
您可能 运行 应用程序已过时 类。尝试进行全面清理并构建,看看会发生什么。如果它不起作用,我的建议是重新创建整个项目。这将重新创建任何断开的连接。
我有一个名为 "Customer_Service" 的 Java Web 服务,它使用名为 "Customer" 的 class 作为类型。您可以使用 "Customer_Service" 将 "Customer" 对象添加到数据库。在客户端,我无法调用 "Customer" 中的某个方法。除此方法外,所有其他方法都可以正常工作。下面是我的客户 class 的样子。
public class Customer {
private int customerId;
private String dob;
public int getCustomerId() {
return customerId;
}
public void setCustomerId(int customerId) {
this.customerId = customerId;
}
public String getDob() {
return dob;
}
// this method cannot be accessed by client
public void setDob(String dob) {
this.dob = dob;
}
}
您可能 运行 应用程序已过时 类。尝试进行全面清理并构建,看看会发生什么。如果它不起作用,我的建议是重新创建整个项目。这将重新创建任何断开的连接。