You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Background

This page outlines steps taken to be able to query a deployed perfSONAR lookup service. The service in question is one deployed by Internet2 under the PS-PS framework. It provides a registry of perfSONAR compatible services such as registered Topology Services, RRD MAs etc etc. It is located at:

http://patdev0.internet2.edu:6666/perfSONAR_PS/services/LS

Querying it with a web browser will return

<SOAP-ENV:Envelope>
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
  <nmwg:message id="message.9999465" type="response">
    <nmwg:metadata id="metadata.14215133">
      <nmwg:eventType>error.perfSONAR_PS.transport</nmwg:eventType>
    </nmwg:metadata>
  <nmwg:data id="data.15234559" metadataIdRef="metadata.14215133">
    <nmwgr:datum>
      Received message with 'INVALID REQUEST', are you using a web browser?
    </nmwgr:datum>
  </nmwg:data>
</nmwg:message>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Querying

In order to query the LS, one needs to construct a SOAP envelop with the relevant query to perform as an XML document. One can send the relevant XML via the perfSONAR-PS client via SVN (or use a relevant SOAP wrapper).

Simple Echo (Service up?) Query

<nmwg:message type="EchoRequest"
              id="id1"
              xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
  <nmwg:metadata id="meta" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
    <nmwg:eventType>echo.ls</nmwg:eventType>
  </nmwg:metadata>
  <nmwg:data id="data" metadataIdRef="meta" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"/>
</nmwg:message>
[ytl@Yees-Ubuntu:~/Work/perfSONAR/perfSONAR-PS/trunk/perfSONAR-PS/client]$ ./client.pl http://patdev0.internet2.edu:6666/perfSONAR_PS/services/LS /tmp/test.xml 
2007/10/09 13:52:27 DEBUG> Transport.pm:469 perfSONAR_PS::Transport::makeEnvelope - Envelope created.
2007/10/09 13:52:27 DEBUG> Transport.pm:488 perfSONAR_PS::Transport::sendReceive - Sending information to "http://patdev0.internet2.edu:6666//perfSONAR_PS/services/LS".
2007/10/09 13:52:27 DEBUG> Transport.pm:505 perfSONAR_PS::Transport::sendReceive - Response returned.
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="message.6185033" messageIdRef="id1" type="EchoResponse">
        <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="metadata.5527649" metadataIdRef="meta">
        <nmwg:eventType>success.echo</nmwg:eventType>
      </nmwg:metadata>
      <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/" id="data.8204718" metadataIdRef="metadata.5527649">
        <nmwgr:datum xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/">The echo request has passed.</nmwgr:datum>
      </nmwg:data>

    </nmwg:message>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Shows a successfully configured service.

Query the LS for information

<?xml version='1.0' encoding='UTF-8'?>
<nmwg:message type="LSQueryRequest"
              id="msg1"
              xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
              xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/">
                                                                                                                                   
  <nmwg:metadata id="meta1">
  
    <xquery:subject id="sub1">

        declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";
        collection('control.dbxml')/nmwg:metadata[@id="http://lhcopnmon1-mgm.fnal.gov:8091/axis/services/snmpMA"]

    </xquery:subject>
    <nmwg:eventType>http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0</nmwg:eventType>
  </nmwg:metadata>
  
  <nmwg:data metadataIdRef="meta1" id="d1"/>

</nmwg:message>
  • No labels