Single Sign On and Content Web Services Update

Update 04/28/2016

Pre- Requisites– Livelink 10/10.5/16  Server configured for Single Sign On using IWA . This is for users/companies who allow REMOTE_USER to trickle into livelink. If you have configured your livelink to use OTDS or simply said if OTDS is actually responsible for providing the Authentication then this post does not address that.In CWS which involves a OTDS server you are sourcing your authentication(read a different WSDL than the livelink authentication WSDL) from that.The theory there is your wsapi computer or client will pass your kerberos authentication and OTDS will vet that with AD/DC and pass it back. This OTDS ticket is now usable in your code.

 

Sample Setup on the WSAPI WEBSERVER

  1. Copy the webservices from OpenText  to a folder in the IIS server.For ease we assume your livelink server is on the same host and knows how to handle REMOTE_USER.If you want to run your livelink on another server edit the Web.Config to give it the real server name and port.I doubt if my setup can span computers never tested it that way.
  2. Configure an application that looks like the screen capsso setup
  3. Make sure it has IWA turned onsso1and make sure Extended Protection is OFF
  4. If not already done create a logs directory that is at the same level as \bin and manage its permissions correctly.This can also be done by doing a setspn which is really an advanced topic.The intent is when the client code hits this WSDL the application pool identity will transfer your remote_user and windows will do all that mumbo_jumbo.windows acl
  5. Edit the Web.Config carefully after making a copy .I am showing you changes highlighted for Authentication,DocumentManagement& ContentService.The file is rife with several possibilities so start with these 3 and mature into SSL and others Web.Config
  6. Give the WSDL a whirl .If it cant create a service or the green lines it is not a fault of OT.This is all windows WCF configuration.Check Microsoft sites or google for your errors.Things I check is that if all is successful the logs directory will show windows logs
  7. If the WSDL can now be put into a real source code file and you get errors in your client file the log files will indicate the errors coming from livelink. Note if you were using code form anonymous livelink/wsapi  you need to rebuild the source after updating the wsdl’scode
  8. The above were tested on a CS10 with oscript directory services and patches for SSO. I wrote a client WS which uses windows authentication and gave it to our app dev team.

If you have the chance to code in this you will be very pleased

Advertisement

LAPI What is It and Should I use it ?

Update:06/12/2017

Realized that OT is supporting old LAPI for their product called Enterprise Scan,Escan used to be completely a client app so if the Livelink server connecting to it is CS16 then OT ask you to install a module.Surreptitiously they call it “Private Bridge Interface” which is all the LAPI Oscript code conveniently bundled into its own Ospace.My guess is this will continue until ESCAN and AGA and other OT bread winners convert to SOAP or REST.

 

Update:12/29/2015 OT has announced that with the launch of CS 16 there will be no server side oscript to receive lapi calls so don’t waste your time reading this or programming in it.Just keeping this for vestigial reasons.

At time of this writing circa Feb 2013. Open Text’s livelink has been in the market for about 18 years and a fairly loyal fan share.The core software was always enhanced /added on by Oscript but for programmers who wished to do utilities such as adding user’s en masse, deleting things en masse et there was LAPI which stood for Livelink Application Programming Interface  .In its inception what I used to see in around 2000,you could program in Java,which I did,there was VB6,there was then C & C++. Vended products such as Livelink Explorer,Authorlink, Autocad Integration etc was around there.In a nut shell these were the steps that one used to take.

  1. Install or copy lapi client files in your computer
  2. Write a program
  3. Compile it and run.

@RunTime the first call which everybody knew as Session creation was akin to Tel netting to the livelink server on Port 2099(default livelink server listening port). As time went by OT added a lot of calls at the LAPI server side so people built a lot of cool things.But there were problems in a way that as modern OOP languages came along they abhorred the idea that livelink was giving them Data structures(LLValue Objects) and making them work thru that.So OT did a small stint they loaded the LAPI libraries on top of a web server and called it Live Services but at that point one could write a web service call.I think it died like the OT’s foray into JavaObjects to replace or do side by side coding as in Oscript. I never understood what one would use JavaObjects for. Note I am not talking about the Oscript to Java Bridge which I have messed with and is very useful.

