Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Wrong/unexpected data in received IQ

$
0
0

I am working with smack on Android with an ejabberd server. My server sends a few custom IQ's to the client and while sending they appear to be correct. On reception at the client, unexpected data is seen in the IQ:

 

From server:

<iq type='result'><parenttag xmlns='jabber:iq:myns'><childtag>Data</childtag></parenttag></iq>

 

At client:

 

(With no IQProvider registered, printed IQ from MyPacketListener.processPacket()) ->

     (Printed from processPacket())     07-03 02:22:57.435: W/(19027): IQ = <iq id="v8C9N-2" type="result">nullDatanull</iq>     07-03 02:22:57.435: W/(19027): ChildXML = nullDatanull

 

(With IQProvider registered, output from MyIQProvider.parseIQ()):

 

07-03 02:30:10.497: W/(19725): Start tag parenttag
07-03 02:30:10.497: W/(19725): Start tag childtag
07-03 02:30:10.497: W/(19725): Start tag null
07-03 02:30:10.497: W/(19725): Start tag childtag
07-03 02:30:10.505: W/(19725): Start tag parenttag
07-03 02:30:10.505: W/(19725): Start tag iq

 

The code for printing is:

 

 

int eventType = parser.getEventType();        while(eventType != XmlPullParser.END_DOCUMENT) {            if(eventType == XmlPullParser.START_DOCUMENT) {                ABGUtil.LogIt("Start document");            }elseif(eventType == XmlPullParser.START_TAG) {                ABGUtil.LogIt("Start tag "+parser.getName());            }elseif(eventType == XmlPullParser.END_TAG) {                ABGUtil.LogIt("End tag "+parser.getName());            }elseif(eventType == XmlPullParser.TEXT) {                ABGUtil.LogIt("Text "+parser.getText());            }             parser.next();        }

 

After "Start tag iq", it keeps printing it forever.

 

Can someone please help me debug this?


Viewing all articles
Browse latest Browse all 10742

Trending Articles