none
C# client / SOAP wse3.0 policy : Policy * is not configured RRS feed

  • Question

  • Hi,

    I'm currently workin on a c# client which connect to heterogenous
    webservices (PHP/java/...).

    I need security (auth/sign/encrypt) so i started using wse3.0 for C#.

    I've added a web reference to the webservice and configured the wse3.0 with
    the wizzard as follow:
    _ secure a client app
    _ username auth (in code)
    _ enable ws sec 1.1 (sign encrypt)
    _ taking a certificate from current computer (could i define one in code?)

    I have the following code calling the WS:

    Code Snippet

      WSEForm.localhost.ProjectWebServicesWse PWS = new
    WSEForm.localhost.ProjectWebServicesWse();
      UsernameToken token = new UsernameToken("test", "test",
    PasswordOption.SendPlainText);
      PWS.SetClientCredential(token);
      PWS.SetPolicy("testPolicy");



    When i run it, I get an exception about :
    Parameter name: Policy 'testPolicy' is not configured in the system

    I just can't find any help on the net yet, if anyone has an idea about how
    to get a C# .NET client speak soap secured messages?

    Thx!
    dimanche 9 mars 2008 01:32