With the release of 9.7.1 they bundled livelink web services as part of the livelink install the idea bing a company would just use the existing IIS or Tomcat investment and start creating a plumbing conduit into livelink.At CS10 they stopped making a installer for LAPI. I am told that this is because  they do not have the development resources to make libraries in several different languages.

The new web services are strongly typed,you never need to guess what you ask livelink and what you get in return.But while that is easy for a programmer to say and do the majority of programmers are called /hired to do something against livelink has no clue how livelink works.So that is where beautifully written /working hand holding programs are needed.Also a programmer need to understand what he is trying to do which may be as simple as logging into livelink and observing the different things.Jason Smith,Scott Grasley,Kyle Swidrowich these are all great OT programmers who are putting such structure into the new web services paradigm.Whenever I find time and needs some challenging stuff I also do put up some samples but most of my time nowadays are in oscript.

Coming back to LAPI the server side remains and will there be for what I can see. If OT basically puts their foot down and remove the API on the server then your program will not work. But then gain it probably is so far around you have no cause for concern.Not having an installer should be less worrying as any old API edition will work in java or a .NET language.That is what I do.I have a new 64 bit computer.I just copy the dll’s from a 32 bit machine and work on a .Net 2.0 framework.I also lost touch of java somewhere along the way.I guess I will have to brush up because OT is going to get us all programming in Eclipse 🙂

So in conclusion it really is your preference on how to code and how well to save your investment

A LAPI call received in the heart of livelink in oscript.If the AccessEnterprise call one sample was not there your investment would suffer

apicall

Going by the same token a web services call received in livelink

webservicecall

As you can see when you program in a client application your call needs to come into livelink.In web services they use the web server to get into livelink code.

At this point you are able to create a lapi code page and call the web services code or a web services code piece and call lapi .Increasingly over time lapi server side will cease to be and no effort will go into its up keep.In older versions of web services they used the LAPI dispatcher to send in the web services command now I don’t think it has a dependency on that.

Chris Morley’s comment a little more computer trained person than me

https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=33077212&objAction=viewincontainer

Almost Diatribe from an angry user it is fun

Agents Agents Everywhere

Agents standing for Scheduled agents are the most commonly misunderstood things in livelink .I have senior livlink people, friends,who think that the Admin Service is responsible for running schedulers.In any case since I started early in version 8.1.5 there was a 3rd service called ‘Change Agents’. I digress but here’s what I wanted to write.

If you see in your opentext.ini a line called loader=sockserv;agents;notify     these are insructions to the LLserver to run those as “threads” in the LL System.For almost all livelink history agents and notify are run in separate threads.Notify runs in the notify thread for the list it controls and agents in its list.

Main tables involved are LLNOTIFY,LLEVENTQUEUE,AGENTSCHEDULE

See official OT Links

https://knowledge.opentext.com/go/15080520

The above link was published by OT when I as a junior admin(2003/2004 period) tried to debug the extreme load on our system my senior colleague John Simon and Mark Simm were on email and phone and both were very good on oscript.I slowly learned oscript to kind of become good at it.Right now very few companies split notifications and the current OT code has bugs which I have reported.But it will affect companies who are doing split notifications as nobody usually does it.

https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=3499001&objAction=ArticleView&viewType=1

I have a problematic agent.It is common knowledge or with a little bit of research one can figure out how agents are run.For the record here’s what it would take to make an agent id 0f 222378 I made that number up run in a LIVELINK server.

  1. Create module and write the agent code.Put 222378 as its id.Register the agent with the livelink tables either using SQL or a weblingo file.If everything goes well you can now run a query like this to find it select * from agentschedule where agentid=222378
  2. It is quite possible that in your opentext.ini it will put under this area something like this
  3. [scheduleactivity]
    1000=1
    222378=1 //this means run THIS agentid on THIS SERVER
  4. 222379=0 //this means run DO NOT RUN THIS agentid on THIS SERVER
  5. And this line should allow agent threads to run
  6. [loader] //this is the magic line for making a livelink server a agent/notify server
    #load=sockserv;javaserver;agents;notify;wfagent
    load=sockserv;javaserver;agents
    #load=sockserv;javaserver;agents;notify;notify_9001;notify_9201;notify_9999
    #load=sockserv;javaserver;agents;notify;notify_9001;notify_9999
    #load=sockserv;javaserver
    load_relagent=relagent //Notice there are so many ways to split agents
  7. In small livelink organizations the Admin server is used to run notifications,agents and wfagents that is the reason why everybody thinks admin service is responsible for something.It is not faintly connected to scheduling.Usually that is the only server that would have that line like this

