Trying to send a complex type between two systems that have the same code base. They are both aware of the same object that is the data transport medium. However when I pass object on the consumer proxy it appears as an object in the web service namespace instead of the one in the application.
Is there anyway that I can define to use the internal object?
[WebMethod]
public void Run(TransportObject transport)
appears in my application under MyNamespace.Webservice.Transport instead of MyNamespace.Objects
As Henk says sharing of types in WCF is default behavior.
I will qualify that by expanding on it and demonstrating how to achieve it:
So rather than have visual studio generate a service reference for you, you can have WCF create the proxy when it executes by using ChannelFactory.
For example:
In the above example,
IMyServiceContractis your service contract, andMyRequestTypeandMyResponseTypeare your data contracts, which you can use by referencing the assembly which the service also references (which defines these types).