locked
How to register a new custom category with OCS? RRS feed

  • Question

  • "Categories must be registered with Office Communications Server before they can be published and subscribed to. For security reasons, the registration must be done by an administrator of the server."(From UC Client API document)

     

    Q:  How to register a new custom category with OCS?   When publishing my custom data, I received a "UCC_E_SIP_STATUS_CLIENT_FORBIDDEN" error. I wonder if this error has anything to do with the category registeration.

     

     

    Thursday, February 28, 2008 7:23 AM

Answers

  •  

    As you mentioned, there is no documenetation about to how to register a custom category.  The way I was able to get this to work was by adding an entry in the dbo.CategoryDef table in the Back End.
    Friday, March 7, 2008 10:20 PM

All replies

  • is anybody know the answer to this question? we cannot find the answer yet,from the sdk and net.

    Friday, February 29, 2008 1:18 AM
  •  

    As you mentioned, there is no documenetation about to how to register a custom category.  The way I was able to get this to work was by adding an entry in the dbo.CategoryDef table in the Back End.
    Friday, March 7, 2008 10:20 PM
  • You should call RtcRegisterCategoryDef to register any new categories. That is the preferred way.
    Thursday, June 11, 2009 6:00 PM
  • From the book on programming OCS that was just published by MS Press (shameless plug since I'm one of the authors)

    In order to run and test this application, the custom category that is used to store the location information for the users must be defined to the OCS server.  This is accomplished by accessing the SQL database that is used by OCS and running a stored procedure on that database to define the new category.

    There are various tools that can be used to access the database, such as the command line OSQL tool, but these details are not covered in this book.  Once the database is accessed, then the stored procedure is invoked with the name of the new category as the input parameter.  For example, the commands to the OSQL tool would be:

    use rtc

    exec RtcRegisterCategoryDef N'GPSLocation'

    Where rtc is the name of the database, RtcRegisterCategoryDef is the name of the stored procedure, and GPSLocation is the name of the new category to be defined. 

    Once this category is defined any application can publish instances of it or subscribe to it from the OCS server.  Note that there is nothing in the process that defines either the syntax or the semantics of the new category.  The only requirement that the OCS server imposes on instances of the category is that they be well formed XML.  It is up to the application that uses the category to define the structure of the instances and to ensure that they are well formed when published to the server and to parse them when they are delivered from the server.

     

    Programming for Unified Communications with Microsoft® Office Communications Server 2007 R2 (Pro-Developer)

     

     



    Oscar Newkerk Application Architect Unify Squared
    • Proposed as answer by Oscarn Thursday, June 25, 2009 5:40 PM
    Friday, June 19, 2009 7:14 PM