I have a custom employee object in the web service as a type. It is defined as a class and returned. I need to consume it in a windows form. The class includes a first name, last name and full name property. I can consume it into a Object type, but can’t do anything with it from there. I can’t even get the properties out. I have also tried recreating the Employee class in the app and consuming it as a Employee type and it creates an error when building. How do you consume a custom object from a web service?
Share
I found the answer, when you include a web reference or service reference in .net, the custom object is part of the reference. So if you have WebRefernce1, to get to the custom object it is WebRefernce1.customObject. Then to consume a service do a Webreference1.NamespaceOfWebservices.WebMethod. Then consume it into the custom object or custom object array.