Migrating from v1 to v2 - HodStudio/XitSoap GitHub Wiki
Here are the main differences between v1 and v2!
Before, we had 3 constructors for the WebService class:
public WebService()
{
}
public WebService(string baseUrl, string methodName = "", string @namespace = "http://tempuri.org/")
{
Url = baseUrl;
Method = methodName;
Namespace = @namespace;
}
But after some tests in real world (and not only and the company environment that use the library first), we come with some possible improvements. Now, when create a WebService object, you don't specify the methodName anymore. The second parameter is now the namespace. Please: verify your code as this will not create a break on your code, but can mislead you to wrong behavior when running the application.
public WebService(string url, string @namespace)
{
Url = url;
Namespace = @namespace;
}
So, this:
var wsCon = new WebService<ProductOutput>();
wsCon.Invoke("GetProduct");
var result = wsCon.ResultObject;
Became this:
var wsCon = new WebService();
var result = wsCon.Invoke<ProductOutput>("GetProduct");
Any new doubts will be putted here as new points for the migration guideline.