Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VOSIndex / VirtuosoFacetsWebService / VirtuosoFacetsWebServiceSOAPExample

Example using SOAP

This example shows execution of the same command as in the example for REST interface and here it uses SOAP:

Request message:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <query xmlns="http://openlinksw.com/services/facets/1.0/" inference="" same-as="">
      <text>Seattle Mariners traveled all the way to Japan to watch</text>
      <view type="text" limit="20" offset="0"/>
    </query>
  </SOAP:Body>
</SOAP:Envelope>

Response message:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <fct:facets xmlns:fct="http://openlinksw.com/services/facets/1.0/">
      <fct:sparql>
         SELECT DISTINCT  ?s1 AS ?c1,
                          ( bif:search_excerpt 
                            ( bif:vector
                              ( 'THE',
                                'MARINERS',
                                'WAY',
                                'SEATTLE',
                                'WATCH',
                                'ALL',
                                'TO',
                                'JAPAN',
                                'TRAVELED'
                              ), ?o1)) AS ?c2  
           WHERE { ?s1 ?s1textp ?o1 .
                   filter ( bif:contains 
                            ( ?o1, 
                              '(THE AND MARINERS AND WAY AND SEATTLE AND WATCH AND ALL AND TO AND JAPAN AND TRAVELED)'
                            )
                          ) 
                 } 
           LIMIT   20
           OFFSET  0
      </fct:sparql>
      <fct:time>114</fct:time>
      <fct:complete>yes</fct:complete>
      <fct:db-activity>   134R rnd  9.488KR seq      0P disk  8.966MB /    602 messages</fct:db-activity>
      <fct:result>
        <fct:row>
          <fct:column datatype="url" shortform="http://bobdupuy.mlbl...ld_baseball__6.html"><![CDATA[http://bobdupuy.mlblogs.com/bobdupuy/2006/03/world_baseball__6.html]]></fct:column>
          <fct:column/>
          <fct:column><![CDATA[<span class="srch_xerpt">... While Chuck Armstrong president of <b>the</b> <b>Seattle</b> <b>Mariners</b> <b>traveled</b> <b>all</b> <b>the</b> <b>way</b> <b>to</b> <b>Japan</b> <b>to</b> <b>watch</b> Ichiro... for <b>the</b> advancing <b>Japan</b> team last week <b>the</b> star from <b>the</b> <b>Seattle</b> roster so far in Round 1 has without a doubt... leading <b>the</b> Dominican <b>to</b> its...</span>]]></fct:column>
        </fct:row>
        <fct:row>
          <fct:column datatype="url" shortform="http://bobdupuy.mlbl...ld_baseball__6.html"><![CDATA[http://bobdupuy.mlblogs.com/bobdupuy/2006/03/world_baseball__6.html]]></fct:column>
          <fct:column/>
          <fct:column><![CDATA[<span class="srch_xerpt">Orlando While Chuck Armstrong president of <b>the</b> <b>Seattle</b> <b>Mariners</b> <b>traveled</b> <b>all</b> <b>the</b> <b>way</b> <b>to</b> <b>Japan</b> <b>to</b> <b>watch</b>... perform for <b>the</b> advancing <b>Japan</b> team last week <b>the</b> star from <b>the</b> <b>Seattle</b> roster so far in Round 1 has without...</span>]]></fct:column>
        </fct:row>
      </fct:result>
    </fct:facets>
  </SOAP:Body>
</SOAP:Envelope>

Related

Powered By Virtuoso