<div dir="ltr"><div><div><div><div><div><div>Hello All,<br><br></div><div>I want to access the method org.freedesktop.DBus.Properties.GetAll() for a NetworkManager AccessPoint object. To do this I use the following java code: <br>
</div><br> conn = DBusConnection.getConnection(DBusConnection.SYSTEM);<br> <br> NetworkManager c = (NetworkManager) conn.getRemoteObject("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager");<br>
<br> AccessPoint ap = (AccessPoint) conn.getRemoteObject("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager/AccessPoint/193", AccessPoint.class);<br> DBus.Properties props = (DBus.Properties) conn.getRemoteObject("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager/AccessPoint/193", DBus.Properties.class); #Comment: I have also tried giving org.freedesktop.DBus as interface name for the first argument with no luck<br>
<br>Map<String, Variant> ap_props_map = props.GetAll("org.freedesktop.NetworkManager.AccessPoint");<br><br></div>As a result I get the exception: <br><br>Exception in thread "main" org.freedesktop.DBus$Error$UnknownMethod: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist<br>
<br></div>Here are the pastebin of my code and interface declaration:<br><br><a href="http://pastebin.com/bQk19t9i">http://pastebin.com/bQk19t9i</a> (code)<br><a href="http://pastebin.com/ZLdHy0y2">http://pastebin.com/ZLdHy0y2</a> (interfaces)<br>
<br><br></div>If anyone can direct me the to the correct way to do this I will be more than grateful. It is very important to figure it out as it is part of my final thesis and I have been stuck to this part for a long time. Many thanks to anyone who will take the time to answer :)<br>
<br></div>Fotis<br><br></div>P.S. I can call these methods using qdbus successfully. Its java tha is giving me a hard time.<br></div>