Como eu passo esses valores para o Sevidor responder com usando o projeto apache XML-RPC?
<?xml version="1.0"?> Event.PEGA_VARIOS_EVENTOS DISPOSITIVO 7144,7377,7147 SENHA_DISPOSITIVO 4222 NUMERO_EVENTO 0minha classe cliente !!
obs: é assim que eu passo os parametro ou tenho que montar o xml propriamente dito e passar ele?
alguem pode me dar uma luz?
[color=darkred]public ClienteXmlRpc() {
try {
XmlRpcClientConfigImpl confCliente = new XmlRpcClientConfigImpl();
confCliente.setServerURL(new URL(URL_SERVER));
confCliente.setEncoding(“UTF-8”);
confCliente.setEnabledForExceptions(true);
xmlrpc = new XmlRpcClient();
xmlrpc.setConfig(confCliente);
} catch (Exception exception) {
exception.printStackTrace();
}
}
public Object executar(String comando, Object[] parametros) {
try {
Object resposta = xmlrpc.execute(comando, parametros);
return resposta;
} catch (XmlRpcException e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] args) {
ClienteXmlRpc cliente = new ClienteXmlRpc();
Object[] params = new Object[] {“DISPOSITIVO”, new String(“2001,2002,2003”),“SENHA_DISPOSITIVO”,new String(“4567”), “NUMERO_EVENTO”,new String(“0”) };
Vector resp = (Vector) cliente.executar(“Event.PEGA_VARIOS_EVENTOS”,params);
} [/color]