title: How do I implement a Rails push notification service consumer over XML/HTTP?
body: <p>I'm trying to write an XML over HTTP push notification consumer that accepts the push notifications and parses the XML and saves the data in the database. I've looked at the Nokogiri gem which is a neat XML parser. What fails me is that I plan to only accept the notifications when a user on my app subscribes to receive their activity feed.</p>
  
  <p>So, I'm expecting the notification in this format 
  <code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;Activities xmlns=""&gt;
      &lt;RecordSet&gt;
         &lt;Record&gt;
            &lt;ACTIVITY_DATE&gt;2011-05-10&lt;/ACTIVITY_DATE&gt;
            &lt;ACTIVITY_TYPE&gt;FOO&lt;/ACTIVITY_TYPE&gt;
            &lt;ACCOUNT_ID&gt;0123456789&lt;/ACCOUNT_ID&gt;
            &lt;SENDER_FIRST_NAME&gt;John&lt;/SENDER_FIRST_NAME&gt;
            &lt;SENDER_MIDDLE_NAME&gt;S.&lt;/SENDER_MIDDLE_NAME&gt;
            &lt;SENDER_LAST_NAME&gt;Karanja&lt;/SENDER_LAST_NAME&gt;
         &lt;/Record&gt;
         ...
      &lt;/RecordSet&gt;
  &lt;/Activities&gt;</code></p>
  
  <p>I am expected to respond by sending an XML with a status code back to the notification server. I have looked at this <a href="http://rubyx.com/2011/03/31/rolling-your-own-ruby-soap-client-with-typhoeus-and-nokogiri" rel="nofollow">example</a> and <a href="http://clarkware.com/blog/2005/7/12/producing-and-consuming-xml-over-http-with-rails" rel="nofollow">this</a></p>
  
  <p>but both seem not to address my needs. How would I go about this, especially how to keep an open pipe for incoming notifications. And is there such a rubygem that is tailored for this?</p>