On Wed, Oct 24, 2012 at 11:03 AM, Andrea Candini <[email protected]>wrote:

> I finally managed to put my .war file online, but I still have the same
> problem. You can access my feed from this 
> link<http://receivetemplate.eu01.aws.af.cm/feed/>:
> do you spot any error in the RSS code? My callback is 
> here<http://receivetemplate.eu01.aws.af.cm/receivefromhub>,
> instead: when it receives a GET request it shows a simple text line, while
> it should create an empy txt file if it receives a POST message (I haven't
> implemented anything in particular at the moment, as I would like to get at
> least the base part right).
>
> Subscription confirmation should be automatically done by the PuSHhandler
> class, if I understand properly the code: do I have to implement
> processFeed() method in order for it to work?
> I tried to subscribe from https://pubsubhubbub.appspot.com/subscribe too,
> but result is the same.
>

You are right that PuSHhandler implements subscription confirmation but
there is a catch.

Around line 73-82 of
PuSHhandler.java<http://code.google.com/p/pubsubhubbub-java/source/browse/trunk/Subscriber-v0.3/src/PubSubHubbub/PuSHhandler.java>
you
can see that the subscriber will confirm only subscriptions that were
explicitly put in the static approvedActions collection. By default the
collection is empty, so the subscriber will refuse to subscribe to
anything. You can remove these lines and replace them with the following:

  stsMessage = MessageStatus.OK_Challenge;

Roman.

Reply via email to