// you’re reading...


RQL development with OpenText Web Site Management Server 11

This is a cross post, courtesy of Manuel Schnitnger.

Today I’d just like to write a few lines about the changes regarding the RQL programming in version 11 of the OpenText Web Site Management Server (scheduled for the end of 2011). The change I’ll describe might sound like a totally different approach (and that is possible when looking behind the scenes) but the impact for you as someone who creates RQL based plugins is very small.
Ok, the change: In the Managment Server Version 11 (Swan version) Microsofts COM components for the RQL communication are not longer available/supported. Instead of the COM communication the OpenText Web Site Management Server will use the Windows Communication Foundation that is part of the .Net framework.

The reasons for the change

  • COM components were introduced by Microsoft in the year 1993 (18! years ago) and worked well for the OpenText Web Site Management Server. But nowadays it seemed to be much better to rely on a state-of-the-art technology.
  • Microsofts support for COM components ended years ago and we would like to use a fully supported technology.

What does that mean for your RQL based plugins?

  • If you use the RQL webservices for the communication within your plugins, then the change does not have any impact.
  • If you use the COM objects, then you’ll have to implement small changes.

In order to provide a good overview I’ll provide a function that is probably used by many developers and in a second step I’ll provide a sample RQL plugin that is intended to run on a OpenText Web Site Management Server version 11.

New functions will do the following things

  • receive a string (RQL command)
  • create an object (RQL object)
  • execute the RQL command
  • and return a XML structure (server response)
'Version 10 and earlier:
function sendXML (XMLString)
   set objData = server.CreateObject("RDCMSASP.RdPageData")
   sendXML = objData.ServerExecuteXML(XMLString, sErrors)
end function

'Version 11:
function sendXML (XMLString)
   set objData = Server.CreateObject("OTWSMS.AspLayer.PageData")
   sendXML = objData.ServerExecuteXml(XMLString, sErrors)
end function

The changes to this function are obviously very small:

  • Instead of RDCMSASP.RdPageData we now use OTWSMS.AspLayer.PageData to create the RQL object.
  • the line” objData.XMLServerClassname=”RDCMSServer.XmlServer” is not longer used in this function.

How do I update my old plugins to work on version 11?

  • Use the Search&Replace function of your development environment: Search for “RDCMSASP.RdPageData” and replace it with “OTWSMS.AspLayer.PageData
  • “Use the Search&Replace function of your development environment: Search for “objData.XMLServerClassname=”RDCMSServer.XmlServer” and replace it with “”.

Hint 1: If your obejcts do have other names….then of course you have to use different search strings ;-)
As most people (including me) like to have a runing script instead of just a code snippet, this sample plugin might be helpful:

' Create RQL Server Object And XML-Document Object
set XMLDom     = Server.CreateObject("OTWSMS.Core.RdObject")
set RQLObject  = Server.CreateObject("OTWSMS.AspLayer.PageData")
' Define Variables
Dim RQLStatement        ' Contains the RQL command
Dim RQLRequest          ' Contains the result of the RQL Server
Dim ServerError         ' Contains an error message of the RQL Server
Dim Projects            ' Contains the number of the projects

LoginGUID   = session("LoginGUID")
SessionKey  = session("SessionKey")

' Create RQL Statement (Load All Projects)
RQLStatement= "<IODATA loginguid=""" + LoginGUID + """>" + _
              "<ADMINISTRATION>" + _
              "<PROJECTS action=""list"" />" + _
              "</ADMINISTRATION>" + _
' Transfer RQL Statement To RQL Server Object
RQLRequest = RQLObject.ServerExecuteXml(RQLStatement, ServerError)

' Show Appearing Errors
if ServerError > "" then Response.write "An error has occured:</BR></BR>"+ServerError
' Load Result Into XML DOM
Call XMLDom.LoadXML (CStr(RQLRequest))

' Execute XML Query For Projects In XML DOM
Set XMLDom = XMLDom.ObjectByQuery ("//PROJECTS")
' List Every Project By Name
for Projects=1 to XMLDom.objects.count
   Response.write XMLDom.objects(Projects)("name")+"</BR>"
' Kill RQL Server Object
Set RQLObject=Nothing

Hint 2: If you have a closer look at the script, you’ll notice that there is another change that I forgot to mention.
If you don’t use the Microsoft XML-DOM object but the one that is provided by the OpenText Web Site Management Server you’ll also have to change this line:

set XMLDom = Server.CreateObject("OTWSMS.Core.RdObject")

The same line in version looks like this:

set XmlDom = Server.CreateObject("RDCMSAspObj.RdObject")

So another search & replace task would look like this:
Search for “RDCMSAspObj.RdObject” and replace it with “OTWSMS.Core.RdObject

Ok, so these were the changes regarding RQL communication. A description of the changes as well as the sample RQL plugin (above) are planned to be part of an updated RQL documentation.
To answer a question that might possibly occour: No, I’m not aware of any other changes regarding RQL. ;-)

Have fun with RQL !

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Markus Giesen Markus Giesen is a Solutions Architect and RedDot CMS Consultant, formerly based in Germany. Travelling around the world to find and offer solutions for a better world (in a very web based meaning). He just found a way to do this as part of a Melbourne based online consultant house. On this blog Markus shares his personal (not his employers) thoughts and opinions on CMS and web development. In his spare time you will find him reading, snowboarding or travelling. Also, you should follow him on Twitter!


3 comments for “RQL development with OpenText Web Site Management Server 11”

  1. With “…are no longer available/supported…” does this mean the COM objects are completely removed from version 11 or are they still available but unsupported, maybe as an optional package?

    What a coincidence, that Microsoft just decided this year to return to the COM platform for the upcoming versions of Windows (see http://www.heise.de/developer/meldung/Build-Mit-Windows-Runtime-kehrt-Microsoft-zu-COM-zurueck-1344119.html – German).

    Posted by Kosi2801 | October 4, 2011, 12:24 pm
  2. I am having difficulty getting a working syntax that will parse the RQL that returns the Projects and Groups of a user. I am using similar ASP to the example here, also basing on Manuel Schnitger’s examples. The complication is that I want to get at the PROJECT attributes, as well as the GROUP attributes. The RQL is:

    The output is like this:

    … etc

    This is the syntax (from your example) that I cannot figure out how to modify:
    ‘ Execute XML Query For Projects In XML DOM
    29.Set XMLDom = XMLDom.ObjectByQuery (”//PROJECTS”)
    30.’ List Every Project By Name
    31.for Projects=1 to XMLDom.objects.count
    32. Response.write XMLDom.objects(Projects)(”name”)+”"

    I will appreciate any suggestions.

    Posted by Romola Chrzanowski | December 16, 2011, 5:15 pm
  3. OT informed that this VB based solution was just a quick fix to migrate all the old RQL code to work with v11.

    But this is just a temporary solution, all RQL should be migrated to the web service (WCF) based connection (they say ;-) )

    Posted by Stefan Buchali | November 6, 2012, 10:36 am

Post a comment

Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...