Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
In CAO model for client objects to be created by “NEW” keyword
In CAO model for client objects to be created by “NEW” keyword what should we do?
✍: Guest
Remoting Clients and Remoting Server can communicate because they share a common
contract by implementing Shared Interface or Base Class (As seen in previous examples).
But according to OOP’s concept we can not create a object of interface or Base Classes
(Abstract Class). Shipping the server object to client is not a good design practice. In
CAO model we can use SOAPSUDS utility to generate Metadata DLL from server which
can be shipped to client, clients can then use this DLL for creating object on server. Run
the SOAPSUDS utility from visual studio command prompt for syntax see below :-
soapsuds -ia:RemotingServer -nowp -oa:ClientMetaData.dll
Where RemotingServer is your server class name.
ClientMetaData.dll is the DLL name by which you will want to create the metadll.
Server code will change as follows :-
ChannelServices.RegisterChannel(objHttpChannel)
RemotingConfiguration.ApplicationName = “RemoteObject”
RemotingConfiguration.RegisterActivatedServiceType(GetType(InterFaceRemoting.InterFaceRemoting))
Note :- We have to provide applicationname and register the object as ActivatedServiceType.
On client side we have to reference the generated ClientMetaData.dll from SOAPSUDS
utility. Below are changes which are needed to be incorporated at the Remoting Client :-
RemotingConfiguration.RegisterActivatedClientType(typeof(RemoteObject),“http://
localhost:1234/MyServer”)
Dim objRemoteObject as new RemoteObject().
RemoteObject is class which is obtained from ClientMetaData.dll which we created using
SOAPSUDS utility. Now you can reference the object as normal object.
2007-10-23, 5221👍, 0💬
Popular Posts:
Why does malloc(0) return valid memory address? What's the use? malloc(0) does not return a non-NULL...
How can you raise custom errors from stored procedure ? The RAISERROR statement is used to produce a...
Where are cookies actually stored on the hard disk? This depends on the user's browser and OS. In th...
How To Enter Numeric Values as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to...
How To Export Data to an XML File? - Oracle DBA FAQ - Introduction to Oracle SQL Developer If you wa...