handling class declarations generated by proxy

T

TS

Hi, i have some common classes that i pass from my client app through the
web services to my server side app. I have their assembly referenced in both
places. The proxy automatically creates its own class definitions for all
objects used as params to the web service. A MS professional helped set up
the project and what he said to do was to comment out these proxy created
classes becuase otherwise you get a conflict of duplicating names. So what i
have to do is every time i update my web reference, i have to go in to the
reference.cs class and comment them out.

What is the industry standard way of doing this because this doesn't seem
very good?

thank you
 
T

Tom Porterfield

Hi, i have some common classes that i pass from my client app through the
web services to my server side app. I have their assembly referenced in both
places. The proxy automatically creates its own class definitions for all
objects used as params to the web service. A MS professional helped set up
the project and what he said to do was to comment out these proxy created
classes becuase otherwise you get a conflict of duplicating names. So what i
have to do is every time i update my web reference, i have to go in to the
reference.cs class and comment them out.

What is the industry standard way of doing this because this doesn't seem
very good?

thank you

Instead of using a webreference in your project, use the command line tool
wsdl.exe to generate your proxy. Any time you need to update, run wsdl.exe
to generate the proxy in a temp directory. Copy and paste the updated
methods, making sure to exclude copying the class declarations, into a copy
of the proxy that you keep in your project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top