powered by Jive Software

Unable to get the Message packet in pubsub

i am trying to implement pubsub using openfire server and asmack library. i have configured my node in such a way that subscribers has to take the approval of publishers

now i am trying to read the Message packet using following code but i am not getting any packet. i want to read Message packet because i want to know whenever the subscribers send the request to publishers to get subscribe.

so basically i am trying to read incoming permission request from subscribers in order to allow them to subscribe

here is my code , but i am not getting anything

``

` PacketTypeFilter filter = new PacketTypeFilter(org.jivesoftware.smack.packet.Message.class);

PacketListener myListener = new PacketListener(){

    @Override
    public void processPacket(Packet packet) {
        // TODO Auto-generated method stub

        Log.d("PACKET" , "READ");

        if(packet instanceof org.jivesoftware.smack.packet.Message){

                org.jivesoftware.smack.packet.Message msg = (org.jivesoftware.smack.packet.Message) packet;

        Log.d("MY MESSAGE" , msg.toXML()+ "");


                }
            }

        };

cxmpp.addPacketListener(myListener, filter);`

am i missing any provider to load please see my smack.provider as , i am not be able to see incoming Message packets for pubsub

<?xml version="1.0"?>

query

jabber:iq:private

org.jivesoftware.smackx.PrivateDataManager$PrivateDataIQProvider</cl assName>

query

jabber:iq:time

org.jivesoftware.smackx.packet.Time

x

jabber:x:roster

org.jivesoftware.smackx.provider.RosterExchangeProvider

x

jabber:x:event

org.jivesoftware.smackx.provider.MessageEventProvider

active

http://jabber.org/protocol/chatstates

org.jivesoftware.smackx.packet.ChatStateExtension$Provider</classNam e>

composing

http://jabber.org/protocol/chatstates

org.jivesoftware.smackx.packet.ChatStateExtension$Provider</classNam e>

paused

http://jabber.org/protocol/chatstates

org.jivesoftware.smackx.packet.ChatStateExtension$Provider</classNam e>

inactive

http://jabber.org/protocol/chatstates

org.jivesoftware.smackx.packet.ChatStateExtension$Provider</classNam e>

gone

http://jabber.org/protocol/chatstates

org.jivesoftware.smackx.packet.ChatStateExtension$Provider</classNam e>

html

http://jabber.org/protocol/xhtml-im

org.jivesoftware.smackx.provider.XHTMLExtensionProvider

x

jabber:x:conference

org.jivesoftware.smackx.GroupChatInvitation$Provider

query

http://jabber.org/protocol/disco#items

org.jivesoftware.smackx.provider.DiscoverItemsProvider

query

http://jabber.org/protocol/disco#info

org.jivesoftware.smackx.provider.DiscoverInfoProvider

x

jabber:x:data

org.jivesoftware.smackx.provider.DataFormProvider

x

http://jabber.org/protocol/muc#user

org.jivesoftware.smackx.provider.MUCUserProvider

query

http://jabber.org/protocol/muc#admin

org.jivesoftware.smackx.provider.MUCAdminProvider

query

http://jabber.org/protocol/muc#owner

org.jivesoftware.smackx.provider.MUCOwnerProvider

x

jabber:x:delay

org.jivesoftware.smackx.provider.DelayInformationProvider

delay

urn:xmpp:delay

org.jivesoftware.smackx.provider.DelayInfoProvider

query

jabber:iq:version

org.jivesoftware.smackx.packet.Version

vCard

vcard-temp

org.jivesoftware.smackx.provider.VCardProvider

offline

http://jabber.org/protocol/offline

org.jivesoftware.smackx.packet.OfflineMessageRequest$Provider</class Name>

offline

http://jabber.org/protocol/offline

org.jivesoftware.smackx.packet.OfflineMessageInfo$Provider</classNam e>

query

jabber:iq:last

org.jivesoftware.smackx.packet.LastActivity$Provider

query

jabber:iq:search

org.jivesoftware.smackx.search.UserSearch$Provider

sharedgroup

http://www.jivesoftware.org/protocol/sharedgroup

org.jivesoftware.smackx.packet.SharedGroupsInfo$Provider

addresses

http://jabber.org/protocol/address

org.jivesoftware.smackx.provider.MultipleAddressesProvider</classNam e>

query

jabber:iq:privacy

org.jivesoftware.smack.provider.PrivacyProvider

command

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider

bad-action

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$BadActionE rror

malformed-actionn

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$MalformedA ctionError

bad-locale

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$BadLocaleE rror

bad-payload

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$BadPayload Error

bad-sessionid

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$BadSession IDError

session-expired

http://jabber.org/protocol/commands

org.jivesoftware.smackx.provider.AdHocCommandDataProvider$SessionExp iredError

offer

http://jabber.org/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.OfferRequestProvider</class Name>

offer-revoke

http://jabber.org/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.OfferRevokeProvider</classN ame>

