title: wcf service to service communication & data contract
body: <p>i have recently been involved in developing a WCF service which acts as a kind of multicast relay (i.e. accepts some incoming data, does some processing and then sends it off to multiple other external services). this service (which i will refer to as "my service") is fed data by a second internal service.</p>
  
  <p>this data is going to be relayed from my service as XML held in a string. therefore my service could simply accept a string as an parameter to a method request - but this is not ideal as we lose type safety.</p>
  
  <p>the second service has a class that encapsulates all of the information which my service requires to be processed, and eventually relayed to the external services.</p>
  
  <p>the second service exposes this class in it's data contract. Ideally, in order to maintain type safety, and without requiring lots of changes to the second service's implementation, i should accept this type of class as an argument to my service operation. </p>
  
  <p>what would be the best way for me to say in my datacontract that i require this type of class without duplicating code? could i add a service reference to this second class, and then use the proxy class which is created in my data contract?</p>
  
  <p>i just can't get my head around this, even though it seems like a trivial problem!</p>
  
  <p>cheers for any help!</p>