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

What causes the difference between raw and interpreted packets received?

$
0
0

Hi folks,

 

I'm writing a simple Scala wrapper for smack and I prefer to handle all XML processing (parsing and serializing) in Scala code. Hence I thought the best thing I can do is to: 1. add a root packet listener that handles all incoming stanzas and 2. write Packet subclasses with Scala flavored toXML (PubSub is my main interest at the moment).

 

But I can't seem to access the raw packets in a packet listener, the packets I receive contain the parent node but not the child nodes e.g. instead of getting this:

<iq from='SERVER' to='ME' id='ID' type='result'>

  <pubsub xmlns='http://jabber.org/protocol/pubsub'>

    <subscribe node='NODE' jid='JID' subscription='subscribed'>

      <status>

      ...

      </status>

    </subscribe>

  </pubsub>

</iq>

 

I receive this:

<iq from='SERVER' to='ME' id='ID' type='result'></iq>

 

Which is the same as the contents of the "Interpreted" tab in the debugger.

 

Q1. What causes this?

Q2. How can I dig deeper and access raw XML data from the reader (like the one used for the debugger)?

 

Any help is appreciated.


Viewing all articles
Browse latest Browse all 10742

Trending Articles