I want to use Geonetwork CSW HTTP services from a full java stack client, and not web client, mainly to use http transactional service.

I'm always redirected on the login html page after making a post login request with the proper credential. 
I receive session id cookies correctly, and I provide it to next level transactional post request, but I always receive the login html page as answer.

My use case is to fill up the CSW catalog in a programmatic way, and not thanks to the web sheet.

Does any tutorial exist on that way of working with Geonetwork CSW?