Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI'm building a SOAP webservice API to allow our customers to integrate their external apps with our systems. This requires the webservice(s) to have a lot of operations, and many different .NET classes to serialize.
What I have done so far is split the API into multiple webservices (.asmx files using VS.NET).
- PersonHandler.asmx
- CompanyHandler.asmx
- ActivityHandler.asmx
- etc.
This way the names of the operations can be a bit shorter (e.g. CompanyHandler.Save(...) instead of SuperHandler.SaveCompany(.
To make the parameterlists and return values of the service easy to use I have made a set of classes which act as simple data holders with no methods.
- Company
- Person
- Activity
- etc.
The problem arises when I make a sample client (in my case also in .NET).
When I add a reference to the webservice (using VS.NET or wsdl.exe) the data holder classes are auto-generated for each service that references them (as part of the WS proxy/wrapper).
So if both the PersonHandler and CompanyHandler uses a Person object in a return or parameter value it causes problems. If the proxies are generated in the same namespace there is an obvious problem with an "ambigious reference" and if the are created in seperate namespaces it makes the client app unnecessarily complicated and means that you have two 100% identitical classes in two different namespaces (so you can't e.g. use the Person class returned from CompanyHandler.GetPersonsW
See the included code section for an example which illustrates the problem.
Any suggestions?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: DarrenDPosted on 2009-10-15 at 02:35:35ID: 25578773
Comments are available to members only. Sign up or Log in to view these comments.