SoapUI and WCF Service testing

Test with SoapUI: modify the generated web.config

soapUI_header_logoThe web.config that is create when you create a new WCF service application does not work with SoapUI. Retrieving the WSDL will work fine but when you execute a operation on the service the following message will appear:


<s:value>s:sender< s:value="">

A solution to this problem (at least for testing purposes) is to add a custom wsHttpBinding. Create a new WCF Service application C# project. Delete all text from the web.config and add replace it with the markup below.

Important to note is that we have a custom wsHttpBinding with the security mode set to “None”. This is necessary for SoapUI to work with this service!

Now you have to create a new SoapUI project. Point it to the ?wsdl for this services and the project is created with a default request for all operations. Open the first request and press the WS-A button (on the bottom of the request editor). Check “Enable WS-A addressing”, “Add default wsa:Action” and “Add default wsa:To”.

Now execute the request and you get a proper response!

Share

Leave a Reply

Your email address will not be published. Required fields are marked *