The November 2006 Blog
send me a comment

Compiling Notes API Programs with MinGW (Thursday, Nov 30)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

In response to an earlier blog entry about using Visual Studio Express to write/compile a Notes C-API program (after giving up on using MinGW and Eclipse CDT), I just got a comment by Ed Schaller that he has posted some initial instructions on getting everything working with MinGW on Windows:

Here's his article: MingW32 & Lotus Notes API

I might have to give it another try...

Animated Favicons (Tuesday, Nov 21)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

I was reading an article on the Microsoft Watch site the other day when I noticed that their favicon (you know, that little icon that shows up in the browser address bar next to the URL) was moving. Moving, I tell you! It was in motion. Not standing still...

I thought to myself: "Hmm, I thought favicon files had to be bitmaps. How do you make a bitmap move?"

Then I had a better thought: "Why don't I just do a View-Source and see what the heck is going on?" So I did. And at the top of the HTML page they have:

<link rel="shortcut icon" 
    href="http://www.microsoft-watch.com/favicon.ico" >
<link rel="icon" 
    href="http://www.microsoft-watch.com/favicon-anim.gif" 
    type="image/gif" >

Dancing Banana Coolness. You can define an alternate icon that's an animated GIF.

I was going to do that myself, but I have no graphic design abilities and I couldn't think of anything that wasn't obnoxious and blinky. But it would be a fun way to add a little bling bling to the ol' site.

NOTE: interestingly enough, I didn't see ANY favicon for that site in IE6, only Firefox.

UPDATE: here's a fun little animated Domino favicon: Domino Favicon Animated

Spelling Expeditor (Monday, Nov 20)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Inspired by Ben Langhinrichs' recent blog entry on mnemonics, I've been trying to figure out a way to remember how to spell Lotus Expeditor (apparently the unusual spelling is intentional). Here's what I came up with:

I built an Editor in Expeditor.

Cause, you know, "Expeditor" contains the word "editor" at the end of it.

Sorry, that's the best I can do. Back to your regularly scheduled technical gibberish.

HTTPS Web Service Connections Using Stubby (Sunday, Nov 19)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Currently, if you use the Stubby application to generate files to access a web service in Lotus Notes, and the endpoint is a secure connection with an https:// URL, you will get the following error:

java.lang.NullPointerException
    at lotus.domino.axis.AxisFault.makeFault(Unknown Source)
    at lotus.domino.axis.transport.http.HTTPSender.invoke(Unknown Source)
    ...

This is because the Apache Axis SocketFactory classes that handle SSL connections seem to have been excluded from the Axis package that was shipped with Lotus Notes/Domino 7.0. I can't find them anyway, and neither can my web service agents. So...

short version:
Here's how to make it work:

This should allow you to properly make the connection and go on with your life.

long version:
It appears that IBM stripped all of the SSL functionality out of Axis when they packaged it up for Domino 7.0, so the HTTPS connection classes just aren't even there. This was probably a wise idea from a support standpoint -- just in case people like me tried to hack together web service clients like this -- because making "proper" SSL connections in Java requires creating keystores and importing certificates and other stuff that's a pain in the butt.

Anyway, the NullPointerException that was being thrown was actually telling you that there were no classes available to create an SSL socket -- although that wasn't obvious at all based on the error message. To fix that, I took the relevant HTTPS connection classes out of the Axis 1.1 distribution, made some modifications to make them work with Notes, and compiled them up into a JAR file.

To use them, just follow the instructions above.

I'm not really crazy about a solution that requires you to copy a file to the /notes/jvm/lib/ext directory, because it's not transparent, it requires intervention on client/server machines, and it requires a client or server restart, but that was the only way I could find to do it for now. The unusual way that Axis loads the SocketFactory classes seems to require that the class files are actually available on the local filesystem, not attached to an agent or script library.

Notes on Linux Install Script (Saturday, Nov 18)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Nick Boldt wrote an interactive script for installing all the Notes client on Linux package dependencies. Sounds handy. I didn't really have any issues when I installed on CentOS, but I've heard that people have had plenty of problems with missing packages.

Web Services in Domino, Part 2 (Tuesday, Nov 14)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Hey, the second article in my Practical Web Services in Domino 7 series on developerWorks got published today. And this one has code!

In the article, I specifically go over:

The sample database that can be downloaded with the article has:

At the very least, after finishing the article you should be able to write your own simple web services right away. The next article in the series has the really fun stuff in it: complex data types, file attachments, enumerations, and Faults. With any luck, Part 3 will get published before the end of the month!

Virtual Machine Restrictions for Windows Vista (Sunday, Nov 12)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Here's an interesting little tidbit from the Gartner Windows Vista blog:

Among Microsoft's new restrictions in the Windows Vista End User License Agreement (EULA) is that neither Windows Vista Home Basic nor Windows Vista Home Premium may be run in a Virtual Machine. Like Windows Rootkits... there is a risk that a VM Rootkit gets installed unbeknownst to the consumer. Microsoft says that consumers donít understand the risks of running virtual machines, and they only want enterprises that understand the risks running Vista on a VM.

They go on to say that the more expensive Vista Business and Vista Ultimate versions don't have the EULA restriction.

Madness.

SoapLog 1.0.4 (Wednesday, Nov 8)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

A special Friends-and-Family version of the SoapLog DSAPI Filter: now with file attachments!

In this exciting version of SoapLog, the full text of the SOAP request and response are also logged to a text file which is then attached to each log document in the SoapLog database. This avoids the embarrassing problem of Notes text fields being limited to only 32,000 characters.

Enjoy. Time to watch 'Lost' now.

