Getting Started
Requirements
Setup
Authentication
About This Demo
File Descriptions
Demo Components
REST Protocol
Using XSLT
In order to run this demo application, you will need an EIT-enabled profile. If you do not have one, please contact your EBSCO account manager, who will create one for you. You will also need a server environment to run this application on. Details of the requirements are below.
To run the PHP applications, copy the "portal_demo" folder onto
your web server environment. If running on localhost, and the
folder was placed into the root Internet-accessible folder, it
should be available on:
http://localhost/portal_demo/
In order to access the EBSCOhost Web Services, you must have an EIT enabled profile. If you have an EIT-enabled profile, you may enter your details in the 'profile.php' source code, which is found in the "portal_demo" folder. You will also need to provide a default database for the search service to operate on.
Your EIT profile should be in the format:"custid.groupid.profid"
Where custid is your Customer ID, groupid is your Group ID, and
profid is the EIT profile.
If your profile is "company.group.profile", your password
is "helloworld", and you'd like to use the "Academic Search
Complete" database, your "profile.php" file should look as follows:
$profile = "company.group.profile"; $password = "helloworld"; $database = "a9h";
To view databases available to your profile, use the Search Service Info Method.
This demo application shows different ways to integrate EBSCOhost's
services into your corporate portal. This example uses the REST protocol
to retrieve XML information from EBSCOhost. This information is then
rendered into HTML using XSL stylesheets.
The highlights of this demo are EBSCOhost's Web Service, RSS, and Persistent
Link functions.
The web service is integrated into the portal via the search interface. This feature can be used by typing a search into the search box under "Search Business Source Complete", and clicking the search button. The search interface on this demo will query EBSCOhost's web service, and return the results in the portal using XSLT. This demo gives a few examples of what can be done with the search data; A "Narrow By Subject" area has been implemented. This feature tallies the subjects from the closest 50 results, and displays the most common subjects of the search results. |
![]() |
The RSS feed on the index page is displayed using an iframe. The RSS feed in this example displays results for a search on sustainability. An RSS feed can be setup for any search, and displays the latest results for that particular search. |
![]() |
The Persistent Links on the index page show practical uses of the persistent link feature. The search box will forward the users query to the EBSCOhost interface, and the links directly below it are hard-coded to company profiles in the EBSCOhost database. |
![]() |
This application makes use of the REST protocol. It requests XML data
from EBSCOhost's Web Service API. This XML data is then rendered into HTML using
XSLT.
The call to the web service is done using HTTP get. This is an example call
and response:
http://eit.ebscohost.com/Services/SearchService.asmx/Info?prof=custid.groupid.profile&pwd=passwordReturn:
<?xml version="1.0"?> <info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <dbInfo xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/"> <db shortName="f5h" longName="MasterFILE Premier"> <sortOptions> <sort name="Date Descending" id="date" /> <sort name="Date Ascending" id="date2" /> </sortOptions> <dbTags> <dbTag name="TX" description="All Text" /> <dbTag name="AU" description="Author" /> <dbTag name="TI" description="Title" /> <dbTag name="AN" description="Accession Number" /> </dbTags> <dbIndices> <dbIndex name="ZA" description="Author" /> <dbIndex name="ZT" description="Document Type" /> <dbIndex name="ZD" description="Entry Date" /> </dbIndices> <authorityInfo> <db xsi:type="DatabaseWithAuth" shortName="f5hjnh" longName="MasterFILE Premier -- Publications"> <sortOptions /> <dbTags> <dbTag name="SU" description="By Title Subject & Description" /> <dbTag name="OC" description="Country of Origin" /> </dbTags> <dbIndices> <dbIndex name="ZO" description="Company" /> <dbIndex name="ZY" description="Country" /> </dbIndices> <dbFormats> <dbFormat name="list" description="list" /> <dbFormat name="detailed" description="detailed" /> </dbFormats> </db> </authorityInfo> </db> </dbInfo> </info>
Note: the database information above has been shortened and is not valid.
The 'Info' method was requested, and an XML document was returned. This document
contains information about the databases that belong to a profile.
Search:
Call:
http://eit.ebscohost.com/Services/SearchService.asmx/Search?prof=custid.groupid.profile&pwd=password&db=database_name&query=formatted_queryReturn:
<?xml version='1.0' encoding='UTF-8'?> <?xml-stylesheet type='text/xsl' href='search.xsl'?> <searchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Hits xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/">93848</Hits> <Statistics xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/"> <Statistic> <Database>a9h</Database> <Hits>49571</Hits> </Statistic> </Statistics> ... <SearchResults xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/"> <records xmlns=""> <rec recordID="1"> <pdfLink /> <plink>http://search.ebscohost.com/login.aspx?direct=true&db=bth&AN=65566785&site=ehost-live</plink> <header shortDbName="bth" uiTerm="65566785" longDbName="Business Source Complete" uiTag="AN"> <controlInfo> <bkinfo /> <jinfo> <jid type="mid">2EL3</jid> <jtl>Sports Marketing</jtl> <maglogo>N</maglogo> </jinfo> <pubinfo> <dt year="2012" month="03" day="01">2012</dt> <pub>Richard K. Miller & Associates</pub> </pubinfo> <confinfo /> <artinfo> <ui>65566785</ui> <ppf>304</ppf> <ppct>48</ppct> <formats> <fmt type="P" size="513KB" /> </formats> <tig> <atl>CHAPTER 43: COLLEGE ATHLETIC PROGRAMS.</atl> </tig> <aug> <au>Miller, Richard K.</au> <au>Washington, Kelli</au> </aug> <sug /> <src>R</src> <pubtype>Market Research Report</pubtype> <doctype>Article</doctype> <ab> </ab> </artinfo> <language code="eng">English</language> <refInfo /> <copyright flag="Y"> <custom>Copyright of Sports Marketing is the property of Richard K. Miller & Associates and its content may not be copied or emailed to multiple sites or posted to a listserv without the copyright holder's express written permission. However, users may print, download, or email articles for individual use.</custom> <item>Sports Marketing</item> <holder>Richard K. Miller & Associates</holder> <dt year="2012" /> </copyright> <holdings islocal="N" /> </controlInfo> </header> </rec> ... </records> </SearchResults> </searchResponse>
Note: the search information above has been shortened and is not valid.
The 'Search' method was requested, and an XML document was returned. This document
contains search results on the database that belong to a profile.
GetClusters:
Call:
http://eit.ebscohost.com/Services/SearchService.asmx/GetClusters?prof=custid.groupid.profile&pwd=password&db=database_name&query=formatted_queryReturn:
<?xml version='1.0' encoding='UTF-8'?> <?xml-stylesheet type='text/xsl' href='search.xsl'?> <clusterResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ClusterCategory ID="SubjectThesaurus" Tag="ZE" xmlns="http://epnet.com/webservices/SearchService/Response/2007/07/"> <Cluster>TELEVISION programs</Cluster> <Cluster>HEATING & ventilation industry</Cluster> <Cluster>FICTION</Cluster> <Cluster>BEST sellers</Cluster> <Cluster>LETTERS to the editor</Cluster> <Cluster>REALITY television programs</Cluster> <Cluster>DOCUMENTARY films</Cluster> <Cluster>BOOKS -- Reviews</Cluster> <Cluster>HEALTH care reform</Cluster> <Cluster>BRANCHES (Business enterprises)</Cluster> </ClusterCategory> </clusterResponse>
Note: the cluster information above has been shortened and is not valid.
The 'Cluster' method was requested, and an XML document was returned. This document
contains information about the clusters of the specified search/database that belong to a profile.
To view the other methods available on the EBSCOhost Web Service API, visit the Search Service
service description page.
XSLT is a W3C standard. XSLT stands for eXtensible Stylesheet Language Transformations. XSLT allows you to use XSL stylesheets to present XML data in a user-friendly format. The search results returned by the EBSCOhost Web Service can be transformed into HTML using XSLT. In order to use a stylesheet, the XML header must be modified as follows:
From:<?xml version="1.0"?>To:
<?xml version='1.0' encoding='UTF-8'?> <?xml-stylesheet type='text/xsl' href='search.xsl'?>
This can be achieved in almost any programming language by using string functions. An example of this in PHP is below. It uses PHP's str_replace() function. The string in the first parameter is replaced with the string in the second parameter.
$xml = str_replace( '<?xml version="1.0"?>', '<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type='text/xsl' href='search.xsl'?>', $xml );