powered by Jive Software

Question Regarding ProviderManager

Sorry if this is too basic but I’'m fairly new to Java let alone the Smack API

Anyway I’'m having some difficulty regarding the ProviderManager class.

I’'m trying to parse custom message packets using the x element so I have something like so

<message id="message_N79" type="normal" to="gamemanager@somewhere.net/Test">
<x xmlns="my:x:namespace">
<get-score />
</x>
<body>
</body>
</message>

The basic program creates a connection and then adds a packet listner with a “To” filter.

This works fine with some elements but those with attributes aren’'t working. So after perusing throught the docs it seems I need to create a custom providerManager, so I placed the appropriate line in the smack.providers file and created my provider manager class.

The class is getting intantiated correctly but I’'m not sure where the ProviderManager.parseExtension gets called. Or where the ProviderManager is being used. Do I have to register the Manager with something?

Any points in the right direction would help. Thanks!