3 Replies Latest reply on Aug 21, 2012 2:18 PM by Roger Ford-Oracle

    Consuming data from an external web service

      We want to integrate another program's search engine (PLM for the matter),
      and in order to do that we want to know what are the options for consuming data from an external web service, as we have "wrapped" this search engine in a web service and we want to consume the data found from this web service (the SES will only be the display of the results passed by the web service )
      Or alternativley if there is another known method to do that..

        • 1. Re: Consuming data from an external web service
          Roger Ford-Oracle
          Have a look at the "Suggested Content" feature.
          • 2. Re: Consuming data from an external web service
            I am familiar with this feature,
            and it is unclear how exactly to configure a web service source- how to connect the SES to a web service for a "send request and recieve response" interaction.

            more details will be much appreciated.

            Thanks again,
            • 3. Re: Consuming data from an external web service
              Roger Ford-Oracle
              In the SES admin interface under Suggested Content, you need to provide:
              1/ Provider name (your choice)
              2/ Query pattern - for example :
              weather (.*)
              would send any words following the term "weather" to the suggested content provider
              3/ Provider URL: A URL for the web service, where certain values can be replaced by SES variables. For example:
              Calls the Yahoo web service API with the searchterms ($ora:q) as the "query" parameter
              4/ An XSLT style sheet which processes the output from the web service in the format you want it displayed.
              Unfortunately the Yahoo search web service has been shut down, but this is the XSLT I used to use with it:
              Provider Name: Yahoo!
              Query Pattern: (.*)
              Provider URL: http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=XXX&query=$ora:q&results=3
              <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                <xsl:variable name="imageURL">http://us.i1.yimg.com/us.yimg.com/i/us/my/bn/ylinksy_l.gif</xsl:variable>
                <xsl:variable name="baseSearchURL">http://search.yahoo.com/search</xsl:variable>
                <xsl:variable name="queryParam">p</xsl:variable>
                <xsl:preserve-space elements="*"/>
                <xsl:output method="html" omit-xml-declaration="yes" encoding="UTF-8"/>
                <xsl:template match="/yahoo:ResultSet">
                  <xsl:if test="number(@totalResultsReturned) &gt; 0">
                    <table width="100%" style="background-color:white;">
                          <td width="150" align="center">
                              <xsl:attribute name="href">
                                <xsl:value-of select="concat('http://search.yahoo.com/search?p=',substring-before(substring-after(@moreSearch,'='),'&amp;'))"/>
                                <img border="0" src="{$imageURL}"/>
                            <xsl:for-each select="yahoo:Result">
                                  <font size="-1">
                                      <xsl:attribute name="href">
                                        <xsl:value-of select="yahoo:Url"/>
                                      <xsl:value-of select="yahoo:Title"
                                  <font color="#008000" size="-1">
                                    <xsl:text> - </xsl:text>
                                    <xsl:value-of select="yahoo:DisplayUrl"/>