Skip to main content

Why can't I get security to work between Metro and WCF?

1 reply [Last post]
notfed
Offline
Joined: 2011-08-01
Points: 0

Hi,

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 com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
        at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
        at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
        at $Proxy29.getAdvice(Unknown Source)
        at MagicEightBallTest.main(MagicEightBallTest.java:11)

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).

Thanks,

Jay Sullivan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
M1xa1L
Offline
Joined: 2011-08-26
Points: 0

I have the same problem(( How to fix this problem?