load=sockserv;javaserver;agents;notify;wfagent                               most front end servers will say load=sockserv;javaserver;

This is needed because otherwise all the agents will start at the same time.You can avoid it by putting the agentid=0 in other servers.

Here’s what will happen at about 5 minutes since a livelinkserver is started not based on the computer clock,this agent thread starts up as agents101.out.The first thing it will do is run this oscript line $LLAgent.AgentController.New().Execute( .fPrgCtx, args.Agent_list, args.ExcludeAgent_list ) which means run one of those controller lines with this parameters.So to run it for debugging you can do something like

?func=agent.runagent&agent_list={‘222378’} so almost like saying hey livelink can you run the code in agentid 222378.

Here’s where I went wrong.say for e.g 222378 was not registered in the DB then this call translates to while I have very intention of running your agent I am not getting a hit for 222378 so the net effect is livelink will run all outstanding agents which you are trying not to do.Since agents are serial it will be sometime for the real interested agent to get that call.

To do manual running you usually do this

To test with builder…

DO NOT DO THIS IN A PRODUCTION SERVER THIS IS ONLY FOR DEVELOPERS WHO WANT TO RUN CODE

– In opentext.ini set/add the following:
[options]
RunWithoutLogin=TRUE

– In the browser type the following URL:
http://……./livelink.exe?func=agent.runagent
http://localhost/livelink/livelink.exe?func=agent.runagent&agent_list=’XXXX’

When this call hits livelink that thread finds out from the agentschedule table all agents who has the lastruntime in the past.Then it verifies who all are qualified (0 or 1 or no info is regarded as enabled agent ) to run then it prunes the excluded_agent_list and tries to run the agent_list

If one of those agents in the list do not come out clean as in a bug /exception/trace then it will error out and the nexttime is not updated.So it will start a vicious cycle that is when you see like why is my DirSvcs agent who is supposed to run once every day run every five minutes

This is a very common occurence of low agentid’s DirSvcs,OI etc who are in the 2000 range

To jQuery or Not to Jquery

(ODD results is SAP ,EVEN is CS)

Recently a poster facing problems with how xECM and Livelink manages content posed this question.He basically wants some results excluded when a search is performed.The correct implementation of this is by permissions.The poster wants to use appearances and cheap gimmicks like that .I also do not really know a lot of advanced html so when I hear people rave about jQuery and its infinite possibilities I am  usually thinking wow I could never understand those.Note any self respecting programmer will be able to trace the weblingo of my implementation to a file in the livelink directory  Here’s the question posed by the poster in KB RE How to restrict Function Menu in search result?

Now a fair amount of warning as advertisers put in Advertisements .Professional do not attempt this at a live livelink installation. You need to really use htmlmap, overrideutils or customizations_RT before attempting this.But here’s the  jist of what I am doing

For some context I am considering every odd row of my results to be coming from SAP and evens to be “showable with the function menu”. So if we look at the source of the document of the  searchresults in a 9.7.1 livelink I see this the ‘x5’ is the dead giveaway in this case.Since I mess with oScript all the time I can see that count going x1,x3,x5,x7 etc…..

