Java Samples for Content Webservices

 
I LOST ALL CONTENT WHICH WAS STORED IN COMMUNITIES.OPENTEXT.COM.IF YOU ARE A STARTER READING THIS AND WOULD LIKE TO SEE THE ORIGINAL CONTENT DEPENDING ON TIME I HAVE I CAN SEND YOU SNIPPETS.LEAVE A COMMENT TO SUCH EFFECT.

Java Samples for Content Webservices are few and far in between.OT mainly puts samples in C# and many  a times I myself wonder if my company did not allow me to do that how I would do that in Java.In all truth OT ships a massive application called TreeView.java and TreeView.s ln for both languages .But the java thing takes a lot of setup especially if one was not keeping active in that world.However I used the NetBeansIDE to actually do most of that so I use that debugging environment to try all my java stuff Recently I debugged how to run a Live Report in livelink via C# webservices.Then somebody wanted me to show them how to do it via Java.One of these days I want to return to seeing if I can do all this command line with nothing else other than notepad.

Well I created two word documents, my guess is the poster did not speak english  very well,did not know livelink nor did know java to start with  .Hence I dumbed it enough for people to follow in almost any criteria.

 

Having livelink and its builder helps me in my endeavours and so Oscript remains my first love although I am getting farther and farther from it all

 

I have these files in the Communities website

If I had a LR taking a string parameter  how to write that in Java(C# is available aplenty)

If I had a LR taking a integer parameter how to write that in Java(C#is available aplenty)

There is a bug with Live Report Extensions.A poster in KB said that OT is aware of it.

Why Having LR Extensions(something that Webreports) company produces breaks Livereport calling with Webservices of OT

 

 

OH MY SAP

Between 2009-2012 I was instrumental in architecting a very large RMlink implementation.I was mainly hired for setting up livelink.livelink RM,archive server.My peripheral duties included acting as SME to the RM link implementation.Further the customer decided they would make use of two OT products one livelink and the other Artesia(DAM) both  would sit in the SAP netweaver and be visible based on the employees roles.I know nothing about all that.Slowly but surly I began to understand that livelink a.k.a Content Server is going to be the brains and Archive Server was going to be the brawn in this implementation.The RCS tomcat stack at best could be described a nuisance or so I thought because once it started misbehaving there was nothing you could do other than uninstall.On top of it we were forced to work on a AIX(Unix) archive server implementation.We had specific archive server things that we had to maintian for that to work and with every patch RCS it overwrote everything we had configured.I figured out that RCS was basically using servlet/java code to call livelink that is pretty much it.It would be called “Enterprise library”,ELItem,ELVariant what not but the real fact remains that it is in dtree with a subtype that is known to most livelink people.At a pre -go live meeting a bombshell appeared in the form of a SAP consultant(big manager kind of guy)  who said how are you going to handle the authentication ticket from SAP for livelink & Artesia? Upto that time we had created a IWA implementation of livelink replete with LDAP(AD) SSO and we thought that would be it ,the SAP netweaver user and the livelink user is using the same AD and hence would basically be in the same env not challenged by AD.No the manager insisted that livelink and artesia need to work based on the ticket given to you from SAP.It looked like either the manager knew what he was talking about or he just wanted to show off stuff.Everybody started looking at me and I really had nowhere else to look.Luckily a very experienced  person came to the rescue and said to me that SAP produces mechanisms for all commercial webservers including IIS & Java stacks.  

Now we started in earnest burning the midnight oil and I had a very great apprentice  at that time.I would say he is very good

He started getting the IIS web server loaded with the SAP filter it is like the llisapi.dll that we use in livelink and when it works it needs a certificate form the sap instance that is going to decrypt the cookie.Then we tried writing it to REMOTE_USER which it wrote as http_remote_user.I think REMOTE_USER is a variable that you cannot rewrite.In any case we change the livelink to look for that environment variable voila we had SSO based on MYSAPSSO2 in place.Phew.Firefox plugins,Fiddler,Wireshark and a general understanding of what goes and comes where is what on would need to crack things of this nature.BTW I saved all my work in a drive which I have since lost so some of this is from memory.My knowledge of how livelink handles authentication really helped in making this solution.thanks you builder for that.

I later customized the livelink look and feel and removed most unwanted stuff so the real estate was there for people to work

For artesia we had to take the java class file and retrofit the login again this java file would not work in a regular package declaration like one would do.It was not common knowledge and I basically resorted to Reflections code and got it to work.I got in touch with a SAP SDN member who actually said I should use a particular package that SAP produces or not use a package declaration at all.So go figure.Nothing that SAP gives you in documentation says that.So go figure .You could say OT & SAP are birds of the same feather when it comes to hand holding examples.

In the current setting the OTDS conundrum that you load in RCS will handle the SAP logon ticket.I have not yet had the need to make OTDS work in my job so I hope it is easy and past the buggy stage that I have known to associate RCS with .Our OT ECMLink/RM link people always thought livelink impersonation was SSO which again I fought with them telling no they are actually different.In any case the customer did not do ECMlink when I was there other than trial runs.I am sure the java code stack is much better nowadays.

I hope reading this will help somebody in my same shoes

To Err is Java,to Forgive Oscript

The first time I learned that a piece of java code could be called from Oscript was in 2005.This was closely after the debacle of the Java Modules development that OT wanted people to follow.Not sure what the programming paradigm was but to me it looked like you would do Java coding and oscript coding simultaneouslytto get something done.In any case it died a natural death and we are not discussing here.The Home RH which is remnant is what people would remember of that.

We are discussing Oscript to Java Bridge which is a great help to you if you wanted to do something.That somethings could be

  1. Call a web Service form oscript bypassing the socket stuff
  2. Whatever you could get java to do and get it to use in livelink

Now Hans stoop of OT Germany was the first person to tell the developer world this and people started on that in earnest.I was a natural taker and I basically took Rolf Poser’s approach which     was a oscript module that spit out some java strings.Naturally to learn I created a Request Handler and put it for general consumption 

Notice I have given all credits where it is due as these good programmers have kept the OT programming environment proactively upward without which it would be a very sorry affair.Now for newer developers if there is no time to research anything then you have only you to blame.For one thing I think if you do not understand class paths and if you cannot understand how java code works and thought Eclipse and Netbeans were there from day one,I reserve my comments.I still like to use a notepad to write java code and compile them.Enough of digression here is the quick things you need to do.

  1. Always True Statement #1-Builder IDE does not load the JVM by default.You have to “tweak” the builder shortcut.It is basically written in the builder documentation as well as in several other published examples
  2. Always True Statement #2-Livelink is going to use the JRE, again JRE that ships with the livelink application so make sure your code is compiled on that  JVM. See JVM’s in 9.7.1 and 10 in my screen caps.
  3. Always True Statement #3-The class loader of service and builder is different,which brings me to my acronym OMH(Over My Head) see these threads where java people talk about it.I always make sure I can see ‘Hello World’  in my builder output.The ‘HelloWorld’ e.g settles the environment problems and then we can think of Relections et al.

Link to a word document with screen caps and some important links

As time permits I will see if I can put up an example for doing something with Java on CS10

BTW Java is a great language but do understand that the world was not built by Java although increasingly OT is moving things that really don’t belong in livelink to java based offerings. A java coup d’état    ? We  have seen OTDS and then Oclipse…. H’mm sounds fishy to me.