@John Saunders is correct in his comment. Whatever you do with ASMX, you should be able to do with WCF. In fact it does not matter what kind of framework/technology your web service uses as long as you do a proper SOAP request.
WCF is just a framework that helps build service-oriented applications. Like any other framework of that kind, it lets you concentrate on the actual service that you will provide, taking care of all the plumbing functionality needed to expose that service as a SOAP web service.
As for SoapUI, its a Java tool that allows you to test web services. When you feed it a WSDL, it dynamically creates request samples which are then sent to the web service with (if I'm not mistaken) Http Client.
Nothing fancy happens if you have a WCF web service. It's still SOAP communication that you can do even with a basic client like this:
public class Program
{
public static void Main(string[] args)
{
// OK, this is not a WCF web service, but that should not matter :D
string endpoint = "http://www.html2xml.nl/Services/Calculator/Version1/Calculator.asmx";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(endpoint);
request.ContentType = "text/xml"; // or application/soap+xml for SOAP 1.2
request.Method = "POST";
request.KeepAlive = false;
//In case you have a proxy to resolve the server name also add these lines
var proxyServer = new WebProxy("XX.XX.XX.XX", 1234);
proxyServer.Credentials = CredentialCache.DefaultCredentials; // or username + password
request.Proxy = proxyServer;
// you can read these from files
string payload = @"<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">
<soapenv:Header/>
<soapenv:Body>
<tem:Add>
<tem:a>1</tem:a>
<tem:b>2</tem:b>
</tem:Add>
</soapenv:Body>
</soapenv:Envelope>";
byte[] byteArray = Encoding.UTF8.GetBytes(payload);
request.ContentLength = byteArray.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(byteArray, 0, byteArray.Length);
requestStream.Close();
HttpWebResponse response = null;
try
{
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
}
Console.WriteLine(string.Format("HTTP/{0} {1} {2}\n", response.ProtocolVersion, (int)response.StatusCode, response.StatusDescription));
// you can write this to files
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);
Console.WriteLine(reader.ReadToEnd());
// cleanp
reader.Close();
requestStream.Close();
responseStream.Close();
response.Close();
}
}
You get back a SOAP response, in this case this:
HTTP/1.1 200 OK
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://tempuri.org/">
<AddResult>3</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>
and it does not matter if it was an ASMX that generated it, or WCF or whatever. It's the response to a HTTP request.
If instead you send an invalid message, like:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:Add>
<tem:a>x</tem:a>
<tem:b>y</tem:b>
</tem:Add>
</soapenv:Body>
</soapenv:Envelope>
you will get back a fault, something like:
HTTP/1.1 500 Internal Server Error
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring> ... exception stacktrace here ... </faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
You can automate the tests with SoapUI or even integrate them with Junit, you could even use something like JMeter which although not designed specially for web services (like SoapUI) it can test SOAP. And you can off course use that basic client I added to my answer.