Hi,

I'm using PyMSNt, PyICQt, PyAIMt and PyYIMt transports and SMACK API to register
them.

The code for register a transport is

        Registration registration = new Registration();
        registration.setType(IQ.Type.SET);
        registration.setTo("yahoo.serverDomain");
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put("username", account);
        attributes.put("password", password);
        registration.setAttributes(attributes);

        PacketCollector collector = con.createPacketCollector(new
PacketIDFilter(registration.getPacketID()));
        con.sendPacket(registration);

        IQ response =
(IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
        collector.cancel();
        if (response == null) {
            log.warn(method + "Server time out");
        }
        if (response.getType() == IQ.Type.ERROR) {
            log.warn(method + "Error registering transport");
        }


And it works fine for ALL transports but, although WITH YAHOO TRANSPORT THE
REGISTER IS OK, I get this exception (only with yahoo)

2006.08.23 09:30:49 Invalid presence type
java.lang.IllegalArgumentException: No enum const class
org.xmpp.packet.Presence$Type.set
at java.lang.Enum.valueOf(Unknown Source)
at org.xmpp.packet.Presence$Type.valueOf(Presence.java:321)
at org.xmpp.packet.Presence.getType(Presence.java:106)
at org.jivesoftware.wildfire.net.SocketReader.process(SocketReader.java:166)
at
org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:156)
at
org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62)
at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123)
at java.lang.Thread.run(Unknown Source)



Can anybody tell me why only occur this with yahoo transport?
How can avoid it?

Thanks in advance

Reply via email to