我正在使用此代码连接服务器,但出现错误:
pms.java:25: error: cannot find symbol
server.setconfig(config);
enter code here ^
symbol: method setconfig(XmlRpcClientConfigImpl)
location: variable server of type XmlRpcClient
import java.util.*;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
//import org.apache.xmlrpc.client.XmlRpcClientConfig;
import org.apache.xmlrpc.common.*;
import org.apache.xmlrpc.*;
import java.net.*;
public class pms {
public static void main (String [] args) {
try {
String UserName = "123";
String Password = "123";
String pKey = "123";
Vector params = new Vector();
params.addElement(UserName);
params.addElement(Password);
params.addElement(pKey);
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(" https://wubook.net/xrws/"));
XmlRpcClient server = new XmlRpcClient();
server.setconfig(config);
Object result = server.execute("acquire_token",params);
System.out.println(result);
System.out.println("Hello World");
} catch (Exception e) {
}
}
}