We are in the process of prototyping an architecture for a multi-tier
application, and have run into the following problem:
1) We have a client application who calls a method sending over a
test.client.testClass proxy object, attribributed as
[DataMember(NameSpace="test.client")] which is generated by svcutil
2) The server receives the testClass (as test.server.testClass) does some
processing on that object, and then forwards it to another server also using
WCF.
Problem
What we want to do is to forward the same object (test.server.testClass) to
the next server, but we dont seem to be able to do that for a number of
reasons
a) the forwarding of the testClass object to the other server requires a new
proxy class, and we cannot just pass on our non-generated class (which makes
sense given the structure of WCF).
b) the other server also uses the test.server.testClass object, which is
attributed in the same way (since it is the same .cs file). In theory we
could generate another test.client.testClass proxy object in the
server-server service contract method but practically this does seem to
work. The issue is that the resulting assembly (test.server.dll) now has a
test.server.testClass object and a test.client.testClass object, and it can
no longer be used by svcutil to generate a test.client.testClass object for
the client application.
Our current thinking on solving this problem is not to use a strongly-typed
object at all (test.server.testClass), but a dictionary or collection object
which can always be passed around, but this seems like a clunky solution.
Is there a better one?