Proxy Classes - Copy/Paste Pre-compiler
-
Hi, Firstly I am currently a Project Manager so I don't have the detail I would probably have if this was an Open Source issue which I am more familar with. Anyway enough of the caveats. My understanding is the team create Proxy Classes using WSDL.exe. These classes and then cut and paste into other code which uses them. Please please please don't ask why, accept it does and if you are still reading read on. What I want to know is, Does anyone know of any code which could be used to automate this. I was thinking, project managers can, that a pre-compiler of some sort could solve this. E.g. in the source which need to have the pasted code you could have. // #AUTO_GENERATED_SOURCE_FILE:Auto_GeProxy_Class.cs #FUNCTION_TO_COPY:My_Foo() Then make a tool which pre-processing this appropriately. People are using VS2008 Thanks for listening.
-
Hi, Firstly I am currently a Project Manager so I don't have the detail I would probably have if this was an Open Source issue which I am more familar with. Anyway enough of the caveats. My understanding is the team create Proxy Classes using WSDL.exe. These classes and then cut and paste into other code which uses them. Please please please don't ask why, accept it does and if you are still reading read on. What I want to know is, Does anyone know of any code which could be used to automate this. I was thinking, project managers can, that a pre-compiler of some sort could solve this. E.g. in the source which need to have the pasted code you could have. // #AUTO_GENERATED_SOURCE_FILE:Auto_GeProxy_Class.cs #FUNCTION_TO_COPY:My_Foo() Then make a tool which pre-processing this appropriately. People are using VS2008 Thanks for listening.
They need to generate the new proxy class only when there is some change made in the service. Now, since they will be having existing old proxy class, they can use
/out
or/o
switch to directly write the new class to the mentioned location. Like this:wsdl [service url] /o [file where to write the proxy class]
Is this what you are looking for?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
-
They need to generate the new proxy class only when there is some change made in the service. Now, since they will be having existing old proxy class, they can use
/out
or/o
switch to directly write the new class to the mentioned location. Like this:wsdl [service url] /o [file where to write the proxy class]
Is this what you are looking for?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain
-
Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain
1. If they are merely adding the new parts of the proxy class to the old one, I would say please don't do it. You might miss out something and it will spoil entire application. Replace the entire proxy class. 2. Say the service had a method Sum which took in "int x" and "int y" as parameters. Later, they changed it to give the sum of three numbers and hence added "int z" as a parameter. Now, they need to change all the calls for the method in the client. Here, there is not much of chance, IMHO, of automation. I am saying so since in your application, the might or might not be as simple as my example. Also, you never know what will be the next change. You also don't know how the clients have consumed the method. If all the consumption ways are different, it will not be an easy task to automate. If you can clarify what exactly is copied and pasted, maybe someone could give a better response. For now and from my understanding, I don't see much of an automation here.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
-
Hi, Firstly thanks for replying. I think the original is a code management one. As I said I don't have the detail behind why they are where they are. I think but don't know, that they have some common functions which are split across various projects. They generate the proxy classes and need to ensure all services have these new generated types. I believe they new some of the code a function level to be copied into the other projects. I have googled for cut and paste from proxies and it does seem that there are few people fallen into this trap in one way or another. Regards, Iain
Iain Wiseman wrote:
I think but don't know
We have a saying where I work: "There is no thinking allowed. You either know, or you need to go find out. Thinking only results in misunderstandings and huge bugs." But, I agree with the other poster. This sounds like a very kludgy way of updating the web service interfaces. Nothing personal, just my two cents...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...