unfortunatly I think you have bad luck ;-(
We give up after testing and found that our application will not work under any circumstances.
You might use the classloading configuration isolation and pack the 4.0.5client into your 5.x application.
But we give up because of problems with transaction demarcation.
within this formums you will find some discussions about 5.x <==> 4.x call integration.