S
stormogulen
Hi!
I'm having some problems figuring out how to organize the different
tiers of an application using a webservice.
The bottom layer is the DAL, and some of the objects in the DAL, I
would like to send via a webservice. That is no problem, just
reference the DAL from the webservice.
Now in the business layer I am calling methods on the webservice,
which return objects of types defined in the DAL. With the exception
that only proxy objects are returned, ie. new classes defined from the
webservice describtion.
This means that I manually have to write code that converts these
proxies to the actual classes, which is very tiresome.
Another option that I have tried is to make the classes in the DAL
implement IXMLSerializable, which has the effect that the webservice
methods now return XMLNodes instead of proxy classes. I can now read
the returned XMLnodes in the DAL classes and reconstruct the objects.
But this also requires a lot of work.
So, does anybody have a better idea how to send objects on a
webservice while retaining the type?
This is a pure dotnet environment, so the consumer should have the
same knowledge as the server.
Best regards,
I'm having some problems figuring out how to organize the different
tiers of an application using a webservice.
The bottom layer is the DAL, and some of the objects in the DAL, I
would like to send via a webservice. That is no problem, just
reference the DAL from the webservice.
Now in the business layer I am calling methods on the webservice,
which return objects of types defined in the DAL. With the exception
that only proxy objects are returned, ie. new classes defined from the
webservice describtion.
This means that I manually have to write code that converts these
proxies to the actual classes, which is very tiresome.
Another option that I have tried is to make the classes in the DAL
implement IXMLSerializable, which has the effect that the webservice
methods now return XMLNodes instead of proxy classes. I can now read
the returned XMLnodes in the DAL classes and reconstruct the objects.
But this also requires a lot of work.
So, does anybody have a better idea how to send objects on a
webservice while retaining the type?
This is a pure dotnet environment, so the consumer should have the
same knowledge as the server.
Best regards,