Im developing an architecture which uses c# Winforms, Webservices and Remoting. Im stuck in a issue about Types and namespaces. Ill try to explain the scenario to you to help me if you can...
its a MVC template and i have my View using Winforms technology. My Control is encapsulated in a Webservice as an Application server. My Model is represented by a Windows Service using Remoting as the communication protocol (Socket TCP)
To me to instantiate my Remoting service i need to instantiate an Interface that represent my object. As the following code:
Expand|Select|Wrap|Line Numbers
- IMyInterface MyInterface = (IMyInterface)Activator.GetObject(typeof(IMyInterface), "tcp://localhost:6060/MyRemoteObject");
IMyInterface = Interface that contains the methods id like to use which is a DLL.
MyInterface = the object created to call my remote methods for example:
Expand|Select|Wrap|Line Numbers
- int Sum = MyInterface.ReturnSum(10,10);
Well ... that´s a little piece of my scenario.
The issue im facing is:
I reference a webservice to get the type of return on the Interface to use in a method and i have this Webservice referenced on my Remoting server that implements this interface.
As the following:
Interface side
Expand|Select|Wrap|Line Numbers
- MyWebservice.MyClass ReturnMyClass();
Expand|Select|Wrap|Line Numbers
- public MyWebservice.MyClass ReturnMyClass()
- {
- MyReferencedWebservice.MyWebservice WS1 = new MyReferencedWebservice.MyWebservice();
- return WS1.ReturnMyClass();
- }
Do you have any suggestion for this issue?