This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Indexing a web service rest with IDOL

Hi,

 

I am a beginner with IDOL.

I need to index a service rest (json) with IDOL v11. what is the best connetor to use. I tried with the httpConnector, but I can not get the json in the IDOL document. have an example of config to index from json ?

thanks.

regards.

chris

  • 0

    Hello ChrisSG,

    Thanks for contacting Micro Focus SW community,

    Could you please confirm the following:

    1. Are you trying to index a .json file?
    2. Is the file in your local system or network location (Like share folder or Internet)?

    Regards.

  • 0

    Hello ChrisSG,

    I would like to know if you had a chance to check my last reply?

    Please remember that a if the files is located in a network place or in the physical location you can use the FilesSystem Connector.

    I mean, if the files are on "\\ServerName\ArchiveDocuments\testFile.json" or "C:\ArchiveDocuments\testFile.json" the FileSystem Connector is a good idea. However, if the files is on a web page you can use WebConnector or HTTPConnector.

    Please let me know if you have any other question or if you need any further assistance.
     
    Kindly regards.
  • 0 in reply to 

    Hello Tomasenc,

    Thank you for your answer. My JSON file is available through an HTTP request. My file consists of a list of IDs/names that I would like to index by creating a DREREFERENCE by ID.

    Here's a part of my JSON :

    [{"id":285,"actif":1,"critique":0,"device":"desktop","informationMessage":null,"marche":"particuliers professionnels entreprises","name":"Archivage","recherche":"archives clients comptabilitĂ©","shortname":"Archivage","trigramme":"ARC","typeAppli":"Psystem","url":null,"utilisateur":"agence  fonctionnel","categories":[{"id":2,"name":"donnĂ©es clients"}]},{"id":286,"actif":1,"critique":0,"device":"desktop","informationMessage":null,"marche":"particuliers professionnels entreprises","name":"ArrĂŞtĂ©s de compte","recherche":"arrĂŞtĂ©s  agios  intĂ©rĂŞts  ","shortname":"ArrĂŞtĂ©s de compte","trigramme":"ARR","typeAppli":"Psystem","url":null,"utilisateur":"agence  fonctionnel","categories":[{"id":2,"name":"donnĂ©es clients"}]}]

    I would want 2 documents :

    DREREFERENCE="id=285" DRETITLE=Archivavge DEVICE=desktop ....

    DREREFERENCE="id=286" DRETITLE=arrêté de compte DEVICE=desktop ....

    Is that possible? How to do it?

    thanks

    best regards

    Christophe.

     

     

  • Verified Answer

    0 in reply to 

    Hello ChrisSG,

    I belive that you can use WebConnector or HttpConnector due to the request is via http request.

    Then, to split the json files on different documents, you need to set the CFS with TextToDocs or a lua scritp in order to, specify how to handle that files.

    If you require further assistance, please feel free to open a ticket on the software support portal.

    Kindly regards.

  • 0 in reply to 

    The HTTP Connector and Web Connector may work for simple REST APIs where the parameters are static, but both are built for spidering web sites and following URLs. They don't really have the capability for the developer to modify parameter values in order to iterate through a result set from a web service.

    Your best bet is the Social Media Feed Connector. The Social media feed connector works by calling the various web service APIs of sites like Facebook, Twitter, and the like, but it's really the connector itself is really a framework where a developer can call any REST API that returns XML or JSON.

    The limitation to the Social Media Feed Connector is if the web service is protected in some way by OAuth or other form of authentication. The out of the box authorization dlls are designed specifically for the various social media sites, so they won't work when re-used for a custom web service. In that case, you might need to create a proxy service or you will have to look at the Java Connector libraries.