Looking for my RSS feed? Here it is!

English Standard Version Bible Web Service via WCF

Tuesday, March 13, 2007

Many of the applications that I create are Bible based applications and my designs are made easier thanks to the the English Standard Version of Scripture. Long before I used it for development, I fell in love with it and made it my primary Bible version, not only because it's an incredible Bible translation with incredible accuracy and amazing readability, but also because it's so widely accessible. Their website at http://www.gnpcb.org/esv/ is by far one of my favorite websites. I can read on my screen, adjusting the font-size on a whim or click on an audio link to listen to any chapter in a variety of formats. Furthermore, they have great Firefox support and great technical articles explaining the internals of the system.

Not only that, you can also access the ESV text through e-mail and through a SOAP interface. Being someone deeply involved with interop and someone who has commited myself to the study of Scripture I am overjoyed to have the ability to directly access the ESV Bible data source. That said, now adays I'm a WCF user and the ESV Bible Web Service interface has methods and properties which, when used in WCF, are very Java-ish. Not a problem... I went ahead and got the svcutil code and modified it a bit to make the proxy follow the .NET Framework Design Guidelines. I cleaned up the svcutil output, added XML comments, added an added enumeration class and then split into different files for easier modification. Feel free to take the classes and combine them back into one proxy file as you wish. Here is a sample application using the fixed proxy:

using (ESVBibleClient client = new ESVBibleClient( )) {
    OutputOptions options = new OutputOptions( );
    options.IncludeFootnotes = true;
    options.IncludeCopyright = true;
    options.OutputFormat = OutputFormat.PlainText;

    String text = client.DoPassageQuery("TEST", "1 John 2", options);

    Console.WriteLine(text);
    Console.ReadLine( );
}

The proxy files as well as links to the ESV Bible website and resources are below:

Math Problem: 5 + 7 (type the answer in the box)

Notice: all comments are subject to moderation.

Comment saved. All comments are moderated and may not show up for some time.

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.

Powered by the Minima Blog Engine, NetFXHarmonics Prominax, and Squid Micro-Blogging library.

Developed using NetFXHarmonics DevServer.

Mini-icons are part of the Silk Icons set of icons at famfamfam.com