Thursday, July 14, 2011

XML Parsing

HttpMediaTypeNotAcceptableException: Could not find acceptable representation
-- Add "@XmlRootElement" annotation to your object at class level

Thursday, June 30, 2011

SVN Branching and Deleting

Branch
svn copy --parents svn+ssh://www.mysite.com/myproduct/test/trunk/service/abcd \
svn+ssh://www.mysite.com/myproduct/test/branches/service/abcd/new_branch \
-m "Creating a branch to personalize stuff"

more info : http://blog.evanweaver.com/2007/08/15/svn-branching-best-practices-in-practice/

Switch working copy

svn switch svn+ssh://www.mysite.com/mysite/product/test/branches/asiri/service/abcd .

$ svn switch http://www.mysite.com/mysite/product/test/trunk/asiri/service/abcd .

Delete branch
svn delete svn+ssh://www.mysite.com/mysite/product/test/branches/asiri/service/abcd \
-m "Removing unwanted branch from the repository"



Friday, December 29, 2006

Configure SSL for IBM HTTP Server

When configuring the plugin for IBM HTTP Server 6.0, and Websphere Application Server 6.0.x, probably we all have met with a problem in configuring SSL. The reason behind is, the 'httpd.conf' file comes with HTTP Server doesn't contain any SSL related information. To be able to get the web server working for SSL we have to do a trick. Rather I would say, change the "defaults" accordingly.

Let's first look at few issues that may arise when configuring SSL for the secured communication between IBM HTTP Server 6.0 and IBM Websphere Application Server 6.0.x.x

1)
As most of the sites indicate, the GSKit (7) MUST be available to get the SSL working. Hopefully you can check whether it exists or not. In my windows system, it is available in <Drive_letter>:\Program Files\ibm\gsk7 folder. Keep in mind that when I install IBM HTTP Server 6.0 DID NOT install GSKit, though it is supposed to do!

2)
Upgrade your IBM HTTP Server 6.0 to perhaps the latest patch (eg: 6.0.2.15). This upgrade installer should be put upon IBM HTTP Server 6.0.2 refresh pack. These are available in the IBM site. when you upgrade for the 6.0.2.x, you can find the GSKit being installed. It happened to me!

If those two are done, then we can assume that required modules are also available in the IBM HTTP Server.

Now you can start configuring SSL.

Open <HTTP_Server_root>/conf/httpd.conf
If you are not sure of what you are going to do, it's better to back up the file first.

Then change or add the followings : (Keep in mind that, these configurations are according to my environment. You may keep or change them according to your requirements.)

ServerName "server_name"
In my case, I don't specify a port. eg : ServerName "asiri"

Listen 0.0.0.0:80 --> The default HTTP listener, IPV4.
Listen 0.0.0.0:443 --> The secured HTTP (https) listener, IPV4.

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
This is of utmost importance. Check whether this '.so' file is available in "<HTTP_Server_root>/modules" folder. This module is required to get the SSL working in HTTP server.

<VirtualHost 0.0.0.0:443>
SSLEnable
SSLClientAuth none
</VirtualHost>

SSLDisable
Keyfile <Plugins_root_directory>/etc/plugin-key.kdb" OR the key database of your choice.

As you are aware the entries can be put at any place in the file. But keep in mind that, SSLEnable is inside the virtual host listening on the port 443.

The following two entries should exist (in one line) to communicate with the Application Server through https.
LoadModule was_ap20_module "<Plugins_root_directory>/bin/mod_was_ap20_http.dll"
if OS is Windows OR
LoadModule was_ap20_module <Plugins_root_directory>/bin/mod_was_ap20_http.so
if the OS is UNIX related.

WebSpherePluginConfig <AppServer_root>\profiles\profile_name\config\cells\cell_name\nodes\node_name\servers\webserver_name\plugin-cfg.xml"

Make sure you have enabled port 443 in the application server, and the 'plugin-cfg.xml' file contains an entry for that. If not, add a binding for port 443 in 'Environment --> Virtual Hosts --> default_host --> Additional Properties section, Host_Aliases' section in the application server, throught the admin console.

Restart the Web server.