Some additional info…
The packet is being sent via a third party, so I don’t have control over what is being sent. I am connecting to gtalk to receive messages. I can see from the Smack debugger that the raw packet is coming in with this format:
<message from="aaa@abc.com" to="bbb@gmail.com" type=“chat” id=“tag:abc.com:5234247”>
<body> some text here </body>
<entry xmlns="http://www.w3.org/2005/Atom">
<source>
<title> some text here </title>
<link href="http://lalala.com/abc"/>
<link href="http://lalala.com/abc.atom" rel="self" type="application/atom+xml"/>
<author>
<name> some text here </name>
</author>
<icon>http://lalala/com/avatar_normal.jpg</icon>
</source>
<title> some text here </title>
<summary> some text here </summary>
<link href="http://lalala.com" rel="alternate" type="text/html"/>
<id>tag:abc.com,2008-01-11T16:19:19+00:00:/lalala/588086852</id>
<published>2008-01-11T16:19:19+00:00</published>
<updated>2008-01-11T16:19:19+00:00</updated>
</entry>
<event xmlns="http://jabber.org/protocol/pubsub#event">
<items node="http://abc.com/statuses/timeline" xmlns="http://jabber.org/protocol/pubsub">
<item id=“tag:abc.com,2008-01-11T16:19:19+00:00:/statuses/588086852”/></items&g t;
</event>
</message>
When I print out the packet.toXml(), I get this:
<message id=“tag:abc.com:5111369” to="bbb@gmail.com" from="aaa@abc.com" type=“chat”>
<body> some text here </body>
<entry xmlns=“http://www.w3.org/2005/Atom”>
<summary> some text here </summary>
<title> some text here </title>
<icon>http://lalala/com/avatar_normal.gif</icon>
<published>2008-01-14T17:22:13+00:00</published>
<link></link>
<source></source>
<name> some text here </name>
<updated>2008-01-14T17:22:13+00:00</updated>
<author></author>
<id>tag:abc.com,2008-01-14T17:22:13+00:00:/statuses/598312662</id>
</entry>
<event xmlns=“http://jabber.org/protocol/pubsub#event”>
</event>
</message>
In the received packet, it seems that the order of the elements has been rearranged, and some of the fields (link, source, author) do not contain values.
Is this a case that requires a PacketExtension implementation? How do I handle this when I am not the one sending the data? Or is there some other reason that I am not receiving the packet as it is sent out?
If anyone can help, I’d really appreciate it!