The UrlFetcher Java library is pretty well commented, and should answer most of your questions about how everything works. The UrlFetcherLS library in LotusScript is just an LS2J wrapper around the Java stuff, and it's not nearly as well documented, but just read the comments in the Java class and you'll figure it out.
There are also a few sample agents that show how some of the functionality works. For example:
Option Public Option Declare Use "UrlFetcherLS" Sub Initialize Dim fetcher As New UrlFetcher Print fetcher.getUrlAsString("http://www.nsftools.com") End Sub
That's not too bad, is it? You can also get HTTP headers, set headers, add POST parameters, make proxy settings, and a few other things. I even have an example of making an SSL/HTTPS request, but that's Notes 7 only. Everything else should work in both Notes 6 and 7.
This is cool. There's inline spellcheck in Gmail Firefox -- using the familiar red dotted underline for unknown words and right-click to get suggestions:
Then again, maybe it's been there for a while (UPDATE: yes, it has...) and I've never noticed (UPDATE: stupid, stupid, stupid...). It works in Gmail chat too.
Even if you're not specifically interested in trying to make your Domino Web Services fully WS-I compliant, there are some great tips and gotchas in there, including:
Regarding arrays as parameters using custom classes/complex data types, here's how I like to set that up:
Class PhoneNumbers Public phoneNumberArray() As String Public count As Integer End Class Class DirectoryAssistance Public Function reverseLookup (nums As PhoneNumbers) As NameList ... End Function End Class
I mention this type of setup in one of my web services articles. The nice thing about this structure is that it's easy for the client to determine whether or not an array that is a return value is empty (count=0) or not -- you can decide for yourself if you want to enforce proper "count" values on the server side when accepting the class as a parameter.
Luckily, it also seems to have the fortunate side-effect of making the arrays work properly as method parameters for WSDL formats other than RPC/Encoded. I need to do some more testing to confirm, but I don't remember having problems before, and the new "WS-I Compliant Web Services" article seems to say that it's true.
First, SPR #SBRN5PGPCN describes a fix for TNEF extraction on Domino. The really interesting thing is that it applies to Domino 7.0.2 and 6.5.6. So maybe native TNEF extraction is in the Domino 6.5.6 server too? That would be cool. I'm not sure if I saw that anywhere before or not.
Second, Technote #1202732 describes a scenario where Java JAR files that are attached to agents or script libraries can cause Out Of Memory errors. There's an SPR associated with it, which would seem to indicate that it's a problem that hasn't been fixed yet. The solution is to detach the JAR file to the local file system and access it that way (either the JavaUserClasses INI setting or just plopping it in the JRE ext directory).
The wording of the technote (at the time I'm writing this -- it may change) makes it a little unclear as to whether this affects code that run on servers, or just clients. It talks about a "Domino client" (?!?), and also mentions that if you access the library using JavaUserClasses then every time the JAR file changes "you must copy it to your local server" -- and, um, I don't think that a Notes client that has a JAR file listed in JavaUserClasses would look on a Domino server for a JAR file. But hey, maybe it does, and that's one more thing I don't know.
In the last week or so, I've seen links to two very interesting other ways of debugging JavaScript in IE:
So, new toys to try...
UPDATE: I got some great suggestions in the comments so far, including:
Sub Initialize '** this will give you the whole web page, not including the HTTP Headers, '** as raw HTML/XML text Dim XmlHttpRequest As Variant Dim response As String Set XmlHttpRequest = CreateObject("Microsoft.XMLHTTP") Call XmlHttpRequest.Open("GET", "http://www.google.com", False) Call XmlHttpRequest.Send() response = XmlHttpRequest.responseText '** this will give you the body of the web page, translated to NotesRichText '** (the HTTP headers are available as individual fields -- one for each header '** name -- on the document) Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim pageBody As String Set db = session.CurrentDatabase Set doc = db.GetDocumentByURL("http://www.google.com", True) pageBody = doc.GetItemValue("Body")(0) Call doc.Remove(True) End Sub
If you run this on a server, make sure you have the "Runtime Security Level" set to at least "2", since you're doing network operations.
Also, the GetDocumentByURL method uses the Web Navigator database somehow (perweb.nsf on the client, or web.nsf plus the WEB service on a server), so make sure that's all set up properly. That database can get kind of funky sometimes and cause problems, as John Roling can tell you. On the other hand, the XmlHttpRequest method only works on Windows, so choose your poison.
BONUS: Thomas Adrian has a good quick reference on his site too.
UPDATE: Markus Koller mentioned in the comments that ServerXmlHttp might be a better option than XmlHttp for this -- and he linked to a very good Microsoft Knowledgebase article describing the difference between the two. Looks like ServerXmlHttp allows you to set up some proxy settings, which could be very handy. Thanks Markus!
technorati tag: Show-n-tell thursday, SnTT
However, I knew that "bunch" wasn't the correct word for a group of rabbits. I know that cows are in herds, birds are in flocks, and even that frogs are in armies. But I had no idea what the collective name for rabbits was.
Go Google, go! After one or two searches and a few clicked links, I found two excellent references:
The reference.com page is a little more complete, but the San Diego Zoo site has some great links with more information about the animals themselves. I think my favorites on the list were a plague of locusts, and a shiver of sharks. A parliament of owls and a scourge or mosquitoes were probably close seconds.
Oh, and rabbits come in "warrens" (there were a few other names, but that seemed the most common in other references).
You can just feel the love right there, can't you?
She's actually a really good dog, except for the fact that she's not quite housebroken yet. We're still trying out different names on her. I'm currently leaning toward the name: "It Shits All Over The House" -- that would be "Isaoth" for short, but it doesn't have a good ring to it. We'll see.
Produced by Tim Minear (producer/co-writer of Firefly and Angel) and starring Nathan Fillion (star of Firefly), it was a show that Joss Whedon fans at least had to try -- I tried it and liked it. A lot.
After only four episodes, it got pulled off the air. Rumor has it that it got poor ratings and it was also lowering ratings for '24'.
However, that just doesn't sound right to me. There are plenty of truly lousy shows that last WAY more than 4 episodes. And if it was a ratings issue for '24', they could have just moved it to another night. There's got to be something else going on there. Here are my conspiracy theories:
I'm pretty fond of the last theory, even if it's kind of far-fetched. Firefly was hugely successful AFTER it got cancelled by Fox, and has sold a whole lot of DVD box sets. The success was largely a word-of-mouth and Internet grassroots effort. Fox will supposedly air the LAST two episodes of the show this summer, but I'm wondering if they might continue on where they left off if there's enough "underground" interest -- especially because there would be much less competition from other popular shows over the summer.
Maybe it's just wishful thinking on my part too...
Oh, and if you missed the show, now's a good time to watch the first 4 episodes. You can buy the episodes for $1.99 each at the official BitTorrent site, or I've heard that the torrents are also available for download on "other" servers. I'm not sure if a Google search for "drive fox torrent" would help there or not.