line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package XML::SRS; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = "0.06_01"; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1348
|
BEGIN { our $PROTOCOL_VERSION = "5.0" }; |
7
|
1
|
|
|
1
|
|
46
|
use XML::SRS::Version; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Moose::Role; |
10
|
|
|
|
|
|
|
use XML::SRS::Types; |
11
|
|
|
|
|
|
|
use XML::SRS::Node; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use PRANG::Graph; |
14
|
|
|
|
|
|
|
BEGIN { with 'PRANG::Graph', 'XML::SRS::Node'; }; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# packet types |
17
|
|
|
|
|
|
|
use XML::SRS::Request; |
18
|
|
|
|
|
|
|
use XML::SRS::Response; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# data types |
21
|
|
|
|
|
|
|
use XML::SRS::Time; |
22
|
|
|
|
|
|
|
use XML::SRS::Date; |
23
|
|
|
|
|
|
|
use XML::SRS::TimeStamp; |
24
|
|
|
|
|
|
|
use XML::SRS::Contact; |
25
|
|
|
|
|
|
|
use XML::SRS::Contact::Filter; |
26
|
|
|
|
|
|
|
use XML::SRS::Contact::Address::Filter; |
27
|
|
|
|
|
|
|
use XML::SRS::Audit; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# --- |
30
|
|
|
|
|
|
|
# plug-ins: |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Query types: |
33
|
|
|
|
|
|
|
use XML::SRS::Whois; |
34
|
|
|
|
|
|
|
use XML::SRS::ACL::Query; |
35
|
|
|
|
|
|
|
use XML::SRS::Registrar::Query; |
36
|
|
|
|
|
|
|
use XML::SRS::Registrar::Update; |
37
|
|
|
|
|
|
|
use XML::SRS::Domain::Create; |
38
|
|
|
|
|
|
|
use XML::SRS::Domain::Update; |
39
|
|
|
|
|
|
|
use XML::SRS::Domain::Query; |
40
|
|
|
|
|
|
|
use XML::SRS::Domain::Transferred; |
41
|
|
|
|
|
|
|
use XML::SRS::UDAIValid::Query; |
42
|
|
|
|
|
|
|
use XML::SRS::Handle::Create; |
43
|
|
|
|
|
|
|
use XML::SRS::Handle::Update; |
44
|
|
|
|
|
|
|
use XML::SRS::Handle::Query; |
45
|
|
|
|
|
|
|
use XML::SRS::Message; |
46
|
|
|
|
|
|
|
use XML::SRS::Message::Ack::Response; |
47
|
|
|
|
|
|
|
use XML::SRS::GetMessages; |
48
|
|
|
|
|
|
|
use XML::SRS::AckMessage; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# ActionResponse types: |
51
|
|
|
|
|
|
|
use XML::SRS::Error; |
52
|
|
|
|
|
|
|
use XML::SRS::ACL; |
53
|
|
|
|
|
|
|
use XML::SRS::Domain; |
54
|
|
|
|
|
|
|
use XML::SRS::Handle; |
55
|
|
|
|
|
|
|
use XML::SRS::Registrar; |
56
|
|
|
|
|
|
|
use XML::SRS::UDAIValid; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
XML::SRS - Shared Registry System XML Protocol |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SYNOPSIS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $create = XML::SRS::Domain::Create->new( |
69
|
|
|
|
|
|
|
action_id => "kaihoro.co.nz-create-".time(), |
70
|
|
|
|
|
|
|
domain_name => "kaihoro.co.nz", |
71
|
|
|
|
|
|
|
term => 12, |
72
|
|
|
|
|
|
|
delegate => 1, |
73
|
|
|
|
|
|
|
contact_registrant => { |
74
|
|
|
|
|
|
|
name => "Lord Crumb", |
75
|
|
|
|
|
|
|
email => 'kaihoro.takeaways@gmail.com', |
76
|
|
|
|
|
|
|
address => { |
77
|
|
|
|
|
|
|
address1 => "57 Mount Pleasant St", |
78
|
|
|
|
|
|
|
address2 => "Burbia", |
79
|
|
|
|
|
|
|
city => "Kaihoro", |
80
|
|
|
|
|
|
|
region => "Nelson", |
81
|
|
|
|
|
|
|
cc => "NZ", |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
phone => { |
84
|
|
|
|
|
|
|
cc => "64", |
85
|
|
|
|
|
|
|
ndc => "4", |
86
|
|
|
|
|
|
|
subscriber => "499 2267", |
87
|
|
|
|
|
|
|
}, |
88
|
|
|
|
|
|
|
}, |
89
|
|
|
|
|
|
|
nameservers => [qw( ns1.registrar.net.nz ns2.registrar.net.nz )], |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
my $xml_request = $create->to_xml; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 DESCRIPTION |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This module is an implementation of the XML protocol used by the .nz |
97
|
|
|
|
|
|
|
registry. This protocol was developed in 2002, using what were |
98
|
|
|
|
|
|
|
considered stable XML standard methods at the time, such as SGML DTD. |
99
|
|
|
|
|
|
|
This compares to the now de-facto standard, EPP (RFC3730, friends and |
100
|
|
|
|
|
|
|
updates), which was developed using XML Schema and XML Namespaces. As |
101
|
|
|
|
|
|
|
such, the SRS protocol as a stable standard far pre-dates EPP, which |
102
|
|
|
|
|
|
|
took a further 2 years to reach 1.0 status. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 WARNING: SITE^WMODULE UNDER CONSTRUCTION |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The classes which are present, while enough to be able to parse the |
107
|
|
|
|
|
|
|
protocol specification, are not fixed in API terms until they are |
108
|
|
|
|
|
|
|
documented and tested. Please consider any attribute which is not yet |
109
|
|
|
|
|
|
|
at least documented to be under review and subject to rename. This is |
110
|
|
|
|
|
|
|
thought to lead to a clearer implementation than fixing attribute |
111
|
|
|
|
|
|
|
names to the somewhat random (though well-known) names used in the |
112
|
|
|
|
|
|
|
XML. Use of C<sub BUILDARGS { }> to allow either may be considered; |
113
|
|
|
|
|
|
|
patches welcome. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Similarly with undocumented portions of the implementation. If you |
116
|
|
|
|
|
|
|
would like to make sure that the code you write against it doesn't |
117
|
|
|
|
|
|
|
need rewriting, please send a patch/pull request! |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This module currently implements the XML part of the protocol only; |
120
|
|
|
|
|
|
|
converting this into the HTTPS POST, with PGP signature, is still |
121
|
|
|
|
|
|
|
TO-DO. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 GLOBALS |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
There is currently a C<$XML::SRS::PROTOCOL_VERSION> variable which |
126
|
|
|
|
|
|
|
includes the version of the SRS protocol parsed by the module. |
127
|
|
|
|
|
|
|
Currently, the ability to parse more than one version at a time is not |
128
|
|
|
|
|
|
|
supported, so in the event of registry protocol version changes, you |
129
|
|
|
|
|
|
|
will need to upgrade the version of L<XML::SRS> in lock-step for any |
130
|
|
|
|
|
|
|
new functionality. This global is not exported. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 SOURCE, SUBMISSIONS, SUPPORT |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Source code is available from Catalyst: |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
git://git.catalyst.net.nz/XML-SRS.git |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
And Github: |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
git://github.com/catalyst/XML-SRS.git |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Please see the file F<SubmittingPatches> for information on preferred |
143
|
|
|
|
|
|
|
submission formats. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Suggested avenues for support: |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=over |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=item * |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
The DNRS forum on SourceForge - |
152
|
|
|
|
|
|
|
L<http://sourceforge.net/projects/dnrs/forums> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item * |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Contact the author and ask either politely or commercially for help. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item * |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Log a ticket on L<http://rt.cpan.org/> |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=back |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 SEE ALSO |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
For the 0.01 release, there is little documentation of how to use the |
167
|
|
|
|
|
|
|
classes, and the implemented portion of the protocol has a particular |
168
|
|
|
|
|
|
|
focus towards a particular use case, which initially will not include |
169
|
|
|
|
|
|
|
core registry functions such as adminstering domains. That being |
170
|
|
|
|
|
|
|
said, as you can see in the example, it is already possible to create |
171
|
|
|
|
|
|
|
DomainCreate messages. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Implementation, tests and documentation will be expanded as the module |
174
|
|
|
|
|
|
|
is put to use. This module is provided as a preview release. |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 AUTHOR AND LICENCE |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Development commissioned by NZ Registry Services, and carried out by |
179
|
|
|
|
|
|
|
Catalyst IT - L<http://www.catalyst.net.nz/> |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Copyright 2009, 2010, NZ Registry Services. This module is licensed |
182
|
|
|
|
|
|
|
under the Artistic License v2.0, which permits relicensing under other |
183
|
|
|
|
|
|
|
Free Software licenses. |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=cut |