Problem sharing custom data types across web services
Hi all,
I'm having a bit of trouble sharing some user defined objects across multiple web services. FYI I'm using visual studio team system, and adding my web services using the application designer, so most of the web service code is auto generated.
Alright, this is the situation. I have a class library in which my custom data types are defined, lets say the namespace for this class library is clibrary, and there is a class representing a custom object within this library called CustomObject.
I also have two web services, service 1 and service 2, with different namespaces ws1 for service1 and ws2 for service2. Both web services have a reference to the library containing my custom object.
Service1 has a web method GetCustomObject which returns clibrary.CustomObject as it's type.
Service2 has a reference to the web service Service1 and a method ConsumeGetCustomObject. Within this method an object of type clibrary.CustomObject is defined, and I attempt to assign it to the result of a call to Service1.GetCustomObject. However I will get an error in the form of ws1.CustomObject (ws1 being the namespace of the Service1) cannot be converted to type clibrary.CustomLibrary.
Any ideas as to why I get this error. It seems to me that service2 learns of the CustomObject through it's reference to service1, but why does service1 append it's namespace to CustomObject. I've been researching this problem to no avail and I'm convinced theres something simple I'm missing out. Please if you have any ideas or direction you can point me in let me know.

