I wanted to consume a java webservice, so I wrote a WCF client to consume the service. I thought Java -.Net interinteroperability would be easy with WCF, not so easy.
The Java Web Service used WS-Security and required a UserNameToken passed as clear text. The below code snippet from Hanselman's blog will solve the problem, but there is a catch . This will work only if the endpoint address is on SSL. Ofcourse, WCF will not allow you to pass UserNameToken ( username & password) as clear text on http. It has to passed on https protocol, only then it will work .
...