I'm just doing some light reading of the new API, in preparation
for writing my own client.

The specs describe the OPS message format (XML), but the
description of the actual commands ("lookup", "register", etc.)
only give the Perl hash that gets passed to the Perl client
functions, for example:

{ 
  protocol => "XCP", 
  action => "lookup", 
  object => "domain", 
  registrant_ip => "111.121.121.121", 
  attributes => { 
    domain => "www.foobar.com",
    affiliate_id => �1212133�
}


Now, there is no detail on what the actual XML message should be.
This, I think, would be useful.  I can only make an educated 
guess, so can someone at OpenSRS confirm that the above Perl hash
would be converted into the following OPS XML message:


<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
 <header>
    <version>1.0</version>
    <msg_id>1.123456789</msg_id>
    <msg_type>standard</msg_type>
  </header>
  <body>
    <data_block>
      <dt_assoc>
        <item key="protocol">XCP</item>
        <item key="action">lookup</item>
        <item key="object">domain</item>
        <item key="registrant_ip">111.121.121.121</item>
        <item key="attributes">
          <dt_assoc>
            <item key="domain">www.foobar.com</item>
            <item key="affiliate_id">1212133</item>
          </dt_assoc>
        </item>
      </dt_assoc>
    </data_block>
  </body>
</OPS_envelope>


Also, how is msg_id determined, and is "standard" the only 
msg_type?

__________________________________________________________________
Colin Viebrock                                easyDNS Technologies
Co-Founder                                     control your domain
                                            http://www.easyDNS.com


Reply via email to