Anniversaries... and Web Services(?) (Tuesday, Nov 7)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Yes, that is indeed a picture of me, and it was my birthday the other day. Bruce must have called in a few favors to get a hold of that old picture. Oh boy...

So I've have a lot of anniversaries lately:

As an interesting happenstance, our very first TakingNotes podcast was a discussion of Web Services in Domino, and just today I had part one of my three part series of articles on Web Services in Domino published on developerWorks! I just won't shut up about Web Services, I guess.

The first article is just a general overview of Web Services and SOA -- nothing Domino-specific in there, and it's really just a primer to explain how some of the pieces fit together. Articles two and three (which have already been written and submitted, so they should be out soon too) get into the nuts and bolts of programming Web Services in Domino. They'll have everything from simple web services to complex ones that handle file attachments and enumerations, and there's even a long discussion of how to test your web services once you've written them.

I'm really excited for all the articles to get published, because it was so much fun to write them (and the sample code, which is in both LotusScript and Java). Coming soon to a developerWorks near you...

Writing A Notes C-API Program in Visual Studio Express, Part 3 (Sunday, Nov 5)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

Following up on my earlier blog entries about writing a Lotus Notes C-API program in Visual Studio Express (Part 1 and Part 2), here's another thing you might want to do that isn't really obvious.

You know how when you view the properties of most commercial EXE and DLL files, and you see properties like the program description and the version number and so on? For example:

SoapLog DLL Properties Dialog

In the full versions of Visual Studio, there is something called the Resource Editor that makes it very easy to create all those properties for your EXE or DLL. However, in the free Visual Studio Express offering that's one of the components they took out.

Luckily, you can still create a resource file and include it with your project, you just have to do it manually. Here's how:

Badda bing, badda boom, you've got yourself a resource file. The next time you compile up your project, it'll have some of those fancy-schmancy properties lists that everyone wants these days.

The exact format and information that you put into a resource file is a little cryptic (which is why there is such thing as a Resource File editor in the first place), but you can usually start with an example and modify it to work for you. Here's the resource file I used for my SoapLog DLL:

//////////////////////////////////////////////////////////
// resource file for soaplog.dll
//////////////////////////////////////////////////////////

#include "soaplog.h"
/*
soaplog.h contains definitions like:
#define RC_FILEVERSION  1,0,3,0
#define RC_FILEVERSION_STRING  "1, 0, 3, 0\0"
*/

1 VERSIONINFO
FILEVERSION RC_FILEVERSION
PRODUCTVERSION RC_FILEVERSION

FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x1L
#else
  FILEFLAGS 0x0L
#endif

FILEOS 0x4L
FILETYPE 0x2L    // 0x1L = EXE, 0x2L = DLL
FILESUBTYPE 0x0L

BEGIN
   BLOCK "StringFileInfo"
   BEGIN

      //////////////////////////////////////////////////////////
      // The BLOCK number here consists of a 4-digit language
      // value (0409 = US English) and a 4-digit codepage
      // number, in hex (04e4 = 1252).
      //////////////////////////////////////////////////////////

      BLOCK "040904e4"
      BEGIN
         VALUE "CompanyName", "http://www.nsftools.com"
         VALUE "LegalCopyright", "(c) 2006 Julian Robichaux. All rights reserved."
         VALUE "FileDescription", "Domino DSAPI SOAP logging filter"
         VALUE "FileVersion", RC_FILEVERSION_STRING
         VALUE "InternalName", "soaplog"
         VALUE "OriginalFilename", "soaplog.dll"
         VALUE "ProductName", "soaplog"
         VALUE "ProductVersion", RC_FILEVERSION_STRING
      END
   END
  
   //////////////////////////////////////////////////////////
   // for valid language and charset values below, see:
   // http://msdn.microsoft.com/library/en-us/tools/tools/versioninfo_resource.asp
   // NOTE that the language value below (409, US English)
   // MUST match the StringFileInfo BLOCK number above, and
   // the 04e4 suffix on the BLOCK number is a hex version of 
   // the 1252 codepage that is also defined below.
   //////////////////////////////////////////////////////////

   BLOCK "VarFileInfo"
   BEGIN
      VALUE "Translation", 0x409, 1252
   END

END

One thing that is useful to do is to maintain the file version and product version information in a header file (as I did above with RC_FILEVERSION and RC_FILEVERSIONSTRING), because that's something that may change often. Since you can't edit a resource file in VS-Express but you can edit all the header files you want, keeping this information in a header file is a lot easier than having to remember to open the resource file in a separate text editor every time you update the version of your file.

I suppose you could go whole hog and maintain all the String values in a header file, if you really felt like it.

Bunko (Yeah, right...) (Thursday, Nov 2)
[ permalink ] [ GoogleTrack ] [ e-mail me ] [ >> ]

My wife went to play Bunko with a bunch of the neighborhood women tonight. Apparently there's a monthly game, and she thought it would be a good way to meet the neighbors.

I asked her what Bunko was, since I've never actually seen it played before. She didn't know because she's never played before either, but she's always heard it's fun.

Then I talked to one of my friends tonight, and he said that his wife likes to go play Bunko too, and he also had no idea what it is. Which leads me to one of two conclusions:

A. It's a drinking game.
B. It's the female equivalent of a snipe hunt where the women just hang out all night, unless there's a new member, in which case they go through some sort of Bunko initiation routine before letting on that it's just an excuse to get out of the house and drink wine and do girly stuff.

I'm going to grill her when she gets home to find out which one it is...
;-)

(NOTE: before you consider leaving a witty comment, please make sure it's not going to be something that will be insulting about my wife. We don't want to go there. Thanks.)