I have a 2 WCF services that are exposing the same object. Lets say the first service (SerA) exposes a class (classA) and the second service (SerB) which adds the filled classA also exposes this class (as this class is included in the parameters) Now when I retrieve the classA from SerA, it is concatenated with a namespace SerA.classA and when I add this using the second service, it requires a class like SerB.ClassA. Is there a way to specify that both classes are the same. I tried changing the namespace in reference.vb and it works but it would be real problem when the service reference is updated. Can anyone help me out in this? Thanks
You can put your ClassA (and other data contracts) definition into a class library and reference it from both services. That way, both should be using the same DataContracts.ClassA definition.
It's always a good idea to separate your service stuff into separate projects:
This way, you can reuse certain parts of your service contracts and possibly implementations, too.
MArc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With