Troubleshooting the Generic/Endpoint Service Types
Known Limitations
The endpoint service brokers cannot be used with the following:
- Types that cannot be serialized by the Net Data Formatter. Objects support serializing and de-serializing of public and private fields of a class. To serialize a class, the class must have the Serializable attribute or implement the ISerializable interface.
- Non-typed types.
- Serialization of DataTables and DataSets. Their dynamic columns won't allow the creation of static return properties.
- Classes that are dynamic in nature, such as DataTables and DataSets, cannot be used. This is due to the fact that the broker uses reflection to discover public properties based on the class definition. Other .NET and custom classes that are dynamic in nature are also not supported.
Troubleshooting Tips
- If you are hitting an error when registering an instance (Web services or WCF) you can try to use a few Visual Studio tools to help. For WCF, WcfTestClient ("C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe") is best. It provides a nice visual way to test your WCF endpoint. If WcfTestClient has errors, service broker will as well. If you are working with Web services or want more details on WCF proxy generation, you can use the Visual Studio SVCUTIL utility to generate a proxy for the URL. If SVCUTIL has errors the endpoint service broker will too.
- If you want to see the data coming back from the service in XML, turn off compression. Once you know how to deal with the data, you can update the instance again with compression set to true.
- When using the SmartObject Services Tester tool and you’re deserializing a large amount of text, you need to click Edit and paste the results in the box so you don’t lose anything. Also check the top part of the paste to remove any ‘labels’ that aren’t part of the XML.
- If complex data is returned, you may need to switch tabs to see the resulting XML
- If you want to see how the service broker will interpret a particular type, you can use the WCFService project to replicate the source code and quickly test the results.
- Always use the serialization and deserialization methods for the service instance you are working with. Trying to use methods and objects from a different service or service instance will fail most of the time.