Why can't I get security to work between Metro and WCF?
I'm experimenting with consuming WCF services with Metro. I've gone down the list of possible protocols listed on page (http://msdn.microsoft.com/en-us/library/ms730294.aspx). I expected most (if not all) of these to be compatible between WCF and Metro.
For each of the following protocols, I've created a WCF service, and attempted to consume it using WsImport (from Metro 2.1.1):
- SOAP 1.1 *
- WSS SOAP Message Security 1.0
- WSS SOAP Message Security UsernameToken Profile 1.0
- WSS SOAP Message Security X.509 Certificate Token Profile 1.0
- SOAP 1.2
- WSS SOAP Message Security UsernameToken Profile 1.1
- WSS SOAP Message Security X.509 Certificate Token Profile 1.1
- WSS SOAP Message Security Kerberos Token Profile 1.1
Now, I've only been able to get plain old SOAP 1.1 to work.
All of the "WSS SOAP Message Security ... 1.0" protocols give me the following error as soon as I call a service method:
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security for the message.
at $Proxy29.getAdvice(Unknown Source)
And all of the rest of them (the "WSS SOAP Message Security ... 1.1" protocols) just hang when I call a service method.
Can anyone offer some guidance on what I might be doing wrong (or a way to look deeper into the problem)? I was under the impression that Metro and WCF were highly compatible--am I missing something? I'm just trying to get a Metro client to securely communicate with a WCF service (with an eventual goal of passing username/password credentials to the WCF service).