GotDotNet User Sample: Dynamically invoke XML Web Services - significantly improved: "It is pure reflection prgramming in .NET.
E.g.
DynamicWebServiceProxy ws = new DynamicWebServiceProxy();
string ns = 'eYesoft.Tools.Web.Services.DynamicProxy.';
ws.WSDL = 'http://localhost/CTWS/Service1.asmx?WSDL';
ws.TypeName = 'Service1';
ws.MethodName = 'GetOrder';
// get all types of the dynamic assembly
Type[] types = ws.ProxyAssembly.GetTypes();
// get a certain type by name - watch out for fully qualified name
Type t = ws.ProxyAssembly.GetType(ns + 'Order');
...
Then create an instance of the type by using reflection.
object result = Activator.CreateInstance(t);
result = ws.InvokeCall();
Christian "
The more I read, the more I acquire, the more certain I am that I know nothing. -Voltaire
Subscribe to:
Post Comments (Atom)
Ramadan - What is it?
Ramadan is one of the most important and holy months in the Islamic calendar. It is a time of fasting, prayer, and spiritual reflection fo...
-
ZipStudio - A versatile Visual Studio add-in to zip up Visual Studio solutions and projects - The Code Project - C# Programming
-
TargetProcess - Agile Project Management & Bug Tracking Software | Download (Project Management Software, Project Tracking, Bug Tracking...
No comments:
Post a Comment