|
| problems with objects being sent back from web service |
 |
Fri, 28 Mar 2008 13:58:39 +000 |
I have 4 web services set up and they are divided up based on the main object
type. So I have a people web service, company web service, etc. All of these
web services reference a dll that holds objects like attachments, notes, errors,
addresses, etc. The web services have method signatures that take a collection
of error objects like GetCompanyAttachments(int CompanyId, out List<Error>
errors).
The problem I'm running into is that in the site that uses these web services
instead of returning a TODCommon.Error object which is what all the web services
use, it ends up returning a webservice.company.Error or a
webservice.people.Error. I'm having to do a bunch of switch cases to determine
the type of Error that is returned to use it when in reality all of them are the
same type of TODCommon.Error, just renamed to webservice.company.Error or
whatever because they're returned by the service. The only way I can think of
to get around this is to pull all of my code from the different web services
into one service. I don't want to do this if I don't have to but I don't know
how else to do it without ending up with a ton of switch statements in my code.
Can anyone suggest a better way? Thanks.
|
| Post Reply
|
| Re: problems with objects being sent back from web service |
 |
Fri, 28 Mar 2008 23:49:52 +000 |
For anyone with the same problem I found an easy workaround here that works
great. http://ryanfarley.com/blog/archive/2004/05/26/737.aspx
|
| Post Reply
|
|
|
|
|
|
|
|
|
|