<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<title>Re: [arin-tech-discuss] Question about your RESTful Server, method PUT</title>
</head>
<body>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Hello Sean,<br>
<br>
After reviewing both your submission here, and looking at a few things internally, we have identified that there are (at the least) some documentation gaps, if not an outright bug.
<br>
<br>
A “best practice” that is consistent with the Methods and Payloads documentation, but may not be expressed in an explicit or obvious enough manner, is that you should omit system-generated attributes from payloads that create new objects.  Furthermore, it’s
 a very good idea that if you are omitting optional fields, that you (also) not provide “empty” tags.<br>
<br>
For a reallocate, the only things you should need to provide are<br>
</span></font>
<ul>
<li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">in the URL, /rest/net/[parent_net_handle-goes-here]/reallocate?apikey=[api-key-goes-here]
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">content-type = application/xml
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">method = PUT
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">in the NET payload, the attributes:
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- version
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- orgHandle (this is the handle of the Org you’re reallocating
<i>to</i>) </span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- netBlocks collection, including: type (A), and a start-and-end OR start-and-cidr
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- netName
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- originASes collection (if applicable)
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- parentNetHandle (must match the [parent_net_handle-goes-here] from the URL)
</span></font></li><li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">- optionally, the comment collection or pocLinks collection if you are providing this information.<br>
</span></font></li></ul>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br>
We will be looking to improve the documentation to make this more clear.  <br>
<br>
Also, I have seen the “charsetName” error when you provide an empty tag for an enumerated value on occasion, so I believe that may be the issue. We will be exploring this bug, and making  a fix if necessary.<br>
<br>
Best regards, and thank you for your feedback,<br>
Tim Christensen<br>
ARIN Engineering<br>
<br>
On 4/12/11 7:12 PM, "Zhao, Sean" <<a href="Sean.Zhao@qwest.com">Sean.Zhao@qwest.com</a>> said:<br>
<br>
</span></font>
<blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Hi,
<br>
                My name is Sean Zhao from Qwest, one of your customer. I got a research assignment to see if we want to use Arin’s RESTful Server or some other servers. Since I am the original Arin’s email SWIP developer. I am doing the research of your RESTful
 Server first now. Now I got an issue here. On serviceClient.sendReceive, I keep on getting the error AxisFault message “charsetName”. That’s it! No more word.
<br>
Just one word of exception. I don’t know what to do. I will appreciate if anyone can help me
<br>
 <br>
And don’t know where to go. I am scream for help. <br>
 <br>
I have java code looks like this, briefly<br>
</span><font size="2"><span style="font-size:10pt">    <br>
Options options = <b>new</b> Options();<br>
 <br>
      options.setTo(<b>new</b> EndpointReference(“<a href="https://www.arin.net/rest/net/NET-216-206-0-0-1/reallocate?apikey=MyAPIKey”)">https://www.arin.net/rest/net/NET-216-206-0-0-1/reallocate?apikey=MyAPIKey”)</a>);<br>
      options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);<br>
options.setSoapVersionURI(org.apache.axiom.soap.SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);<br>
      options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_PROTOCOL_VERSION,<br>
                              org.apache.axis2.transport.http.HTTPConstants.HEADER_PROTOCOL_10);<br>
 <br>
      options.setProperty(Constants.Configuration.HTTP_METHOD, “PUT”);<br>
      options.setProperty(<br>
                  org.apache.axis2.transport.http.HTTPConstants.CONTENT_TYPE, <br>
                  org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_APPLICATION_XML);<br>
     <br>
      System.<i>setProperty</i>("javax.net.ssl.trustStore", "ssl/arin.jks"); <br>
      System.<i>setProperty</i>("javax.net.ssl.trustStorePassword", "arinLims"); <br>
      System.<i>setProperty</i>("javax.net.ssl.keyStore", "ssl/arin.jks"); <br>
      System.<i>setProperty</i>("javax.net.ssl.keyStorePassword", "arinLims"); <br>
     <br>
ServiceClient serviceClient = <b>new</b> ServiceClient();<br>
serviceClient.setOptions(options);<br>
 <br>
OMElement omElementResult = serviceClient.sendReceive(omElementPayload);<br>
</span></font><span style="font-size:11pt"><br>
The omElementPayload loosk like this<br>
 <br>
<net xmlns="<a href="http://www.arin.net/regrws/core/v1"">http://www.arin.net/regrws/core/v1"</a>><br>
        <version>4</version><br>
        <comment><br>
                <line number="1"></line><br>
        </comment><br>
        <registrationDate></registrationDate><br>
        <orgHandle>BNO</orgHandle><br>
        <handle></handle><br>
        <netBlocks><br>
                <netBlock><br>
                        <type>A</type><br>
                        <description></description><br>
                        <startAddress>216.207.149.16</startAddress><br>
                        <endAddress>216.207.149.23</endAddress><br>
                        <cidrLength>29</cidrLength><br>
                </netBlock><br>
        </netBlocks><br>
        <customerHandle>BCNO1-ARIN</customerHandle><br>
        <parentNetHandle></parentNetHandle><br>
        <netName>Q0412-216-207-149-16</netName><br>
        <originASes><br>
                <originAS>209</originAS><br>
        </originASes><br>
        <pocLinks><br>
                <pocLinkRef></pocLinkRef><br>
        </pocLinks><br>
</net><br>
 <br>
 <br>
And my key store file is generated by InstallCert, which I download from internet.
<br>
Am I doing anything wrong? What am I missing?<br>
 <br>
Appreciate any helps, hints or ideas. <br>
 <br>
 <br>
</span><span style="font-size:12pt"><b>Thanks,<br>
</b><br>
<b>Sean Zhao<br>
</b></span><span style="font-size:11pt"><br>
<hr align="CENTER" size="3" width="100%">
</span></font><font color="#808080"><font size="2"><font face="Arial"><span style="font-size:10pt">This communication is the property of Qwest and may contain confidential or<br>
privileged information. Unauthorized use of this communication is strictly<br>
prohibited and may be unlawful. If you have received this communication<br>
in error, please immediately notify the sender by reply e-mail and destroy<br>
all copies of the communication and any attachments.<br>
</span></font></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br>
<hr align="CENTER" size="3" width="95%">
</span></font><font size="2"><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_______________________________________________<br>
arin-tech-discuss mailing list<br>
<a href="arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a><br>
<a href="http://lists.arin.net/mailman/listinfo/arin-tech-discuss">http://lists.arin.net/mailman/listinfo/arin-tech-discuss</a><br>
</span></font></font></blockquote>
</body>
</html>