[arin-tech-discuss] arin-tech-discuss Digest, Vol 7, Issue 3

Tim Christensen timc at arin.net
Thu Jun 9 18:52:38 EDT 2011

Hello Ron,

On 6/9/11 4:28 PM, "Grimes, Ronald" <Ron.Grimes at qwest.com> said:

> Hi Tim,
> Could you please look at the below.  We do not seem to be receiving the
> "Codes" for errors below?  Could you help us out with this concern?

> I sent an xml with an empty <orgHandle>
> I got an exception instead of error message. Here is the xml I sent
> <?xml version="1.0" encoding="UTF-8"?>
> <net xmlns="http://www.arin.net/regrws/core/v1">
>         <version>4</version>
>         <orgHandle></orgHandle>
>         <parentNetHandle>NET-208-44-0-0-1</parentNetHandle>
>         <netName>Q0609-208-44-99-48</netName>
>         <netBlocks>
>                 <netBlock xmlns="">
>                         <type>S</type>
>                         <startAddress></startAddress>
>                         <cidrLength>29</cidrLength>
>                 </netBlock>
>         </netBlocks>
> <originASes>
>         <originAS xmlns="">209</originAS>
> </originASes>
> </net>
> But instead of getting an xml error message, I got this, "Server returned HTTP
> response code: 400 for URL:
> https://www.arin.net/rest/net/NET-208-44-0-0-1/reassign?apikey=MyAPIKey"

Along with this HTTP 400 response, you would have received an Error Payload
in the body of the response. (I just ran your transaction, and got the Error
Payload below).  It is possible that the client you are using may not be
providing these Error Payloads if the HTTP response is not in the 200 group;
if that is so, you will need to use a REST client that properly provides
Error Payloads on all HTTP responses.  Check the BODY to see if it was

This Error Payload would have contained the following content:

<error xmlns="http://www.arin.net/regrws/core/v1">
        <message>element "netBlock" not allowed in this context</message>
        <message>element "originAS" not allowed in this context</message>
    <message>The XML payload did not validate against the defined
        schema. Please see the documentation for details.</message>

Note that the error indicates that the XML payload you sent did not validate
against the schema definition, and refers you to the documentation.

In examining this particular issue, refer to the Methods document, page 10
and following regarding the "Reassign" method (specifically, the Detailed
Reassignment), which indicate that the orgHandle is required, and other
rules applicable to a Detailed Reassignment (middle of page 11).

As an aside, the reason that the message does not come back with "orgHandle
is not provided" or something like that, is because many different things
(different methods, containing different payload elements) are serviced by
any given XML schema.  The software is making its best guess at what might
be wrong in the "additionalInfo" collection (e.g., netBlock and originAS not
allowed), under the assumption that what you provided was accurate. In this
case, though, following the referral to the documentation and ensuring
conformance to the Methods, Payloads, and XML Schemas is your best bet
(which is what Sean did next, by providing the required orgHandle.)

> Second time I sent an xml with orgHandle,
> <?xml version="1.0" encoding="UTF-8"?>
> <net xmlns="http://www.arin.net/regrws/core/v1">
>         <version>4</version>
>         <orgHandle>BNO</orgHandle>
>         <parentNetHandle>NET-63-144-0-0-1</parentNetHandle>
>         <netName>Q0609-63-146-48-0</netName>
>         <netBlocks>
>                 <netBlock xmlns="">
>                         <type>S</type>
>                         <startAddress></startAddress>
>                         <cidrLength>29</cidrLength>
>                 </netBlock>
>         </netBlocks>
>         <originASes>
>                 <originAS xmlns="">209</originAS>
>         </originASes>
> </net>
> I got a good an xml returned, like following,
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <ticketedRequest xmlns="http://www.arin.net/regrws/core/v1">
>         <net>
>                 <pocLinks/>
>                 <netBlocks>
>                         <netBlock>
>                                 <cidrLength>29</cidrLength>
>                                 <description>Reassigned</description>
>                                 <endAddress></endAddress>
>                                 <startAddress></startAddress>
>                                 <type>S</type>
>                         </netBlock>
>                 </netBlocks>
>                 <handle>NET-63-146-48-0-1</handle>
>                 <netName>Q0609-63-146-48-0</netName>
>                 <orgHandle>BNO</orgHandle>
>                 <originASes>
>                         <originAS>AS209</originAS>
>                 </originASes>
>                 <parentNetHandle>NET-63-144-0-0-1</parentNetHandle>
> <registrationDate>2011-06-09T16:11:13.059-04:00</registrationDate>
>                 <version>4</version>
>         </net>
> </ticketedRequest>

This indicates that your client IS returning payloads when the HTTP status
is in the 200 group.  As I mentioned earlier, your client may not be
supporting payloads in the body when the HTTP status is in the 400 or 500
class (client error, server error). You'll have to use one that properly
supports response bodies under all HTTP status codes.

For testing one-off REST submissions, you may want to consider using a
client that is known to provide the proper responses.  Among those that we
use internally at ARIN are RESTClient from WizTools and the Simple Rest
Client for Chrome.

Best regards, 
Tim Christensen
ARIN Engineering

More information about the arin-tech-discuss mailing list