Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::epp::frame::objectspec(3pm) [debian man page]

Net::EPP::Frame::ObjectSpec(3pm)			User Contributed Perl Documentation			  Net::EPP::Frame::ObjectSpec(3pm)

NAME
Net::EPP::Frame::ObjectSpec - metadata about EPP object types SYNOPSIS
use Net::EPP::Frame; use strict; # create an EPP frame: my $check = Net::EPP::Frame::Command::Check->new; # get the spec: my @spec = Net::EPP::Frame::ObjectSpec->spec('domain'); # create an object: my $domain = $check->addObject(@spec); # set the attributes: my $name = $check->createElement('domain:name'); $name->addText('example.tld'); # assemble the frame: $domain->appendChild($name); $check->getCommandNode->appendChild($domain); print $check->toString; DESCRIPTION
EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an application layer client-server protocol for the provisioning and management of objects stored in a shared central repository. Specified in XML, the protocol defines generic object management operations and an extensible framework that maps protocol operations to objects. As of writing, its only well-developed application is the provisioning of Internet domain names, hosts, and related contact details. Net::EPP::Frame::ObjectSpec is a simple module designed to provide easy access to metadata for the object types defined in the EPP specification. USAGE
my @spec = Net::EPP::Frame::ObjectSpec->spec($type); This function returns an array containing metadata for the given object type. If no metadata is registered then the function returns undef. The array contains three members: @spec = ( $type, $xmlns, $schemaLocation, ); $type is the same as the supplied argument, and the other two members correspond to the XML attributes used to specify the object in an EPP "<command>" or "<response>" frame. The objects currently registered are: o "domain", for domain names. o "host", for DNS server hosts. o "contact", for contact objects. o "secDNS", for DNSSEC information. AUTHOR
CentralNic Ltd (http://www.centralnic.com/). COPYRIGHT
This module is (c) 2007 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o the Net::EPP::Frame module, for constructing valid EPP frames. o the Net::EPP::Client module, for communicating with EPP servers. o RFCs 4930 and RFC 4934, available from <http://www.ietf.org/>. o The CentralNic EPP site at <http://www.centralnic.com/resellers/epp>. perl v5.14.2 2008-12-04 Net::EPP::Frame::ObjectSpec(3pm)

Check Out this Related Man Page

Net::EPP::Frame(3pm)					User Contributed Perl Documentation				      Net::EPP::Frame(3pm)

NAME
Net::EPP::Frame - An EPP XML frame system built on top of XML::LibXML. SYNOPSIS
#!/usr/bin/perl use Net::EPP::Client; use Net::EPP::Frame; use Net::EPP::ObjectSpec; use Digest::MD5 qw(md5_hex); use Time::HiRes qw(time); use strict; # # establish a connection to an EPP server: # my $epp = Net::EPP::Client->new( host => 'epp.registry.tld', port => 700, ssl => 1, dom => 1, ); my $greeting = $epp->connect; # # log in: # my $login = Net::EPP::Frame::Command::Login->new; $login->clID->appendText($userid); $login->pw->appendText($passwd); # # set the client transaction ID: # $login->clTRID->appendText(md5_hex(Time::HiRes::time().$$)); # # check the response from the log in: # my $answer = $epp->request($login); my $result = ($answer->getElementsByTagName('result'))[0]; if ($result->getAttribute('code') != 1000) { die("Login failed!"); } # # OK, let's do a domain name check: # my $check = Net::EPP::Frame::Command::Check->new; # # get the spec from L<Net::EPP::Frame::ObjectSpec>: # my @spec = Net::EPP::Frame::ObjectSpec->spec('domain'); # # create a domain object using the spec: # my $domain = $check->addObject(@spec); # # set the domain name we want to check: # my $name = $check->createElement('domain:name'); $name->appendText('example.tld'); # # set the client transaction ID: # $check->clTRID->appendText(md5_hex(time().$$)); # # assemble the frame: # $domain->addChild($name); # # send the request: # my $answer = $epp->request($check); # and so on... DESCRIPTION
EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an application layer client-server protocol for the provisioning and management of objects stored in a shared central repository. Specified in XML, the protocol defines generic object management operations and an extensible framework that maps protocol operations to objects. As of writing, its only well-developed application is the provisioning of Internet domain names, hosts, and related contact details. EPP uses XML documents called "frames" send data to and from clients and servers. This module implements a subclass of the XML::LibXML::Document module that simplifies the process of creation of these frames. It is designed to be used alongside the Net::EPP::Client module. OBJECT HIERARCHY
L<XML::LibXML::Node> +----L<XML::LibXML::Document> +----L<Net::EPP::Frame> USAGE
As a rule, you will not need to create Net::EPP::Frame objects directly. Instead, you should use one of the subclasses included with the distribution. The subclasses all inherit from Net::EPP::Frame. Net::EPP::Frame is itself a subclass of XML::LibXML::Document so all the methods available from that class are also available to instances of Net::EPP::Frame. The available subclasses of Net::EPP::Frame exist to add any additional elements required by the EPP specification. For example, the <login> frame must contain the <clID> and <pw> frames, so when you create a new Net::EPP::Frame::Command::Login object, you get these already defined. These classes also have convenience methods, so for the above example, you can call the "$login->clID" and "$login->pw" methods to get the XML::LibXML::Node objects correesponding to those elements. RATIONALE You could just as easily construct your EPP frames from templates or just lots of "printf()" calls. But using a programmatic approach such as this strongly couples the validity of your XML to the validity of your program. If the process by which your XML is built is broken, your program won't run. This has to be a win. ADDITIONAL METHODS
my $str = $frame->formatTimeStamp($timestamp); This method returns a scalar in the required format (defined in RFC 3339). This is a convenience method. my $node = $frame->getNode($id); my $node = $frame->getNode($ns, $id); This is another convenience method. It uses $id with the getElementsByTagName() method to get a list of nodes with that element name, and simply returns the first XML::LibXML::Element from the list. If $ns is provided, then getElementsByTagNameNS() is used. my $binary = $frame->header; Returns a scalar containing the frame length packed into binary. This is only useful for low-level protocol stuff. my $data = $frame->frame; Returns a scalar containing the frame header (see the header() method above) concatenated with the XML frame itself. This is only useful for low-level protocol stuff. AVAILABLE SUBCLASSES
Net::EPP::Frame, the base class Net::EPP::Frame::Command, for EPP client command frames Net::EPP::Frame::Command::Check, for EPP <check> client commands Net::EPP::Frame::Command::Create, for EPP <create> client commands Net::EPP::Frame::Command::Delete, for EPP <delete> client commands Net::EPP::Frame::Command::Info, for EPP <info> client commands Net::EPP::Frame::Command::Login, for EPP <login> client commands Net::EPP::Frame::Command::Logout, for EPP <logout> client commands Net::EPP::Frame::Command::Poll, for EPP <poll> client commands Net::EPP::Frame::Command::Renew, for EPP <renew> client commands Net::EPP::Frame::Command::Transfer, for EPP <transfer> client commands Net::EPP::Frame::Command::Update, for <update> client commands Net::EPP::Frame::Greeting, for EPP server greetings Net::EPP::Frame::Hello, for EPP client greetings Net::EPP::Frame::Response, for EPP server response frames Each subclass has its own subclasses for various objects, for example Net::EPP::Frame::Command::Check::Domain creates "<check>" frame for domain names. Coverage for all combinations of command and object type is not complete, but work is ongoing. AUTHOR
CentralNic Ltd (http://www.centralnic.com/). COPYRIGHT
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o XML::LibXML, the Perl bindings to the libxml library o The libxml website at <http://www.xmlsoft.org/> o the Net::EPP::Client module, for communicating with EPP servers. o the Net::EPP::Frame::ObjectSpec module, for managing EP object metadata. o RFCs 4930 and RFC 4934, available from <http://www.ietf.org/>. o The CentralNic EPP site at <http://www.centralnic.com/resellers/epp>. perl v5.14.2 2012-04-23 Net::EPP::Frame(3pm)
Man Page