<A HREF=”javascript:(0)” ONCLICK=”javascript:setSectionName(”);showFunctionMenu2(‘nextURL=%2Flivelink%2Fllisapi%2Edll%3Ffunc%3Dsrch%2ESearchCache%26cacheId%3D1125829432’, 5, event, ”, ‘?func=SearchResultsFunctionMenu&amp;hitID=5&amp;searchCacheID=1125829432&amp;version=0&amp;dataID=62740&amp;HH=false&amp;subtype=264’ );setSectionName(”);return false”><IMG SRC=”/img/actions.gif” ID=”x5″ BORDER=”0″ ALT=”Functions” ></A>

Now that we have done our research we need to see if we have JQuery in livelink. In short of time and doing this not for money and interest only in this I googled and downloaded

jquery-1.8.2.min.js and then I found this file called resultlist2.html. It is my livelink on a VM and I have a snapshot thing so I am doing in place editing(Tsk Tsk Do Not Ever Do It)

Now I put where OT has a js file .My oscript tells me that that is the webnode support directory

<SCRIPT TYPE=”text/javascript” SRC=”`webNodeImgPrefix`browsecorermenu.js” LANGUAGE=”javascript”></SCRIPT>
<SCRIPT TYPE=”text/javascript” SRC=”`webNodeImgPrefix`jquery-1.8.2.min.js” LANGUAGE=”javascript”></SCRIPT>

Now to see if everything works we need some tests

so from the web lots of excellent samples I put these together

<script>
$(document).ready(function(){
$(“p”).click(function(){
$(this).hide();
});
});
</script>

