-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nikita wrote:
> With help of Wireshark I've found that request xml from my java
> code was not right. And now at last I've made it work :)
>
> /import org.apache.xmlrpc.client.*; import java.util.*; import
> java.net.*;
>
> public class Packet {
>
> public static void main( String args[] ) throws Exception {
> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
> config.setServerURL(new URL("http://127.0.0.1:19382/RPC2";));
> XmlRpcClient client = new XmlRpcClient(); client.setConfig(config);
>
>
> Hashtable<String,String> packet = new Hashtable<String,String>();
> packet.put("type", "PacketPokerTableSelect"); packet.put("string",
> "");
>
> String mode = new String("use sessions"); String extMethod = new
> String("handlePacket");
>
> Object[] params = new Object[]{mode,packet}; Object[] result =
> (Object[]) client.execute(extMethod, params);
>
> Map<String,Object> map = (Map<String,Object>)result[0]; Object[] q
> = (Object[])map.get("packets");
>
> System.out.println("Working tables:"); for (int i = 0; i <
> q.length; i++) { Map table = (Map<String,Object>)q[i];
> System.out.println(table.get("name")); } } } /
>
>
>

Excellent :-) Would you like to commit this into the pokersource
repository ? It may be useful to others.

Cheers

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjFaewACgkQ8dLMyEl6F22e5ACfa5W//5U0YsN60pwgK1ncygGl
JugAoMEigsn7zZEWMwYUPmWDu7S4epyB
=J9hO
-----END PGP SIGNATURE-----

begin:vcard
fn:Loic Dachary
n:Dachary;Loic
org:pokersource
adr:;;12 bd Magenta;Paris;;75010;France
email;internet:[EMAIL PROTECTED]
title:Senior Developer
tel;work:+33 9 51 18 43 38
tel;cell:+33 6 64 03 29 07
x-mozilla-html:FALSE
url:http://dachary.org/
version:2.1
end:vcard

_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to