Found this a while ago, but it's still very good material on effective writing skills.
Click here
Wednesday, July 11, 2012
Tuesday, March 27, 2012
How to enable HTTPS with AXIS 2
I've been using AXIS2 for a couple of months now and decided to take the HTTPS / SSL plunge. The following notes are guidelines on how I configured HTTPS with AXIS2.
I am using Tomcat 6, so firstly you need to enable HTTPS in Tomcat:
1) Create a keystore with the following command and enter the required values:
keytool -genkey -alias tomcat -keyalg RSA -validity 365
2) Then copy this file to a directory e.g. /usr/share/tomcat6/.keystore
3) Edit the Tomcat server.xml e.g. /etc/tomcat6/server.xml and add the following section inside the <Service name="Catalina"> tag
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystorePass="yourkeystorepassword" keystoreFile="/usr/share/tomcat6/.keystore"
clientAuth="false" sslProtocol="TLS" />
(replace yourkeystorepassword with the password you used in step 1)
I am using Tomcat 6, so firstly you need to enable HTTPS in Tomcat:
1) Create a keystore with the following command and enter the required values:
keytool -genkey -alias tomcat -keyalg RSA -validity 365
2) Then copy this file to a directory e.g. /usr/share/tomcat6/.keystore
3) Edit the Tomcat server.xml e.g. /etc/tomcat6/server.xml and add the following section inside the <Service name="Catalina"> tag
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystorePass="yourkeystorepassword" keystoreFile="/usr/share/tomcat6/.keystore"
clientAuth="false" sslProtocol="TLS" />
(replace yourkeystorepassword with the password you used in step 1)
4) Restart Tomcat and test that you can access Tomcat via HTTPS on port 8443 (you will get a certificate error in your browser as it's not a trusted certificate).
Now onto AXIS2:
5) I downloaded the axis2.war file.
6) Extract the war file with unzip to a empty directory.
7) Edit the WEB-INF/conf/axis2.xml file
8) Change this:
<transportReceiver name="http"
class="org.apache.axis2.transport.http.AxisServletListener"/>
to this:
<transportReceiver name="http"
class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8080</parameter>
</transportReceiver>
<transportReceiver name="https"
class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8443</parameter>
</transportReceiver>
9) Now restart Tomcat and go to the HappyAxis(https://localhost:8443/axis2/axis2-web/HappyAxis.jsp) page. You'll see you get some internal server error. This is because Tomcat does not have the keystore configured for AXIS2 to use.
I fixed this by adding the following JAVA_OPT options:
JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=\"/usr/share/tomcat6/.keystore\" - Djavax.net.ssl.trustStorePassword=\"yourkeystorepassword\""
(replace yourkeystorepassword with the password you used in step 1)
10) Check HappyAxis page and WSDL -> https://localhost:8443/axis2/services/Version?wsdl
All done no mess no fuss :)
Friday, March 23, 2012
stackoverflow.com
I must say I love stackoverflow.com I really don't know what I did without the helpful posts you can find on the site. Recently I had to do a recursive SQL query and found a nice solution here. I also needed some help with threads and found a quick answer here. A big thanks to the people at stackoverflow.com.
Friday, February 24, 2012
Oracle Database Fun and Games
I've been working with a number of Oracle databases lately and decide to post some of the tips and tricks that I found:
SQL Developer
Error when you connect to database:
"Status : Failure -Test failed: ORA-00604: error occurred at recursive SQL level 1ORA-01882: timezone region not found"
Solution: Edit the sqldeveloper.conf file and add the following line:
AddVMOption -Duser.timezone=GMT
Error, running out of RAM
Solution: Edit the sqldeveloper.bat file and change the following parameters as required:
-Xmx640M -Xms128M
You can also set the -XX:MaxPermSize setting in the sqldeveloper.conf file, but I have not had to increase this yet.
Start Database Script
Old but good article here -> http://tldp.org/HOWTO/Oracle-7-HOWTO-6.html
Basically you need to do this:
Get list of tables
select tname from tab
Delete all tables
select 'drop table '||table_name||' cascade constraints;' from user_tables; ref
Stop it from prompting you for input values due to the & character
set define off
Cool tool to create new database
dbca (ssh -X into the server and run this command)
SQL Developer
Error when you connect to database:
"Status : Failure -Test failed: ORA-00604: error occurred at recursive SQL level 1ORA-01882: timezone region not found"
Solution: Edit the sqldeveloper.conf file and add the following line:
AddVMOption -Duser.timezone=GMT
Error, running out of RAM
Solution: Edit the sqldeveloper.bat file and change the following parameters as required:
-Xmx640M -Xms128M
You can also set the -XX:MaxPermSize setting in the sqldeveloper.conf file, but I have not had to increase this yet.
Start Database Script
Old but good article here -> http://tldp.org/HOWTO/Oracle-7-HOWTO-6.html
Basically you need to do this:
Start the listner: lsnrctl start listener
Start Enterprise Manager: emctl start dbconsole
Set the SID of the database: export ORACLE_SID=report
Connect to sqlplus: sqlsplus "sys as sysdba"
Run the startup command: startup
Get list of tables
select tname from tab
Delete all tables
select 'drop table '||table_name||' cascade constraints;' from user_tables; ref
Stop it from prompting you for input values due to the & character
set define off
Cool tool to create new database
dbca (ssh -X into the server and run this command)
Friday, February 3, 2012
Novell IDM Convert Structured Attribute
Every time I need to work with structured attributes on a driver I land up googling for that same page of how to convert a structured attribute to a string and vice verse. Thus to save time I decide to post a link to the forum here
The meat of the what you need to do to convert from a structured attribute to a string and back again is below, just remember to replace the attribute and component names as required:
Output Transform (struct -> string):
<do-reformat-op-attr name="faxnumber">
<arg-value>
<token-xpath expression='$current-value/component[@name="faxNumber"]/text()'/>
</arg-value>
</do-reformat-op-attr>
Input Transform (string -> struct):
<do-reformat-op-attr name="faxnumber">
<arg-value type="structured">
<arg-component name="faxNumber">
<token-local-variable name="current-value"/>
</arg-component>
<arg-component name="faxBitCount">
<token-text xml:space="preserve">0</token-text>
</arg-component>
<arg-component name="faxParameters">
<token-text/>
</arg-component>
</arg-value>
</do-reformat-op-attr>
Wednesday, January 25, 2012
Software testing
Lately I've been involved in a lot of software testing and came across this awesome article about it:
Top Five (Wrong) Reasons You Don't Have Testers
I find this guys blog very insightful and like the list of checks he recommends for software development:
Do you use source control?
Can you make a build in one step?
Do you make daily builds?
Do you have a bug database?
Do you fix bugs before writing new code?
Do you have an up-to-date schedule?
Do you have a spec?
Do programmers have quiet working conditions?
Do you use the best tools money can buy?
Do you have testers?
Do new candidates write code during their interview?
Do you do hallway usability testing?
Top Five (Wrong) Reasons You Don't Have Testers
I find this guys blog very insightful and like the list of checks he recommends for software development:
Do you use source control?
Can you make a build in one step?
Do you make daily builds?
Do you have a bug database?
Do you fix bugs before writing new code?
Do you have an up-to-date schedule?
Do you have a spec?
Do programmers have quiet working conditions?
Do you use the best tools money can buy?
Do you have testers?
Do new candidates write code during their interview?
Do you do hallway usability testing?
Tuesday, January 24, 2012
My WSDL Cheat Sheet
Service -> ‘Java
Class’
Operation -> ‘Java
Function’ The Operation defines the name of the Operation and ties the request
response messages together.
Port -> A
service is assessable on a Port. A Port
has a unique name space and binding attribute. The Port specifies the service
address. Web service can be exposed as SOAP or HTTP. The same web service can
also be exposed by multiple Ports.
SOAP example:
<port name='WeatherSoapPort'
binding='wsdlns:WeatherSoapBinding' >
<soap:address location='http://localhost/demos/wsdl/devxpert/weatherservice.asp'
/>
</port>
HTTP example:
<port name='WeatherSoapPort'
binding='wsdlns:WeatherSoapBinding' >
<http:address
location="http://localhost/demos/wsdl/devxpert/weatherGET.asp"/
</port>
Message -> Normally
two messages required i.e. input message and output message. Messages contain
zero or more <part> elements. Sample messages below
<message name='Weather.GetTemperature'>
<part
name='zipcode' type='xsd:string'/>
<part
name='celsius' type='xsd:boolean'/>
</message>
<message
name='Weather.GetTemperatureResponse'>
<part
name='Result' type='xsd:float'/>
</message>rt name='WeatherSoapPort'
Binding ->
‘Ties it all together’ - specifies binding(s) of each operation in the
PortTypes section
Sunday, January 15, 2012
More Holiday Photos
![]() |
Cartoon effect on my camera |
![]() |
Dam on Table Mountain |
![]() |
Dam water |
![]() |
More dam water |
Some people choose to ignore warnings |
Nice bird |
uShaka |
uShaka |
![]() |
Swimming at Silvermine |
Holiday Photos December 2011
Table Mountain |
St James Beach - 26 December 2011 |
![]() |
View of Constantia wine farms |
![]() |
View of Table Mountain from Milnerton - I like the panorama mode on my camera phone :) |
![]() |
Out at the Baxter for 'Some like it Vrot' |
![]() |
Sea Point |
![]() |
View from Hillcrest Berry Farm |
![]() |
Beware of the Prawns (only in Joburg) |
Thursday, November 17, 2011
Novell SAP HR Driver Documents
These are some good documents to read if you are working with the SAP HR Driver:
Troubleshooting iDOC Issues in the SAP HR Driver for Identity Manager
IDM SAP HR Driver: Where to Get the JConnect Libraries
Decoding iDOCs with the IDM SAP Driver
SAP HR iDoc Decoder
Error Codes of the SAP HR driver for Identity Manager - Part 1
SAP HR driver - Structure of the HRMD_A*.meta files
Troubleshooting iDOC Issues in the SAP HR Driver for Identity Manager
IDM SAP HR Driver: Where to Get the JConnect Libraries
Decoding iDOCs with the IDM SAP Driver
SAP HR iDoc Decoder
Error Codes of the SAP HR driver for Identity Manager - Part 1
SAP HR driver - Structure of the HRMD_A*.meta files
Tuesday, November 15, 2011
Novell IDM (dirxml) - How to get the user DN in LDAP format
You can use the following Dirxml script to get the user DN in standard LDAP format:
<do-set-local-variable name="SlashDN" scope="policy">
<arg-string>
<token-src-dn/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="userDN" scope="policy">
<arg-string>
<token-parse-dn dest-dn-format="ldap" src-dn-format="qualified-slash">
<token-xpath expression='query:readObject($srcQueryProcessor, "",$SlashDN,"","")/@qualified-src-dn'/>
</token-parse-dn>
</arg-string>
</do-set-local-variable>
<arg-string>
<token-parse-dn dest-dn-format="ldap" src-dn-format="qualified-slash">
<token-xpath expression='query:readObject($srcQueryProcessor, "",$SlashDN,"","")/@qualified-src-dn'/>
</token-parse-dn>
</arg-string>
</do-set-local-variable>
Tuesday, September 13, 2011
jQuery and IE8 not the best of friends
So I've been pulling my hair out with IE8 ... again. I wrote some code that was working like a charm in FF and Chrome:
$(this).val().trim().match(match)
Sadly this code did not work in IE8 and I got the following error:
"Object doesn't support this property or method"
Changing it to the below did the trick:
jQuery.trim($(this).val()).match(match)
Another part of my life wasted debugging IE issues :(
$(this).val().trim().match(match)
Sadly this code did not work in IE8 and I got the following error:
"Object doesn't support this property or method"
Changing it to the below did the trick:
jQuery.trim($(this).val()).match(match)
Another part of my life wasted debugging IE issues :(
Wednesday, August 3, 2011
Some of my old IT Textbooks
Wow what a find! Was digging around the house and found some really old textbooks. Check this out. Love the story about the CPU.
Subscribe to:
Posts (Atom)