开发者

SOAP Fault Error

开发者 https://www.devze.com 2022-12-18 04:42 出处:网络
When I try to make a SOAP call, I get the following Error. soap:ClientGeneral security error (WSSecurityEngine: No

When I try to make a SOAP call, I get the following Error.

soap:ClientGeneral security error (WSSecurityEngine: No crypto property file supplied for decryption)

Can anyone please explain what could have triggered it? Thank you,

            UsernameForCertificateAssertion assertion = new UsernameForCertificateAssertion();


            // Set the X509 Certifcate onto the assertion.

            assertion.X509TokenProvider = new X509TokenProvider(StoreLocation.LocalMachine,
                                                                StoreName.My,
                                              开发者_高级运维                  "3264763f000100000745",
                                                                X509FindType.FindBySerialNumber);



            UsernameTokenProvider token = new UsernameTokenProvider("wsibtITStest-200024932", "T3sting!+$");


            assertion.UsernameTokenProvider = token;
            Policy  policy = new Policy();
            policy.Assertions.Add(assertion);
            service.SetPolicy(policy);                                             

           X509SecurityToken secToken = new X509SecurityToken(col[0]);                
           service.RequestSoapContext.Security.Tokens.Add(secToken);

service.ping();

Where service is an instance of web service. I don't know if I am missing anything.

Thank you,


It sounds like the Web Service that you're calling implements WS-Security using X.509 certs.

You'll have to contact the author of the Web Service to verify and have them provide you with the cert you need to use to encrypt your request.


This is a generic cryption message. I've seen it before when I haven't setup my decryption handler correctly. I'd say verify that it's setup right and make sure that you're using the same decryption as the encryption (I've seen that bite some folks where I work).

If that doesn't work could you post your config and all the details you can for the error?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号