![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
The LinkedInPeopleSearch project describes how to use TIBCO ActiveMatrix BusinessWorksTM Plug-in for REST and JSON to invoke the LinkedIn server and receive responses from the Service Provider.This project contains the REST People Search process. This process invokes the LinkedIn server to find all the people whose name is John Bender. Figure 16 shows the REST People Search process definition.Figure 16 The REST People Search Process
1. The Find_People_ID activity invokes the LinkedIn server with a given WADL file to find all the people whose name contains John Bender and then receives response data in JSON format from the LinkedIn server. The response data lists the name and ID of each person whose name contains John Bender.The given WADL file, linkedin-wadl.xml, is located in the RESTJSON_HOME\examples\LinkedInPeopleSearch\apigee-wadl-library\linkedin directory.
2. The Parse JSON activity converts JSON data to XML data with an XML schema file and passes the XML data to the Log_Each_Person group.The XML schema file, schema.xsd, is located in the RESTJSON_HOME\examples\LinkedInPeopleSearch\JSONSchema directory.
3.
a. The More_Info activity invokes the LinkedIn RESTful web services with the ID of a person whose name contains John Bender, and receives the response data in XML format from the LinkedIn server and then passes the data to the Log Search Result activity. The response data lists more information about the person, John Bender . For example, the information about headline of John Bender.
b. The Log Search Result activity logs the received data in a specified file.
2. Click Open Existing Project in the TIBCO Designer startup panel. The Open Project dialog is displayed.
3. Click Browse next to the Project Directory field and then select the LinkedInPeopleSearch folder, which is located in the RESTJSON_HOME\examples\LinkedInPeopleSearch directory. Click OK. The project is displayed.
a. Click the Global Variables tab in the Project panel.
b. Click the LinkedIn_OAuth item and then click Open Advanced Editorat the top of the left corner in this panel. The Global Variables dialog is displayed.
c. Set values for the Access_Token, Consumer_Key, Consumer_Secret, and Token_Secret parameters under the LinkedIn_OAuth item. These values are provided by the Service Provider. In this example, you should register your application with LinkedIn to receive an API key. For more information, see https://developer.linkedin.com/documents/quick-start-guide.
d. Click OK to save your setting.
a. Click the Global Variables tab in the Project panel.
b. Click the LogFile item and then click Open Advanced Editorat the top of the left corner in this panel. The Global Variables dialog is displayed.
c. Expand the LogFile item and then set the value of the Path parameter to a directory and a file name, which you want to save the generated log file in. For example, C:\temp\Linkin.txt.
d. Click OK to save your setting.
6. Select Project > Save from the TIBCO Designer menu to save the project.After setting up the project, complete the following steps to trigger the REST People Search process:
1. In the Project panel, click the Tester tab and then click Start testing viewed processat the upper left corner in this panel. The Select Processes To Load dialog is displayed.
2. Select the REST People Search (current) check box and then click Load Selected. The process is started.
3.
See TIBCO ActiveMatrix BusinessWorksTM Process Design Guide for detailed information on using the test mode, including setting breakpoints and the element colors in the test mode.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |