WCF/WF - How to cal a WCF Service with DataContract as arguments

Asked By Ishwar Naste on 13-May-10 09:46 AM

I have a 2 WCF services.
Consider in first service i have operation contract
ex
[operationcontract]
void InsertData(DataCollection DC);

and the DataCollection is my dataContract Which has some arguments.

Now i want to Consume InsertData operation in my 2nd Service
How should i pass DataContract from my second service.

do i need to import .dll file of the 1st service in 2nd service or is there any other way.
i am stuck at this point.

i used .dll file of the 1st service in 2nd and trying to call InsertData from 2nd service using service reference.
but i am getting error while creating instance using service reference saying that method overloading has some invalid arguments.

Thanks in adavance

You create a Service Reference in the project - Robbe Morris replied to Ishwar Naste on 13-May-10 11:02 AM

in the second WCF service.  If you can, have both services share your DataContracts in a shared assembly.  It will make things much easier.