2

I am consuming a Java Web Service as a WCF service from .NET.

The service has an HTTPS endpoint and requires the message to be signed with a client certificate.

I have set up WCF tracing and with the Service Trace Viewer I can confirm that the request is signed and sent off as expected and a valid response is returned from the service. But the response is not accepted by my console application. Instead the following exception is thrown:

Cannot find a token authenticator for the 'System.IdentityModel.Tokens.X509SecurityToken' token type. Tokens of that type cannot be accepted according to current security settings.

What am I doing wrong?

lox
  • 1,602
  • 4
  • 27
  • 41

1 Answers1

-1

Apparently there is a small but significant variation in the way WCF and this Java Web Service implements this type of security (might be specific to this service or might be a general Java issue).

The correct response is received but WCF is unable to interpret a token element.

My solution, or rather workaround, was to utilize the WCF predecessor WSE (Web Service Enhancements 3.0).

A reference to the Microsoft.Web.Services3 assembly, a lot of head scratching (WTFs) and a lengthy work of code including a MutualCertificate10Assertion later I got my response.

lox
  • 1,602
  • 4
  • 27
  • 41
  • I'm dealing with the same problem while consuming a IBM DataPower service from my WCF client. Can you post the code sample or email it to me? – YONDERBOI Mar 31 '11 at 16:23
  • I have resolved the issue in a different way. see [link] (http://stackoverflow.com/questions/5503684/ibm-datapower-3-7-1-x-issues-with-wcf-clients) – YONDERBOI Apr 01 '11 at 00:59
  • 3
    It is a bit disappointing that this answer doesn't have the level of detail required for anyone to implement the same solution. – Fenton Sep 28 '12 at 13:48