[JDEV] Need help on sending message to ICQ and MSN users

Vincent Ong kwong at sasoft.com.my
Wed Aug 7 01:36:04 CDT 2002


Hi all,
	I am having difficulties in sending messages to MSN and ICQ users. What I
did was this (Step by step). Did I mis something here? Or is there anything
wrong?? Please guide me. Thank you.

<presence to=\"" + strIcqTo + "@" + strIcqTransport + "\"
type=\"subscribe\"/>"

"<iq type=\"get\" id=\"" + strID + "\" to=\"" + strIcqTransport + "\">"
"<query xmlns=\"jabber:iq:register\"/>"
"</iq>"

"<iq type=\"set\" to=\"" + strIcqTransport + "\" id=\"" + strID + "\">"
"<query xmlns=\"jabber:iq:register\">"
"<username>" + strIcqFrom + "</username>"
"<password>" + strIcqFromPass + "</password>"
"<key>" + strIcqKey + "</key>"
"</query>"
"</iq>"

"<iq id=\"" + strID + "\" type=\"set\">"
"<query xmlns=\"jabber:iq:roster\">"
"<item jid=\"" + strIcqTransport + "/registered\" name=\"\">"
"<group>Transports</group></item></query></iq>"

"<presence to=\"" + strIcqTo + "@" + strIcqTransport + "\"
type=\"subscribe\"/>"

"<presence to=\"" + strIcqTransport + "/registered\" type=\"subscribed\"/>"

"<presence to=\"" + strIcqTo + "@" + strIcqTransport + "\"
type=\"subscribed\"/>"

"<message id=\"" + strID + "\" to=\"" + strIcqTo + "@" + strIcqTransport +
"\" type=\"text\">"
"<thread>" + strIcqKey + "</thread>"
"<body>test</body>"
"</message>"

Regards,
Vincent




More information about the JDev mailing list