Wednesday, December 12, 2012

Exposing WCF Service wsHttpBinding to SoapUI

Testing a WCF Service with wsHttpBinding in SoapUI gives you the following error:
The message could not be processed. This is most likely because the action ‘[Insert Web Service Action Here]’ is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint’s binding.

SoapUI doesn't support security context tokens. Add these lines in Web.config:

  
    
      
        
          
          
        
      
    
  


Make sure that SoapUI has WS-Addressing set to true.