Automating profile creation

Post Reply
michael.mongeau
Posts: 14
Joined: Fri Jun 16, 2017 3:40 pm

Automating profile creation

Post by michael.mongeau »

We are using Webinator 6 on Windows, specifically
Webinator Professional Version 6.01.1324485832 20111221 (i686-intel-winnt-64-32). The primary use is for indexing a documentation set which consists of hundreds of individual books, each with its own search index.

A colleague is working on a automated process to generate individual books in the documentation set and was asking if it is possible to script the creation of a profile and its basic properties (Base URL, etc.).

The first step would probably be creating a new profile folder and copying in the contents of the TestDB folder. Is it then possible via a script to register the new DB with Webinator and set its basic walk properties?

Thank you,

Michael Mongeau
Stratus Technologies
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Automating profile creation

Post by jason112 »

Later versions of Webinator added an admin SOAP API, allowing for the automation of things like profile creation and changing settings. An upgrade of Webinator would be required.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Automating profile creation

Post by mark »

Even without the SOAP API, you'd be better off driving the regular web interface than trying to cobble together all the right bits. You can use curl or some scriptable http client to do that.
michael.mongeau
Posts: 14
Joined: Fri Jun 16, 2017 3:40 pm

Automating profile creation

Post by michael.mongeau »

Upgrading is not an option so I will explore the curl route. How would you provide the admin credentials from a command line browser?
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Automating profile creation

Post by mark »

This creates a new profile called MyNewProfile. Adjust ADMIN_USER, ADMIN_PASSWORD, and YOUR_SERVER according to your setup.

curl -b "`curl -d 'iname=ADMIN_USER&ipass=ADMIN_PASSWORD' \
http://YOUR_SERVER/cgi-bin/texis/webinator/dowalk/login.html|sed -n \
's/^.*\(ULOGIN=[^;]*\);.*$/\1/p'`" -d \
'Name=MyNewProfile&ProfileType=&Copy=&SSc_ndbs=2' \
-o profilecreate.html http://YOUR_SERVER/cgi-bin/texis/webinator/dowalk/addwalk.html
michael.mongeau
Posts: 14
Joined: Fri Jun 16, 2017 3:40 pm

Automating profile creation

Post by michael.mongeau »

I am trying to get this working using the Adobe ColdFusion application server and the CFML language. There is a web client tag called cfhttp that can perform GET and POST operations to a server.

I am doing a POST to http://myserver/scripts/texis.exe/Webin ... dwalk.html and passing the form variables Name, ProfileType, Copy, SS_dataspace, and SSc_ndbs. I am also passing the cookie header ULOGIN with the correct value.

The page I get back in response is the list of existing profiles with the New Profile form filled in with the values sent by the cfhtp POST operation. It does not actually submit the form, it just prepopulates the form. Is something else needed to get it to create the profile?
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Automating profile creation

Post by mark »

That should work. Check for info/error messages on the resulting page (inside div with class boxMessages). Make sure you're not specifying an already existing profile Name or SS_dataspace.

I forgot to mention SS_dataspace before. It should be the full path of a directory to create, the "Data Directory" from the profile creation form.
michael.mongeau
Posts: 14
Joined: Fri Jun 16, 2017 3:40 pm

Automating profile creation

Post by michael.mongeau »

I had missed this error message on the resulting page: "invalid login cookie". Once I set the correct value for the login cookie I was able to get it working.

Thanks for the hint.
Post Reply