Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2005

Tip: Looking for answers? Try searching our database.

CodeDom V Emit with Dynamic Proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Ellison - 12 Mar 2005 21:41 GMT
Please point me in the correct direction for this type of discussion if I'm in the wrong newsgroup.

My problem domain is as follows:

A product we need to integrate with exposes a web service BUT its methods change as the product's repository changes.  IOW, as new items are added to the repository, new methods are "added" to the web service, one for each item in the repository.

I have thought of two possible approaches to tackling this problem.
1) Learn how to write XML Soap messages really really fast (I'm just now confident with XPath).
2) Dynamically discover operations and types at run-time using WS Description and build an assembly using Emit or the CodeDom which will contain the proxy.

I'm leaning towards (2) as the solution.  Do you all know of any great books or URLs that concentrate solely on MSIL and/or CodeDom?  Also, in your opinions, which direction is a better choice?  Since this will be running under a web process, my security options are limited, but configuration will be a bear for the entire solution anyway, so what's one more permission setting (rhetorical).  Thanks in advance.

Signature

TIM ELLISON

Sherif ElMetainy - 14 Mar 2005 22:46 GMT
Hello

Check out this tool
http://www.thinktecture.com/Resources/Software/DynWsLib/default.html

There is a problem though. Dynamically created proxies are assemblies that
are loaded at runtime. .NET assemblies are never unloaded unless you unload
the application domain. So if you have a client application that would be
running for a long time (such as a web application), and the web service
keeps changing, the client will end up having a lot of assemblies loaded
that are not used anymore which affects performance.
I had a similar situation, and I created an application domain foreach web
service client and marshaled the calls between my main app domain and the
proxy's app domain. I unloaded the proxy's app domain when it is no longer
needed (when my application got a notification that the configuration has
changed).

Best regards,
Sherif

Please point me in the correct direction for this type of discussion if I'm
in the wrong newsgroup.

My problem domain is as follows:

A product we need to integrate with exposes a web service BUT its methods
change as the product's repository changes.  IOW, as new items are added to
the repository, new methods are "added" to the web service, one for each
item in the repository.

I have thought of two possible approaches to tackling this problem.
1) Learn how to write XML Soap messages really really fast (I'm just now
confident with XPath).
2) Dynamically discover operations and types at run-time using WS
Description and build an assembly using Emit or the CodeDom which will
contain the proxy.

I'm leaning towards (2) as the solution.  Do you all know of any great books
or URLs that concentrate solely on MSIL and/or CodeDom?  Also, in your
opinions, which direction is a better choice?  Since this will be running
under a web process, my security options are limited, but configuration will
be a bear for the entire solution anyway, so what's one more permission
setting (rhetorical).  Thanks in advance.

Signature

TIM ELLISON

Tim Ellison - 15 Mar 2005 11:45 GMT
Thanks Sherif.  That one slipped my former searches.  

Signature

TIM ELLISON

 Hello

 Check out this tool
 http://www.thinktecture.com/Resources/Software/DynWsLib/default.html

 There is a problem though. Dynamically created proxies are assemblies that
 are loaded at runtime. .NET assemblies are never unloaded unless you unload
 the application domain. So if you have a client application that would be
 running for a long time (such as a web application), and the web service
 keeps changing, the client will end up having a lot of assemblies loaded
 that are not used anymore which affects performance.
 I had a similar situation, and I created an application domain foreach web
 service client and marshaled the calls between my main app domain and the
 proxy's app domain. I unloaded the proxy's app domain when it is no longer
 needed (when my application got a notification that the configuration has
 changed).

 Best regards,
 Sherif

 "Tim Ellison" <btesubscriptions@direcway.com> wrote in message
 news:#0qNiy0JFHA.2428@TK2MSFTNGP10.phx.gbl...
 Please point me in the correct direction for this type of discussion if I'm
 in the wrong newsgroup.

 My problem domain is as follows:

 A product we need to integrate with exposes a web service BUT its methods
 change as the product's repository changes.  IOW, as new items are added to
 the repository, new methods are "added" to the web service, one for each
 item in the repository.

 I have thought of two possible approaches to tackling this problem.
 1) Learn how to write XML Soap messages really really fast (I'm just now
 confident with XPath).
 2) Dynamically discover operations and types at run-time using WS
 Description and build an assembly using Emit or the CodeDom which will
 contain the proxy.

 I'm leaning towards (2) as the solution.  Do you all know of any great books
 or URLs that concentrate solely on MSIL and/or CodeDom?  Also, in your
 opinions, which direction is a better choice?  Since this will be running
 under a web process, my security options are limited, but configuration will
 be a bear for the entire solution anyway, so what's one more permission
 setting (rhetorical).  Thanks in advance.

 --
 TIM ELLISON
Tim Ellison - 15 Mar 2005 11:51 GMT
Sherif,

Thanks as well for informing me about the assemblies not being unloaded.  I'll have to make a note to unload the service after so many minutes of idle time.  

Signature

TIM ELLISON

 Hello

 Check out this tool
 http://www.thinktecture.com/Resources/Software/DynWsLib/default.html

 There is a problem though. Dynamically created proxies are assemblies that
 are loaded at runtime. .NET assemblies are never unloaded unless you unload
 the application domain. So if you have a client application that would be
 running for a long time (such as a web application), and the web service
 keeps changing, the client will end up having a lot of assemblies loaded
 that are not used anymore which affects performance.
 I had a similar situation, and I created an application domain foreach web
 service client and marshaled the calls between my main app domain and the
 proxy's app domain. I unloaded the proxy's app domain when it is no longer
 needed (when my application got a notification that the configuration has
 changed).

 Best regards,
 Sherif

 "Tim Ellison" <btesubscriptions@direcway.com> wrote in message
 news:#0qNiy0JFHA.2428@TK2MSFTNGP10.phx.gbl...
 Please point me in the correct direction for this type of discussion if I'm
 in the wrong newsgroup.

 My problem domain is as follows:

 A product we need to integrate with exposes a web service BUT its methods
 change as the product's repository changes.  IOW, as new items are added to
 the repository, new methods are "added" to the web service, one for each
 item in the repository.

 I have thought of two possible approaches to tackling this problem.
 1) Learn how to write XML Soap messages really really fast (I'm just now
 confident with XPath).
 2) Dynamically discover operations and types at run-time using WS
 Description and build an assembly using Emit or the CodeDom which will
 contain the proxy.

 I'm leaning towards (2) as the solution.  Do you all know of any great books
 or URLs that concentrate solely on MSIL and/or CodeDom?  Also, in your
 opinions, which direction is a better choice?  Since this will be running
 under a web process, my security options are limited, but configuration will
 be a bear for the entire solution anyway, so what's one more permission
 setting (rhetorical).  Thanks in advance.

 --
 TIM ELLISON

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.