title: soapUI With WCF Message Security
body: <p>I am trying to configure my WCF (.NET 4.0) service so that it can be tested using soapUI. I am using wsHttpBinding with message security. My goal is to expose the service on a public test endpoint and try to load-test it with loadUI which uses soapUI tests. For this to work the endpoint needs to be secure and since my production endpoint will use message security I figure my test one should also use it in order to achieve close to production load test results.</p>
  
  <p>I can't seem to be able to configure soapUI to successfully call the service. I have tried a number of combinations of signing and encrypting input and output with the client and server certificate. Has anybody managed to achieve a successful message security configuration of WCF and soapUI? </p>
  
  <p>The following are exerpts from my configuration:</p>
  
  <p><em>Binding:</em></p>
  
  <pre><code>  &lt;wsHttpBinding&gt;
  
              &lt;binding name="MessageSecurity"&gt;
                  &lt;security mode="Message"&gt;
                      &lt;message clientCredentialType="Certificate" negotiateServiceCredential="false"/&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
  
          &lt;/wsHttpBinding&gt;
  </code></pre>
  
  <p><em>Behavior</em></p>
  
  <pre><code>    &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior name="customBehavior"&gt;
                  &lt;serviceMetadata httpGetEnabled="True"/&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="True"/&gt;
  
                  &lt;serviceCredentials&gt;
                      &lt;clientCertificate&gt;
                          &lt;authentication certificateValidationMode="PeerTrust"/&gt;
                      &lt;/clientCertificate&gt;
                      &lt;serviceCertificate findValue="MyWebServicesCertificate" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/&gt;
                  &lt;/serviceCredentials&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
  
          &lt;endpointBehaviors&gt;
              &lt;behavior name="webHttp"&gt;
                  &lt;webHttp/&gt;
              &lt;/behavior&gt;
          &lt;/endpointBehaviors&gt;
  
      &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p><em>Service:</em></p>
  
  <pre><code>            &lt;service behaviorConfiguration="customBehavior" name="MyService"&gt;
  
              &lt;!-- Service Endpoint --&gt;
              &lt;endpoint name="Production" address="" binding="wsHttpBinding" bindingConfiguration="MessageSecurity" contract="IMyService"&gt;
  
                  &lt;identity&gt;
                      &lt;dns value="web_services_svr"/&gt;
                  &lt;/identity&gt;
              &lt;/endpoint&gt;
  
  
  
  
              &lt;host&gt;
                  &lt;baseAddresses&gt;
                      &lt;add baseAddress="http://web_services_svr/MyService.svc" /&gt;
                  &lt;/baseAddresses&gt;
              &lt;/host&gt;
  
          &lt;/service&gt;
  </code></pre>