Pessoal… bom dia!
Tenho o seguinte código:
public SimpleCancellableTask getTask() {
if (task == null) {
// write pre-init user code here
task = new SimpleCancellableTask();
task.setExecutable(new org.netbeans.microedition.util.Executable() {
public void execute() throws Exception {
// write task-execution user code here
[b]Service1_Stub ss = new Service1_Stub();
String res[] = ss.selecionarTeste();
for (int i=1; i<=res.length; i++)
{
txt_chamados.insert(res[i], 0);
}[/b]
}
});
// write post-init user code here
}
return task;
}
Comecei a Debugar, e quando o break point está nessa linha: String res[] = ss.selecionarTeste();,
ele vai para o seguinte código (o código está na Stub Service1_Stub.java):
public String[] selecionarTeste() throws java.rmi.RemoteException {
Object inputObject[] = new Object[] {
};
Operation op = Operation.newInstance( _qname_operation_SelecionarTeste, _type_SelecionarTeste, _type_SelecionarTesteResponse );
_prepOperation( op );
op.setProperty( Operation.SOAPACTION_URI_PROPERTY, "http://tempuri.org/SelecionarTeste" );
Object resultObj;
try {
resultObj = op.invoke( inputObject );
} catch( JAXRPCException e ) {
Throwable cause = e.getLinkedCause();
if( cause instanceof java.rmi.RemoteException ) {
throw (java.rmi.RemoteException) cause;
}
throw e;
}
String[] _res = new String[((Object [])((Object []) resultObj)[0]).length];
[color=red][b]System.arraycopy(((Object []) resultObj)[0], 0, _res, 0, _res.length);[/b][/color]
return _res;
}
Analisando o Debug, a variável resultObj retorna todos os valores que eu preciso, mas o erro acontece na linha em vermelho.
Alguem tem alguma idéia do que pode ser?