Your code above would have a few contradictions to my set up. One of which i see as the binding. I am using WS Security with wsHttpBinding.
All I can give you is general guidance. You'll have to fine tune it for the specific configuration. There are just too many options available in WS-Security for me to give you a script that would work with every configuration.