I am migrating a .NET GUI application built in .NET 1.1 to .NET 4.0. The application uses WSE 2.0 for web service communication. Web Service Comm. Module contains web service proxy and other class files implementing asynchronous functioning. The module sits between .NET GUI application and application Server hosting Web Services. Application Server has been implemented in non-Microsoft technology and the migration project should not change the server and the web services.
All the classes and forms in .NET GUI application call synchronous methodName of web service proxy class. Web Service Proxy derives from a custom class which in turn derives from Microsoft.Web.Services2.WebServicesClientProtocol. The custom class overrides “Invoke” method. Method “BeginInvoke” is called inside overrided “Invoke” method. Therefore even though application classes and forms are calling synchronous methodName , finally the web request goes as asynchronous. Overrided “Invoke” method and the custom class enable to display dialog window with Cancel button for cancelling web request.
Proxy class in WCF has following implementation for a web method call. Is there something in WCF which can allow to customize functioning of call Base.Channel.MethodName(input)? Basically something which can allow changing synchronous web method call to asynchronous at run time?
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
getNewCustomerCodeResponse iAccountService.getNewCustomerCode(getNewCustomerCode request)
{
return base.Channel.getNewCustomerCode(request);
}