Browsing .NET Assemblies with .NET Reflector

The trickiest part about instantiating new types in any complex Web Service is knowing which type you actually need to instantiate for a new object. How do you know that you have to use WebStoreService.wws_itemsRow in the example above? The easiest way to discover types is by looking at the .NET Proxy assembly with Reflector.

You can find Reflector in c:\program files\West Wind Web Service Proxy Generator for Visual FoxPro\tools folder as Reflector.exe. Open Reflector and use Open to navigate and open the generated .NET Proxy assembly (webStoreServiceProxy.dll in this example)

If you open up the assembly in Reflector, the first thing you'll want to do is find the service and the method you want to call:

You can find the parameter list and see the type that is used for the method parameter. Each type is usually clickable and you can follow the link then to the actual type definition:

On the bottom you can see the full typename that you can use with loService.oBridge.CreateInstance() to create a new instance of the type and this is the key thing. It's namespace.classname that makes up this definition and the namespace is what you defined during the generation of the Web Service Proxy.

You can also see the properties of this type at a glance here which is useful. You can use the back and forward buttons to quickly navigate a hierarchy.

If you ever need to use a real complex service like the Amazon e-Commerce service for example, you will really appreciate how useful this functionality is in letting you quickly find types for instantiation.


© West Wind Technologies, 2004-2020 • Updated: 11/27/12
Comment or report problem with topic