views:

994

answers:

2

I have a WSDL for a Web Service and a Public Key Certificate in the shape of a .cer file.

I need to get SoapUI to encrypt the service request with the public key of the certificate.

How do I do this?

A: 

If you can use WCF, just add security to the binding, and the following behavior:

<behaviors>
  <behavior>
   <clientCredentials>
     <clientCertificate findValue= "101010101010101010101010101010000000000" 
      storeLocation="LocalMachine" storeName="The logic storage" 
      X509FindType="The cert name"/>
     </clientCertificate>
   </clientCredentials>
 </behavior>
</behaviors>  

More info about how to enable security in WCF, see: MSDN

Erup
The OP did not specify a windows environment. Is the XML above part of SoapUI?
Synesso
A: 

In SoapUI, go to the Preferences dialog, under the File menu. There's a tab/section for SSL. There you can specify the path to the .cer file. I don't have it here in front of me, and I've only done .pfx, but it should work the same. With .pfx, you need to enter the password - not sure if you do that for .cer or not. You can also convert the .cer to .pfx if that works better. But anyway, with a .pfx specified here, I was able to use https connections to our server (Cisco ACE gateway actually) which required "client certificate authentication". It was easy to do in SoapUI, proving that the infrastructure was set up right. Our app, written in Delphi2005, took another 3 weeks... But at least we knew what we were trying to do, and had a way to verify the result.

Chris Thornton