Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sample JAVA for using REST Search API in Livelink

Status
Not open for further replies.

RajaneeshJM

Programmer
Apr 22, 2014
27
IN
Hi,

I am trying to use the RESTful Search API in livelink in a Java program. It would be very grateful if any one provided me with a Sample Java program for authenticating and performing a Search to find a document called Test.docx

Regards
Rajaneesh JM
 
See this thread

the code in that posts to a livelink URL livelink will do the authentication so if you have SSO for web browsers in your org that will take care of it.
or you will get a userid/password form

I have done very inelegant ways of doing this very poor insecure approaches as well



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thanks appnair. I have tried the HTML page which you suggested by including 2 text fields to enter the Username and Password as well. After providing the search criteria along with user credentials on Submit, I encounter the below message

Your request originated from a website that Content Server identified as potentially unsafe.
Please contact the Administrator.

You may Log-out and try your request again.

Looks like, there is some setting which stops Search from this HTML page. I have gone thru the Settings but couldn't identify the appropriate one.

Also, apart from the HTML approach, is it possible to use the RESTful Search API by writing a JAVA program. It would be great if you could guide me in this approach.

Thanks and Regards
Rajaneesh JM
 
the request originated error is because on the configure security parameters page there is a setting .If it does not have the entry http that would throw the error.
As far as guiding you in java here is something you may want to consider.
OT is deprecating the search service as in their true webservices things which you could have written in C# or Java that would have taken you into a more superior method than the get login request.OT is positioning the AppWorks gateway as the gatekeeper for all rest based code which means that you authenticate to the gateway you have a credential into livelink in a cookie.With that cookie you are able to marshal more calls into livelink one of them would happen to be the search api that you just tried.
Otherwise in jax or java in the simplest auth methods you would get a cookie and painfully you will try to use the cookie in a browser in your code as many people have shown.Google for how to use a cookie.In my blog I have updated a senior OT person's way of doing that .It might be worthwhile pursuing that approach as well.For all practical purposes livelink's search is an api even to livelink(they sell this search technology to other companies without livelink as well) so you will have to obey its syntax and semantics.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Hi,

I have added documents in livelink, also added versions for the existing documents, and am trying the get the documents using the search service but the documents are not retrieving.

I tried Configuring Search index Verification. Setting it on all days for each Hour. Still No result.

Please provide inputs

Regards,
Vikas
 
Configuring and making sure search runs trouble free is a system admin chore the people in the forum cannot always say this is the right reason for search not working when I configure search I know pretty much how it works how to gather logs how to set log levels etc many times search and indexing is very easy to acheive but many people overlook it because they do not want to spend any time resources on the proper upkeep of the system .Your best bets are complete re start of the box holding the admin server, re synchronization of the system, monitoring dtreenotify etc many times those may work or open a debug ticket with OT if you have never done any livelink sysadmin work before I would say that you can seriously screw yourself into a hole so seek OT's help

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thanks appnair.

I have few queries . please help me out.

1.How to differntiate Folder and Document shortcuts using Search service.
2.Getting the folder/Document path using search service.

Regards,
Vikas
 
For aliases/shortcuts look at the search regions page and see if OTOriginDataid may not be correct if that is indexed you have the original dataid once you have that it is just a matter of getting a node handle to see what node it is Search is actually a read only operation like running a db query you have to use that in conjunction with CWS for object manipulation at least that is what I think

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top