<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Sorry, I get the interface with this:<BR>
DBusInterface interf = conn.getRemoteObject("com.andago.manager", "/ex");<BR>
<BR>
I have tried another way, creating my own interface which extends DBusInterface called Dmanager, but when I do this it returns a cast error:<BR>
Dmanager interf = (Dmanager)conn.getRemoteObject("com.andago.manager", "/ex");<BR>
<BR>
<BR>
The Dmanager's declaration is this<BR>
<BR>
import org.freedesktop.dbus.DBusInterfaceName;<BR>
import org.freedesktop.dbus.DBusInterface;<BR>
<BR>
<BR>
@DBusInterfaceName("com.andago.com")<BR>
public interface Dmanager extends DBusInterface{<BR>
<BR>
        public String getAgent();<BR>
public String getCurrentMeasure();<BR>
        public String setAgent(int phd, String syst, String manuf, String model);<BR>
        public String deleteAgent();<BR>
        public String setMeasure(String att, String val, String un);<BR>
}<BR>
<BR>
<BR>
El jue, 06-05-2010 a las 11:19 +0100, Matthew Johnson escribió:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Wed May 05 17:02, Íñigo González wrote:
> But in java I am not able to access to that object. This is the code:
>
> DBusConnection conn =
> DBusConnection.getConnection(DBusConnection.SESSION);
> if (interf.isRemote())
>         conn.callMethodAsync(interf, "deleteAgent");
You're missing some code here, for example, how you get interf and what type it
is. What happens if you call interf.deleteAgent() ?
> When it tries to call the deleteAgent method it returns this error:
>
> org.freedesktop.dbus.exceptions.DBusExecutionException:
> $Proxy2.deleteAgent()
>         at org.freedesktop.dbus.AbstractConnection.callMethodAsync(Unknown
> Source)
Is that really the only error? There should normally be some sort of message
with the error.
Matt
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>