次の方法で共有


How to program the Marketing and Catalog web services?

A few people had asked this question “How to program the Marketing and catalog web services?”. So I thought I might write about it. As I had mentioned in an earlier post, one of the major feature additions to the Commerce Server Feature Pack was the introduction of the catalog and marketing web services which exposes the entire functionality of these systems.Complementing these web services is a new role based security model which allows you to control which users can perform which operations. The security model is based on the Windows Authorization Manager (Azman for short) and provides highly granular tasks/operations ranging from providing complete control of the catalog system to controlling editing of products, categories and languages in one or more catalogs. This security model is a significant improvement over the security model in CS2002 in several respects. Given these architectural improvements and the advantages the Web services (in general) offer, the immediate question that comes to mind is “How do you program these web services?”. The answer is you don't directly program against these web services. The catalog web service has 57 methods some of which are logically related and others independent of each other. In order to avoid the developers from having to know these details and to simplify the learning curve, we have shipped an assembly in the feature pack which allows you to exploit the power of these web services through an object oriented programming model.

  • The assembly is named Microsoft.CatalogServer.Bridge.dll and exposes a set of classes which wrap the appropriate web service calls. You should program against these classes instead of against the web service methods directly. These classes expose the entire functionality offered by the web services.
  • The classes in this assembly provide an object oriented programming model, validates all your input, wraps calls to appropriate web services methods and optimizes the amount of information that is transferred from the client to the web service.
  • This assembly also provides an enhanced exception handling model which ensures that exceptions thrown on the catalog server are serialzed/deserialized and thrown on the client (instead of just throwing SoapException).
  • All the classes and methods in this assembly along with sample code for their usage are very well documented in the Feature Pack documentation. There is a separate chm file named cs2002_agentapi.chm installed under Program Files\Microsoft Commerce Server 2002\FP1\SDK which contains this documentation.

We are currently working on providing a similar rich programming model on the catalog server which can be called directly from your runtime sites.

Additional links:

Comments