<script>
$(document).ready(function(){
$(“TR”).click(function()
{
$(“#x1”).hide();
$(“#x3”).hide();
$(“#x5”).hide();
$(“#x7”).hide();
}

);
});
</script>

<script>
$(document).ready(function(){
$(“a”).click(function(){
$(this).hide();
});
});
</script>

This is like a recipe in a cookery show.I must have spent close to 3 hrs twiddling with what I am doing.Note I would have been able to do this in oscript much faster but that was not my intention.I wanted to learn Jquery so that is why this looks weird if there are a some oscripters going  “that appu he is really going down the edge….”

Now when I restart my livelink and conduct a search all my ODD results don’t have any function menu.Here’s when the page loads first

Full Results

Now when I click that is I have a event that says when the <TR> area is clicked that is when my event fires

What remains maybe do it for real when it is called for remove the hard code and put a real counter,maybe make it work without the <TR> click event….

I am sure the poster gets some kind of header variable like MYSAPSSO2 in livelink so some keying off that and implementing the business rules could be thought off

This is great Long Live JQuery….

Kaamuki

Love all,

Taking a sick day from work as project is really getting onto my nerves and have to blame the economy because won’t find anything better.Had a big fight with email and phone with my site manager so found myself doing nothing and all gloomy.But alas all is not lost.I had brought all our old 78/33/45 records from India so what better to do than to listen to them and record them.Already broke a turntable trying to get audio out of it( I have not lost it despite the years,the stupid makers did not provide audio out on it so I thought I could tap into the speakers,the rest is history).Bought a new one from amazon that plugs in to your USB. The recording software albeit has noise corrections but when I applied it the whole song was gone.The software thinks Yesudas is Noise!!!!

I have put the raw recordings Jeevanil & Vaadikozhingu as links here.enjoy.if I get lucky may well clean up the noise a swell.

Dave Kinchlea(A veteran at OpenText in a lighter vain)

Thursday November 23, 2006 
 
From the mouths of babes

Posted by kinch on 11/23/2006 02:33 PM  
 (2 ratings ) 
I used to think these weren’t real, until I had kids of my own…

The following excerpts are actual answers given on history tests and in
Sunday school quizzes by children between fifth and 6th grade ages. They
were collected over a period of three years by two teachers. Read
carefully for grammar, misplaced modifiers, misinformation and, of
course, spelling!
Ancient Egypt was old. It was inhabited by gypsies and mummies who all
wrote in hydraulics. They lived in the Sarah Dessert. The climate of the Sarah is
such that all the inhabitants have to live elsewhere.
Moses led the Hebrew slaves to the Red Sea where they made unleavened
bread, which is bread made without any ingredients. Moses went up on
Mount Cyanide to get the ten commandos. He died before he ever reached
Canada but the commandos made it.
Solomon had three hundred wives and seven hundred porcupines. He was an
actual hysterical figure as well as being in the bible. It sounds like he was
sort of busy too.
The Greeks were a highly sculptured people, and without them we wouldn’t
have history. The Greeks also had myths. A myth is a young female moth.
Socrates was a famous old Greek teacher who went around giving people
advice. They killed him. He later died from an overdose of wedlock which
is apparently poisonous. After his death, his career suffered a dramatic
decline.
In the first Olympic games, Greeks ran races, jumped, hurled biscuits,
and threw the java. The games were messier then than they show on TV
now.
Julius Caesar extinguished himself on the battlefields of Gaul. The Ides
of March murdered him because they thought he was going to be made king.   Dying,
he gasped out: “Same to you, Brutus.”
Joan of Arc was burnt to a steak and was canonized by Bernard Shaw for
reasons I don’t really understand. The English and French still have
problems.
Queen Elizabeth was the “Virgin Queen.” As a queen she was a success.
When she exposed herself before her troops they all shouted “hurrah!” and that
was the end of the fighting for a long while.
It was an age of great inventions and discoveries. Gutenberg invented
removable type and the Bible. Another important invention was the
circulation of blood.
Sir Walter Raleigh is a historical figure because he invented cigarettes
and started smoking.
Sir Francis Drake circumcised the world with a 100 foot clipper which
was very dangerous to all his men.
The greatest writer of the Renaissance was William Shakespeare. He was
born in the year 1564, supposedly on his birthday. He never made much
money and is famous only because of his plays. He wrote tragedies,
comedies, and hysterectomies, all in Islamic pentameter.
Romeo and Juliet are an example of a heroic couple. They lived in Italy.
Romeo’s last wish was to be laid by Juliet but her father was having
none of that that I’m sure. You know how Italian fathers are.

Writing at the same time as Shakespeare was Miguel Ervantes. He wrote
DonkeyHote.
The next great author was John Milton. Milton wrote Paradise Lost. Since
then no one ever found it.
Delegates from the original 13 states formed the Contented Congress.
Thomas Jefferson, a Virgin, and Benjamin Franklin were two singers of
the Declaration of Independence.

Franklin discovered electricity by rubbing two cats backward and also
declared, “A horse divided against itself cannot stand.” He was a
naturalist for sure. Franklin died in 1790 and is still dead.
Abraham Lincoln became America’s greatest Precedent. Lincoln’s mother
died in infancy, and he was born in a log cabin which he built with his
own hands. Abraham Lincoln freed the slaves by signing the Emasculation
Proclamation.
On the night of April 14, 1865, Lincoln went to the theatre and got shot
in his seat by one of the actors in a moving picture show. They believe
the assinator was John Wilkes Booth, a supposingly insane actor. This
ruined Booth’s career.
Johann Bach wrote a great many musical compositions and had a large
number of children. In between he practiced on an old spinster which he
kept up in his attic. Bach died from 1750 to the present. Bach was the
most famous composer in the world and so was Handel. Handel was half
German, half Italian, and half English. He was very large.
Beethoven wrote music even though he was deaf. He was so deaf that he
wrote loud music and became the father of rock and roll. He took long
walks in the forest even when everyone was calling for him. Beethoven
expired in 1827 and later died for this.
The nineteenth century was a time of a great many thoughts and
inventions. People stopped reproducing by hand and started reproducing
by machine. The invention of the steamboat caused a network of rivers to
spring up.
Louis Pasteur discovered a cure for rabbits but I don’t know why.
Charles Darwin was a naturalist. He wrote the Organ of the Species. It
was very long, people got upset about it and had trials to see if it was
really  true. He sort of said God’s days were not just 24 hours but
without watches  who knew anyhow? I don’t get it.
Madman Curie discovered radio. She was the first woman to do what she
did. Other women have become scientists since her but they didn’t get to
find radios because they were already taken.
Karl Marx was one of the Marx Brothers. The other three were in the
movies.  Karl made speeches and started revolutions. Someone in the
family had to have a job, I guess.

About me