« April 2009 | Main | June 2009 »

10 posts from May 2009

05/30/2009

Groovy XMLRPC: Tying the Blog Pinger Scripts Together

With a little free time today while waiting for my change window to start, I've taken the four groovy xmlrpc-based scripts from this article and from this one and consolidated them into one. The format of these RPC interfaces to a blog directory's ping API are surprisingly similar, which makes me assume that some dude wrote one that everyone copies. All of these services look for a blog title, followed by the URL of your blog. Some of them also utilize an "Extended" ping service for including your site's feed URL. Essentially though, these are a bunch of HTTP POSTs—just look at a wireshark trace.

My next step is to see if I can consolidate these further and make them worthy of the respect and admiration of a mainstream groovy developer. Here's the current iteration of this script.

#!/usr/bin/env groovy
/* Written by Chris M. 
 https://blog.techstacks.com/
# The first version of this script tied the 6 XML-RPC-based 
# Blog Ping scripts together into one somewhat fancier script. 
# Not very elegant but less scripts to run. The second version
# coverts some of the variables into hashes or arrays
#
# import the XML-RPC service */
import groovy.net.xmlrpc.*

// Define the Ping URL "endpoints"
def technoratiURL = "https://rpc.technorati.com/rpc/ping"
def icerocketURL = "https://rpc.icerocket.com:10080/"
def blogsURL = "https://ping.blo.gs/"
def weblogsURL = "https://rpc.weblogs.com/RPC2"
def bloglinesURL = "https://www.bloglines.com/ping"
def blogcatalogURL = "https://rpc.blogcatalog.com/"

def urls = [
 Technorati:"https://rpc.technorati.com/rpc/ping",
 IceRocket:"https://rpc.icerocket.com:10080/",
 'Blo.gs':"https://ping.blo.gs/",
 Weblogs:"https://rpc.weblogs.com/RPC2",
 Bloglines:"https://www.bloglines.com/ping",
 BlogCatalog:"https://rpc.blogcatalog.com/"
 ]
assert urls.size() == 6
assert urls['Blo.gs'] == 'https://ping.blo.gs/'

// You'll want to make this next section your own
def myblogTitle = "blogging techstacks"
def myblogURL = "https://blog.techstacks.com/"
def myfeedURL = "https://feeds2.feedburner.com/BloggingTechstacks"

// Here is the section responsible for iterating through each ping
// url.

def technoServer = new XMLRPCServerProxy(technoratiURL)
def icerocketServer = new XMLRPCServerProxy(icerocketURL)
def blogsServer = new XMLRPCServerProxy(blogsURL)
def weblogsServer = new XMLRPCServerProxy(weblogsURL)
def bloglinesServer = new XMLRPCServerProxy(bloglinesURL)
def blogcatalogServer = new XMLRPCServerProxy(blogcatalogURL)

def technoResult = technoServer.weblogUpdates.ping(myblogTitle, myblogURL)
def icerocketResult = icerocketServer.ping(myblogTitle, myblogURL)
def blogsResult = blogsServer.weblogUpdates.extendedPing(myblogTitle, myblogURL, myfeedURL)
def weblogsResult = weblogsServer.weblogUpdates.extendedPing(myblogTitle, myblogURL, myfeedURL)
def bloglinesResult = bloglinesServer.weblogUpdates.extendedPing(myblogTitle, myblogURL, myfeedURL)
def blogcatalogResult = blogcatalogServer.weblogUpdates.ping(myblogTitle, myblogURL)

// Here is the section responsible for displaying output
// Technorati's been unavailable a lot lately due to a colo move.

if (technoResult != null)
 println "Thanks for the ping from Technorati"

if (icerocketResult != null)
 println "Thanks for the ping from IceRocket!!"

if (blogsResult != null)
 println "Thanks for the ping from Blo.gs"

if (weblogsResult != null)
 println "Thanks for the ping from Weblogs.com"

if (bloglinesResult != null)
 println "Thanks for the ping from Bloglines"

if (blogcatalogResult != null)
 println "Thanks for the ping from BlogCatalog"

05/26/2009

On SSL Warnings and Text Link Ads

I'm not a user of the Ad Services that Text-Link-Ads provides. I signed up a while ago but have been rejected, presumably because my site doesn't generate a ton of traffic. This is probably the same reason why the Amazon Affiliate product links on this site result only result in referrals with no purchases. It's either that or I'm no master marketer--one or the other, (or perhaps both!). Be that as it may, I signed on to Text Link Ads site today and was greeted with the dreaded SSL warning that was the scourge of my professional life several years ago:  The Unknown CA Signer Certificate Warning

Textlinkads-ssl-cert-wtf


Several years ago, Verisign began signing their new certs with an Intermediate Certificate.   Only IIS will extract the Intermediate Certificate from the SSL certificate that Verisign mails to you--IIS users don't have to do much to use verisign intermediate CA signed certificates (unless deploying the same certificate across multiple servers).  Apache users must download the Intermediate Certificate from Verisign's site and either import the Certificate into openssl's ca-bundle or, preferably, include that intermediate certificate in the web servers configuration using the SSLCertificateChainFile directive.

JBossAS 5.1 Released

Well, I missed it, too, but it was a holiday weekend here in the States. JBoss Application Server 5.1 has been released, which now means I'm 6 releases behind. Community downloads are at the usual place. Release notes are here.