Tuesday, 24 January 2012

Command Prompt From Here In Windows

Shift + RClick on the folder

simples!

TripleDES block encryption and padding

What the various parts of a cipher string such as "DESede/ECB/PKCS5Padding" means:

http://www.informit.com/articles/article.aspx?p=26343&seqNum=4

Saturday, 14 January 2012

Useful Free Tools

www.BitBucket.com - free dvcs with git
www.cloudbees.com - free jenkins - cheap clous based test servers
http://www.rallydev.com - free agile planning
youtrack - free for public - cheap ($10 / month) private bug tracking

github does it all for $7 month for 1 user

Friday, 6 January 2012

Programmatic configuration of logging Handler for Axis 1.x client

This took ages to work out.

Mostly the web examples involve writing  a WSDD to configure a Handler subclass, but I wanted to create a handler which logged outgoing and incoming SOAP messages via Axis 1.4 and I wanted to programmatically control whether the handler was added to the axis client so that when logging was turned off, there were no unnecessary calls being made.

The code I used was to create a subclass of Axis BasicHandler to do what I wanted (by looking at the example LogHandler class provided by axis: http://kickjava.com/src/org/apache/axis/handlers/LogHandler.java.htm)

Then register it (when the configuration was turned on) using the below.  Note "css" is a service locator object that is created when you use WSDL2Java on the WSDL for the service being connected to.  This is done before you call getPort on the locator to get the service stub.


            SimpleProvider clientConfig = new SimpleProvider();
            AxisClientLogHandler logHandler = new AxisClientLogHandler();
            SimpleChain reqHandler = new SimpleChain();
            SimpleChain respHandler = new SimpleChain();
            reqHandler.addHandler(logHandler);
            respHandler.addHandler(logHandler);
            Handler pivot = new HTTPSender();
            Handler transport = new SimpleTargetedChain(reqHandler, pivot, respHandler);
            clientConfig.deployTransport(HTTPTransport.DEFAULT_TRANSPORT_NAME, transport);

            css.setEngineConfiguration(clientConfig);
            css.setEngine(new AxisClient(clientConfig));