Hey all.
I would very much appreciate some help in this matter:
I have a class MSNConnection that implements MsnContactListListener, MsnMessageListener, MsnMessengerListener, MsnSwitchboardListener
My goal is to delete all former friends of the MSN contact at startup, and then add some new from a list.
I can add my code if someone needs it, but the overall case is this:
In the contactlistInitComplete method i have this piece of code:
System.out.println("ContactListInitCompleted");
if(myFormerContacts==null){
MsnContact[] list=messenger.getContactList().getContacts();
myFormerContacts= new ArrayList<MsnContact>();
for (int i = 0; i < list.length; i++) {
System.out.println(list[i].getEmail().getEmailAddress());
myFormerContacts.add(list[i]);
} }
if(myFormerContacts.size()!=0){
System.out.println("removed a friend in initcompleted");
messenger.removeFriend(myFormerContacts.remove(0).getEmail(), true);
}else if(myNewContacts.size()!=0){
System.out.println("added a friend in initcompleted");
messenger.addFriend(myNewContacts.remove(0), "");
}
But when the method is called i get a java.lang.ecxeption error saying this:
10-11-2010 11:23:35 net.sf.jml.protocol.soap.ContactList sendRequest
SEVERE: something wrong!
java.lang.Exception
at net.sf.jml.protocol.soap.ContactList.sendRequest(ContactList.java:276)
at net.sf.jml.protocol.soap.ContactList.sendRequest(ContactList.java:160)
at net.sf.jml.protocol.soap.ContactList.addFriend(ContactList.java:1244)
at net.sf.jml.impl.SimpleMessenger.addFriend(SimpleMessenger.java:197)
at dk.semaphor.im.agents.connections.MSNConnection.contactListInitCompleted(MSNConnection.java:169)
at net.sf.jml.impl.AbstractMessenger.fireContactListInitCompleted(AbstractMessenger.java:533)
at net.sf.jml.protocol.outgoing.OutgoingPNG.receivedResponse(OutgoingPNG.java:65)
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:114)
at net.sf.jml.net.Session.fireMessageReceived(Session.java:301)
at net.sf.jml.net.Session.access$1200(Session.java:30)
at net.sf.jml.net.Session$MsgDispatcher.run(Session.java:283)
at java.lang.Thread.run(Thread.java:662)
10-11-2010 11:23:35 net.sf.jml.protocol.soap.ContactList sendRequest
INFO: Error xml:<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Contact Already Exists </faultstring><faultactor>http://www.msn.com/webservices/AddressBook/ABContactAdd</faultactor><detail><errorcode xmlns="http://www.msn.com/webservices/AddressBook">ContactAlreadyExists</errorcode><errorstring xmlns="http://www.msn.com/webservices/AddressBook">Contact Already Exists </errorstring><machineName xmlns="http://www.msn.com/webservices/AddressBook">BY2ABCHWB270</machineName><additionalDetails><conflictObjectId>5A2EF788-3234-44B2-8897-BD19B631410C</conflictObjectId></additionalDetails></detail></soap:Fault></soap:Body></soap:Envelope>
Can someone point out where the program is broken, or has it something to do with JML itself? i'm using protocoll 15 if that has something to do with it.
Thank you in advance!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
when somebody send a pending message to the robot , and unfortunely the robot is not online, next time the robot sign in, it will receive pending message, but how to accept this invition is a strange problem.
i found a c# library of msn messenger named MSNPSharp, it send a delete contract message at first. but it's still hard for me to do the same thing in jml. so i just put this clues here, hope it's helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all.
I would very much appreciate some help in this matter:
I have a class MSNConnection that implements MsnContactListListener, MsnMessageListener, MsnMessengerListener, MsnSwitchboardListener
My goal is to delete all former friends of the MSN contact at startup, and then add some new from a list.
I can add my code if someone needs it, but the overall case is this:
In the contactlistInitComplete method i have this piece of code:
But when the method is called i get a java.lang.ecxeption error saying this:
10-11-2010 11:23:35 net.sf.jml.protocol.soap.ContactList sendRequest
SEVERE: something wrong!
java.lang.Exception
at net.sf.jml.protocol.soap.ContactList.sendRequest(ContactList.java:276)
at net.sf.jml.protocol.soap.ContactList.sendRequest(ContactList.java:160)
at net.sf.jml.protocol.soap.ContactList.addFriend(ContactList.java:1244)
at net.sf.jml.impl.SimpleMessenger.addFriend(SimpleMessenger.java:197)
at dk.semaphor.im.agents.connections.MSNConnection.contactListInitCompleted(MSNConnection.java:169)
at net.sf.jml.impl.AbstractMessenger.fireContactListInitCompleted(AbstractMessenger.java:533)
at net.sf.jml.protocol.outgoing.OutgoingPNG.receivedResponse(OutgoingPNG.java:65)
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:114)
at net.sf.jml.net.Session.fireMessageReceived(Session.java:301)
at net.sf.jml.net.Session.access$1200(Session.java:30)
at net.sf.jml.net.Session$MsgDispatcher.run(Session.java:283)
at java.lang.Thread.run(Thread.java:662)
10-11-2010 11:23:35 net.sf.jml.protocol.soap.ContactList sendRequest
INFO: Error xml:<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Contact Already Exists </faultstring><faultactor>http://www.msn.com/webservices/AddressBook/ABContactAdd</faultactor><detail><errorcode xmlns="http://www.msn.com/webservices/AddressBook">ContactAlreadyExists</errorcode><errorstring xmlns="http://www.msn.com/webservices/AddressBook">Contact Already Exists </errorstring><machineName xmlns="http://www.msn.com/webservices/AddressBook">BY2ABCHWB270</machineName><additionalDetails><conflictObjectId>5A2EF788-3234-44B2-8897-BD19B631410C</conflictObjectId></additionalDetails></detail></soap:Fault></soap:Body></soap:Envelope>
Can someone point out where the program is broken, or has it something to do with JML itself? i'm using protocoll 15 if that has something to do with it.
Thank you in advance!
i meet this problem too.
when somebody send a pending message to the robot , and unfortunely the robot is not online, next time the robot sign in, it will receive pending message, but how to accept this invition is a strange problem.
i found a c# library of msn messenger named MSNPSharp, it send a delete contract message at first. but it's still hard for me to do the same thing in jml. so i just put this clues here, hope it's helpful.
The solution I use is to force JML to use protocol 12:
This is because protocol 13 and up use the SOAP calls, which seem buggy.
Thanks, ncrause. It fixed my issue also….
But using MSNP12 have problem with receiving offline messages.
Is there any solution for that ?
MSNP12 don't support offline messages. Its MSNP13 and later those that support it.
i meet this problem too,
if i want to use MSNP15, how can i fix this issue?