Search

Mobile tag

About Me

I am the "IBM Collaboration & Productivity Advisor" for IBM Asia Pacific. I'm based in Singapore.
Reach out to me via:
Follow notessensei on Twitter
(posts)
Skype
Sametime
IBM
Facebook
LinkedIn
XING
Amazon Store
Amazon Kindle

Twitter

Domino Upgrade

VersionSupport end
5.0
6.0
6.5
7.0
Upgrade to 8.5x now!
(see the full Lotus lifcyle) To make your upgrade a success use the Upgrade Cheat Sheet. Contemplating to replace Notes? You have to read this!

Languages

Other languages on request.

Visitors

Useful Tools

Get Firefox
Use OpenDNS
The support for Windows XP is coming to an end and has . Time to consider an alternative to move on. sounds like a lot of time, but, like an object in a mirror, it is closer than you think.

14/05/2012

Fun with TCPMon and Lotus Traveler

QuickImage Martin Luther (the original) famously stated "man muss dem Volk aufs Maul schauen" (roughly translated: "you have to watch how people talk". What worked for a bible translation also works in IT.
While it is nice to have some documentation, quite often it is inaccurate, incomplete, outdated, factual wrong or simply missing. So listening to "how applications speak" is an essential skill, mentioned here before. In this little weekend project these skills get applied to Lotus Traveler. These are our ingredients:
  1. Domino server with installed Traveler listening on http Port 80 (https won't do). Also make sure that compression is switched off in the internet site document for traveler, it's no fun to watch gzip encoded data
  2. Apache TCPMon installed and listening on port 8888 in proxy mode
  3. The Android SDK, installed with an Android device emulator. Alternative: a physical Android device (and your ports open on your machine)
We will configure the Android to use the PC as the proxy and then install Lotus Traveler and sync data. TCPMon will show us what's on the wire (Windows user could use Fiddler as alternative to TCPMon. Let's get started:
  1. TCPMon needs to be configured in Proxy mode.
    Setting up of TCPMon
    You can test if that is working by pointing your browser's proxy setting to 127.0.0.1:8888. Note: you need the real IP in the Android phone or emulator. The TCPMon screen then nicely shows the outgoing requests and incoming responses:
    TCPMon in action
  2. Time to configure an Android emulator. After installing the Android SDK you can launch tools/android from the install directory to download and install the various versions of the Android OS Emulations from 1.0 all the way to 4.0.3. In the Tools menu you can manage your AVD (Android Virtual Devices) and configure different images. The emulator comes with the option of snapshots, quickstart, cold boot etc.
    Various Android Virtual Devices
    I found the 4.0.3 devices substantially slower than the 2.3.x devices, which might be based on the higher default screen resolution. Once you have configured the AVD, you could start it directly from the menu
  3. However starting an AVD from the command line is much more practical, since it allows for a lot of parameters. Most notably the ability to cold-boot and the ability to define a proxy or even dump the whole TCP conversation into a dump file. So I started my AVDs with
    android-sdk-linux/tools/emulator -avd MyPhone -http-proxy 192.168.88.170:8888 and
    android-sdk-linux/tools/emulator -avd IcecreamPhone -http-proxy 192.168.88.170:8888 resulting in
    Android 4.0.3 running
  4. Along the way I encountered a few odities: some of the commands would ignore the proxy parameter and try to reach out directly. I got that sorted out by configuring the device to use the proxy in the access point settings.
    Proxy settings in Android
    (Don't forget to use Menu - save when changing this). Important here is to clear out username, password and server which have a one character value. For a reason beyond my comprehension the initial configuration of traveler would not work with any proxy setting - could be the TCPMon here, with Fiddler it might work - so after downloading the installer, run the installer and download traveler I had to switch off both proxy settings for the initial configuration. The AMD can be just terminated and then called without the proxy parameter and it would resume where it left off
  5. Make sure to have the proxy back in the HTTP stream to watch what is happening. It is quite enlightening
  6. The first thing once the new device is ready is a request to fetch the configuration which against the current fashion is delivered as XML document that very closely resembles DXL. The request looks like this:
    GET http://yourtravelerserver:80/servlet/traveler?action=getConfig&deviceId=Android_somedeviceid HTTP/1.1
    Content-Type: application/x-www-form-urlencoded
    Host: yourtravelerserver:80
    Connection: Keep-Alive
    User-Agent: Lotus Traveler Android 8.5.2.1
    Authorization: Basic Base64EncodedUserNamePassword=
  7. Then you can go on and watch the initial sync happening. To understand what device and server are talking to each other, you need to ask OMA, there the best documentation is available - you might have guessed: Traveler on Android is using SyncML. You can learn how "push" actually works
Next stop: repeat the above on a Mac. On the Mac Traveler uses ActiveSync, so you need to look elsewhere for the documentation. I'll share more about the protocols and findings in future posts (just hope it is raining again on a weekend here).

11/05/2012

In my inbox

One of the things I'm interested in after hours (challenge: what are my after hours) is personal well being and fitness. Since I love technology too I have the geeks view. When surfing at Amazon I came across Fitness for Geeks: Real Science, Great Nutrition, and Good Health and added it to my wishlist.
Opening my mailbox this morning I got pleasantly surprised:
Fitness for Geeks: Real Science, Great Nutrition, and Good Health
Ulrich Krause said thank you, so I say: Thank you Ulrich!

10/05/2012

Getting a Job Done

In a recent chat on the supersecret XPages </bitching><doing> chat Mark Hughes contributed an invaluable 3 liner, too good to miss. I added the 4th one:
  • You pay someone by the hour, they take longer than if you paid them for the job
  • You pay them by the job and it will get rushed
  • You pay them a salary and they dont care if it gets done
  • You unleash their passion for the task - you get results

09/05/2012

Prezi presentation style lessons

While "Death by Powerpoint" is is talk of the town and Prof. Tufte is all against it
The Cognitive Style of PowerPoint
the alternatives are not without risks. As a colleague put it nicely: "Prezi is a presentation tool perfectly capable of making your audience sea sick". Presentation tools used wrongly leave you the choice between nausea and unconciousness. In case you haven't seen prezi before: it is a Flash/Air based tool, that allows to create non-linear presentations that swifle, zoom and rotate through your materials: the cadence of Powerpoint replaced by a visual roller coaster.
Working with it for a while I recognized that there are certain interaction/animation pattern that work well to convey a specific message:
  • Zoom in and out: Going from the big picture into the details. E.g. you could state an agument and then zoom in to prove it. Same applies to keywords and explanations
  • Move linear beween equal sized items: lay out related items and aspects of a topic (often after zooming in). Try to make vertical and horizontal moves not zig-zag and diagonal
  • Rotate around a centre: Reinforce a central topic you rotate around. The mental model here: add spokes to your hub argument to create a wheel (= rounded argument)
  • Swifel slides: Look at the same topic from a different view point, audience or vantage point. It is like different people look at an object from different angles
  • Follow a path: You select a "big picture" as background (a mountain, a road, a plant etc.). You map out your argument along a visible line of that background. It conveys the message "follow my line of argument"
Following these make your presentations more impactful, nevertheless you need to pay attention avoiding nausea. Interactions that negatively influence impact are: wild swiveling, zoom without master/detail relations or zig-zag movements. You still have to work out your message and the visuals. Of course: once you "got" the rules, you are free to break them.
As usual YMMV

30/04/2012

HSBC is starting to seriously annoy me #fail

End of last HSBC Singapore approached me and offered to upgrade my Credit Card to their shiny new VISA Infinite. Unsuspecting for what I was in for I agreed and the trouble started. To give you an idea, this is the content I sent to them on January 14 2012:

From: Stephan Wissel <stephan@wissel.net>
Date: Sat, Jan 14, 2012 at 7:25 PM
Subject: Credit Card in eBanking
To: direct@hsbc.com.sg
Hi there,

I'm using HSBC Credit Cards and I'm currently switching from a Visa Platinum to a Visa Infinite card.
The process you have in place for this needs improvements. These are the problems I encountered so far:
  1. The old card was canceled without notifying me when this will happen (a odd situation when you want to buy something)
  2. The new card hasn't arrived when the old was canceled - you lost quite some money on provisions that way
  3. I got a notification eMail that the new card was approved and that in a few days it will arrlive - I replied that you need to expedite that since I would travel - I never got a reply. If messages like these are sent from an unattended mailbox the mail needs to state that clearly
  4. I logged into my eBanking and the old card has disappeared including the ability to retrieve statements and transfer the open balance. So I can't know what I owe and I can't pay that - rest assure, that I will not pay any late fees
  5. The new card doesn't show in the Internet banking either (anyway I don't have the card with me - I left before it might have arrived at home)
  6. the Internet banking lacks the ability to contact you, so I have to resort to the inherently unsave eMail (unless you can point me to encryption keys we can use)
All in all: I'm very disappointed! I will be back in Singapore next Monday. If you need to call: I'm currently in the GMT-6 timezone, call during daytime here.
 
I never got a reply. So I escalated to the sales lady who sold me in the first place. The matters couldn't be resolved. I never got the new card, so I paid the balance of the old (they sent a paper invoice in the end) and I terminated my customer relationship with HSBC. This didn't stop them sending me a credit card bill for a card I never had demanding the annual fee. So far I sent every invoice back with the statement: "bill for services not rendered, refuse to accept". Today - after they sent another one I replied with a formal letter:

The Hongkong and ShanghaiBanking Corporation Limited
Robinson Road PO Box 896
Singapore 901746



Credit card xxxx-xxxx-xxxx-xxxx


To whom it may concern,

today I received – again – a credit card bill for above HSBC Visa Infinite card.
This bill is NOT justified. The credit card was, based on your mishandling of customer service, never delivered and never activated.

Due to the poor handling of this matter (e.g. canceling the existing card before verifying the new card arrived and not reacting on my communication) I terminated all business relationship with your bank.

Still you are sending bills for services not rendered. I notified you on that before. It looks to me, that your process is not working and it is costing me my time.

You will understand, that I have to bill you for my time lost, based on my commercial rate in the market place. Please do the following:
  1. accnowledge that you have received this letter
  2. stop sending unjustified bills
  3. pay the enclosed invoice to compensate me for time spent

Best regards


Stephan H. Wissel
Curious what happens next. I wonder if I have to complaint to CASE next.

29/04/2012

Extracting data from Domino into PDF using XSLT and XSL:FO (Part 4)

QuickImage This entry is part of the series Domino, XSL:FO and XSLT that dives into the use of XSLT and XSL:FO in IBM Lotus Domino.

So far we had a look at the all over process, some Java to convert FO into PDF and FO Basics. Time to get some Notes data exported. To make the task easier I created a little helper that allows convenient export into XML. Currently it works on a NotesDocument(Collection) basis, but it would be a small step to add a method that uses a view navigator for speed.
The most complete rendering of a NotesDocument is done using the .renderXML method. For a collection you use a NotesDxlExporter. Unfortunatelty both methods are comparable slow. So I added an alternate approach (works only if you don't have RichText for the moment) and export lean XML.
A Form2XMLDefinition class (optional) allows to pick which fields need to be picked in the XML file. It also allows to group those fields (more on that another time - or look at the source). So the methods are:
package com.notessensei.fop;

import java.io.ByteArrayOutputStream;
import lotus.domino.DocumentCollection;
import lotus.domino.Session;

public interface Notes2XML {
    public abstract void addForm(Form2XMLDefinition newForm);
    public abstract ByteArrayOutputStream renderDocument2DXL(lotus.domino.Document doc);
    public abstract ByteArrayOutputStream renderDocument2XML(lotus.domino.Document doc);
    public abstract ByteArrayOutputStream renderDocumentCollection2DXL(Session s, DocumentCollection dc);
    public abstract ByteArrayOutputStream renderDocumentCollection2XML(DocumentCollection dc, String rootName);
}
I expanded the PDFReport class with a convenience method: getNotesXMLExporter() to be able to reuse my managed bean (beginnings of a Facade pattern).
Read More

28/04/2012

Extracting data from Domino into PDF using XSLT and XSL:FO (Part 3)

QuickImage This entry is part of the series Domino, XSL:FO and XSLT that dives into the use of XSLT and XSL:FO in IBM Lotus Domino.

In Part 2 I introduced the Java code required to output PDF from XSL:FO and how that code can be called from an XAgent. Now lets have a look at XSL:FO itself. It is a W3C defined standard to layout documents. You could consider it as competitor to PostScript or PDF. XSL:FO contains both layout instructions and content. Since it is expressed entirely in XML, it is easy to manipulate (follow me for a moment and accept XML is easy) and - more importantly easy to split content and layout for reuse. Typically a complete XSL:FO document would be only an intermediate step in PDF production. The report design (without data) would be contained in an XSLT stylesheet that gets merged with XML data. You could consider XSLT the "templating language" of XSL:FO.
A XSL:FO document has a single <fo:root> element. This contains one or more page-sequence elements, that contain the actual content and a layout-master-set, that defines the pages.
XSL:FO layout-master-set
Besides the page size (and content orientation) a simple-page-master defines header, footer, left and right column (called regions). You need to get your math right there. The margin and the regions are both substracted from the page size to compute the real margins. When you have a margin="1cm" and a region-start with 3cm width, then the left margin is 4cm. Read up the XSL:FO tutorial on w3schools.com for more details.
The main element region-body allows to specify a column-count attribute that will create multi-column page layouts without the need for a table and a manual calculation of column content. You also could define alternating page masters, like left and right pages or different pages for a chapter beginning - read details in the repeatable-page-master-alternative specification.
Your main content is contained in one or more page-sequences.
page-sequence
The page sequence contains the content. Don't get confused: a page-sequence represents content of n number of pages (n >=1), not just one page. You need more than one page sequence only when you want the page layout to use a different master/style (of course using the alternatives mechanism described above you can achieve alternate styles inside a single page sequence). The page sequence contains one or more flows. A flow is targeted at a region (there are 5 of them) and contains block elements (think HTML div,p,table etc.) that contain the content. There are a huge number of specialised attributes and elements (stuff like watermarks or graphics) available you can learn about in the specifications.
In practise you write a sample XSL:FO document and transform it into PDF. Once you are satisfied with the results, you then convert the XSL:FO document into an XSLT stylesheet. This is easier than it sounds, you simply wrap xsl:template tags around your fo and replace your sample content with xsl:apply-templates statements. w3schools has a simple example. Of course XSLT is a interesting topic on its own, go and read the XSLT 2.0 and XPath 2.0 Programmer's Reference (also available on Kindle).
Next stop: How to pull Notes data into XML for processing.

27/04/2012

Extracting data from Domino into PDF using XSLT and XSL:FO (Part 2)

QuickImage This entry is part of the series Domino, XSL:FO and XSLT that dives into the use of XSLT and XSL:FO in IBM Lotus Domino.

In Part 1 I discussed the process of getting data from Domino to PDF using only open standards. In this part I want to start backwards: If I have valid XSL:FO, how do I get the PDF output? In a later installment I will discuss what XSL:FO is capable of and how to create it using XSLT. Finally I will discuss how to extract XML from your data source (Domino or others).
I choose the backwards approach since it is easier to understand walking from the desired output towards a stylesheet than creating a stylesheet if the result isn't clear. Bear with me for this approach.
I will use Apache FOP as my rendering engine. The Quickstart compresses the needed steps neatly into 1-2-3 (pun intended):
  1. Download
    This is the easy part. Pick one of the mirror servers and get fop-1.0-bin.zip (24M) - check if you read this later if there is a newer version. Extract it to a directory of your choice, we will import/copy what we need from there
  2. Configure
    You have choices:
    • copy the Fop files into jvm/lib/ext (bad idea)
    • import it into an NSF (twice: once for agents, once for XPages)
    • create a plug-in (good for sidebar and XPages, not good for agents)
    Having coined the term XAgent I will stick to the XPages version with import into the NSF. Time permitting I'll add a plug-in approach to this little series.
  3. Run
    The FOP website provides a good overview on general Java use as well as servlet specifics. Using that information as template it is not too hard to implement a managed bean that takes a XMLDocument and an optional Stylesheet and returns the rendered PDF as result
Since our output will be rendered by a managed bean, we need to configure it in the faces-config.xml:
<faces-config>
  <managed-bean>
    <managed-bean-name>PDF</managed-bean-name>
    <managed-bean-class>com.notessensei.fop.PDFReport</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>
<faces-config>
The XAgent follows the usual pattern:
var exCon = facesContext.getExternalContext();
var response = exCon.getResponse();
var out = response.getOutputStream();
response.setContentType("application/pdf");
response.setHeader("Content-disposition","inline; filename=result.pdf");
response.setHeader("Cache-Control", "no-cache");
// In this example the text in sessionScope.longText will be rendered
var written = sessionScope.longText != "" ? "<text>"+sessionScope.longText+"</text>" : null;
// Writes the default rendering out
PDF.fopReportFromString(out,written,null);
// Stop the page from further processing;
facesContext.responseComplete();
out.close();
To get the Java class working I needed to import:
  1. avalon-framework-4.2.0.jar
  2. batik-all-1.7.jar
  3. commons-io-1.3.1.jar
  4. fop.jar
  5. serializer-2.7.0.jar
  6. xmlgraphics-commons-1.4.jar
The class for the PDFReport contains just some wrapper code to render "FO" or "XML with XSLT" into a PDF. It is demo code, you want to add more robust error handling. Next stop: more about FO
As usual YMMV.

25/04/2012

LotusScript LSI_INFO potentially harmful on (64Bit) Domino

QuickImage There is a handy, but undocumented LotusScript function LSI_INFO that can lead to crashes of the Domino server, especially on 64Bit systems. Since the function never had been documented, a fix for that can't be expected any time soon (or at all). Unfortunately that function is used in OpenLog an incredibly useful logging application written by Julian Robichaux. Here is how to fix this:
  1. Make sure you use the latest release (you also can use the code contained in TaskJam, it is extended to be able to log XPages)
  2. Edit the OpenLogFunctions script library and add into the initialize statement: NoLSIStackTrace = True
  3. Make sure all applications that use OpenLog get the updates library (if you copied it with intact inheritance a "load design" will do)
As usual YMMV

25/04/2012

Teaching an ol' dog a new trick: SET CONFIG param=value update

QuickImage One of the cardinal sins of Domino administration (besides FTP/copy of a server NSF) is the manual editing of notes.ini variables. To update an notes.ini variable instantly you can use the server console and type set config param=value, while for permanent changes you would add the value to a server configuration document. Using the server configuration document has the advantage, that your ini changes not only will survive a reboot or even loss of your notes.ini, but they serve as documentation too.
My colleague Thomas Hampel today pointed me to a technote that I wasn't aware of. It explains how to combine these two steps into one:
set config param=value update will instantly activate a parameter and wite it back into the server configuration document. For lazy or forgetful administrators you can issue this command once: set config ENABLE_SRVCFG_NAB_UPDATE=1 update and it will automatically update any parameter into the configuration document when you change it through a set command. Just keep in mind: don't edit that notes.ini on the OS level:
I will never edit a notes.ini on the OS level
(Courtesy of the Bart Simpson Generator)

Disclaimer

This site is in no way affiliated, endorsed, sanctioned, supported, nor enlightened by Lotus Software nor IBM Corporation. I may be an employee, but the opinions, theories, facts, etc. presented here are my own and are in now way given in any official capacity. In short, these are my words and this is my site, not IBM's - and don't even begin to think otherwise. (Disclaimer shamelessly plugged from Rocky Oliver)
© 2003 - 2012 Stephan H. Wissel - some rights reserved as listed here: Creative Commons License
Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/NonCommercial/ShareAlike Creative Commons License, with the exception that no rights are granted -- since they are not mine to grant -- in any logo, graphic design, trademarks or trade names of any type. Code samples and code downloads on this site are, unless otherwise labeled, made available under an Apache 2.0 license. Other license models are available on written request and written confirmation.