agent-status-request

http://jabber.org/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.AgentStatusRequest$Provider

transcripts

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.TranscriptsProvider</classN ame>

transcript

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.TranscriptProvider</classNa me>

workgroups

http://jabber.org/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups$Provider</c lassName>

agent-info

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.AgentInfo$Provider</classNa me>

transcript-search

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.TranscriptSearch$Provider</ className>

occupants-info

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.packet.OccupantsInfo$Provider</cla ssName>

chat-settings

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.settings.ChatSettings$InternalProv ider

chat-notes

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes$Provider</clas sName>

chat-sessions

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.ext.history.AgentChatHistory$Inter nalProvider

offline-settings

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.settings.OfflineSettings$InternalP rovider

sound-settings

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.settings.SoundSettings$InternalPro vider

workgroup-properties

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.settings.WorkgroupProperties$Inter nalProvider

search-settings

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.settings.SearchSettings$InternalPr ovider

workgroup-form

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm$InternalPr ovider

macros

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.ext.macros.Macros$InternalProvider

chat-metadata

http://jivesoftware.com/protocol/workgroup

org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata$Provider< /className>

generic-metadata

    <namespace>[http://jivesoftware.com/protocol/workgroup](http://jivesoftware.com/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.settings.GenericSettings$InternalP rovider

monitor

    <namespace>[http://jivesoftware.com/protocol/workgroup](http://jivesoftware.com/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.MonitorPacket$InternalProvi der

queue-status

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.QueueUpdate$Provider</class Name>

workgroup

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.WorkgroupInformation$Provid er

metadata

    <namespace>[http://jivesoftware.com/protocol/workgroup](http://jivesoftware.com/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.MetaDataProvider

session

    <namespace>[http://jivesoftware.com/protocol/workgroup](http://jivesoftware.com/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.SessionID$Provider</classNa me>

user

    <namespace>[http://jivesoftware.com/protocol/workgroup](http://jivesoftware.com/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.UserID$Provider

agent-status

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.AgentStatus$Provider</class Name>

notify-queue-details

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.QueueDetails$Provider</clas sName>

notify-queue

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.QueueOverview$Provider</cla ssName>

invite

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.RoomInvitation$Provider</cl assName>

transfer

    <namespace>[http://jabber.org/protocol/workgroup](http://jabber.org/protocol/workgroup)</namespace>

org.jivesoftware.smackx.workgroup.packet.RoomTransfer$Provider</clas sName>

headers

    <namespace>[http://jabber.org/protocol/shim](http://jabber.org/protocol/shim)</namespace>

org.jivesoftware.smackx.provider.HeadersProvider

header

    <namespace>[http://jabber.org/protocol/shim](http://jabber.org/protocol/shim)</namespace>

org.jivesoftware.smackx.provider.HeaderProvider

pubsub

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.PubSubProvider

create

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.SimpleNodeProvider</classNam e>

items

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.ItemsProvider

item

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.ItemProvider

subscriptions

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.SubscriptionsProvider</class Name>

subscription

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.SubscriptionProvider</classN ame>

affiliations

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.AffiliationsProvider</classN ame>

affiliation

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.AffiliationProvider</classNa me>

options

    <namespace>[http://jabber.org/protocol/pubsub](http://jabber.org/protocol/pubsub)</namespace>

org.jivesoftware.smackx.pubsub.provider.FormNodeProvider

pubsub

    <namespace>[http://jabber.org/protocol/pubsub#owner](http://jabber.org/protocol/pubsub#owner)</namespace>

org.jivesoftware.smackx.pubsub.provider.PubSubProvider

configure

    <namespace>[http://jabber.org/protocol/pubsub#owner](http://jabber.org/protocol/pubsub#owner)</namespace>

org.jivesoftware.smackx.pubsub.provider.FormNodeProvider

default

    <namespace>[http://jabber.org/protocol/pubsub#owner](http://jabber.org/protocol/pubsub#owner)</namespace>

org.jivesoftware.smackx.pubsub.provider.FormNodeProvider

event

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.EventProvider

configuration

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.ConfigEventProvider</classNa me>

delete

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.SimpleNodeProvider</classNam e>

options

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.FormNodeProvider

items

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.ItemsProvider

item

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.ItemProvider

retract

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.RetractEventProvider</classN ame>

purge

    <namespace>[http://jabber.org/protocol/pubsub#event](http://jabber.org/protocol/pubsub#event)</namespace>

org.jivesoftware.smackx.pubsub.provider.SimpleNodeProvider</classNam e>

nick

    <namespace>[http://jabber.org/protocol/nick](http://jabber.org/protocol/nick)</namespace>

org.jivesoftware.smackx.packet.Nick$Provider

attention

urn:xmpp:attention:0

org.jivesoftware.smackx.packet.AttentionExtension$Provider</classNam e>

i tried on latest Smack API with smack debug window , with simple java program , but still m not be able to get the Message packet.