<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Hosting and Domain registration Knowledgebase&#187; Java Api</title>
	<atom:link href="http://www.hostingknowledge.com/tag/java-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hostingknowledge.com</link>
	<description>Gossimer's Premier Web Hosting and Domain Registration Knowledgebase.</description>
	<lastBuildDate>Mon, 06 Sep 2010 23:26:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Java API Kit and Integration Guide</title>
		<link>http://www.hostingknowledge.com/reseller-guides/reseller-api-guide/java-api-kit/java-api-kit-and-integration-guide/</link>
		<comments>http://www.hostingknowledge.com/reseller-guides/reseller-api-guide/java-api-kit/java-api-kit-and-integration-guide/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 19:29:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java API Kit]]></category>
		<category><![CDATA[Amp]]></category>
		<category><![CDATA[Api]]></category>
		<category><![CDATA[Api Documentation]]></category>
		<category><![CDATA[Api Kit]]></category>
		<category><![CDATA[appropriate server]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Explanations]]></category>
		<category><![CDATA[Folders]]></category>
		<category><![CDATA[Integration Guide]]></category>
		<category><![CDATA[Java Api]]></category>
		<category><![CDATA[Javadocs]]></category>
		<category><![CDATA[Lib]]></category>
		<category><![CDATA[Platforms]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Step 1]]></category>
		<category><![CDATA[Step 2]]></category>
		<category><![CDATA[Structure Web]]></category>
		<category><![CDATA[Target]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[Using Java]]></category>

		<guid isPermaLink="false">http://hosting.local.dev/reseller-guides/reseller-api-guide/java-api-kit/java-api-kit-and-integration-guide/</guid>
		<description><![CDATA[417]]></description>
			<content:encoded><![CDATA[<p><span class="description"> </span></p>
<p> </p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">Follow the  instructions below to begin integration with the API using Java -</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">Make sure you  have read the General API Integration Instructions first.  If you have already integrated the Java API Kit at your end, read the Change Log  first to know what has changed since. </span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">Reference: </span></p>
<p align="left"><span style="font-family: Verdana; font-size: xx-small;"> <a href="/reseller-guides/reseller-api-guide/read-this-first-general-api-integration-instructions/" target="_blank">General API  Integration Instructions &gt;&gt;</a><br />
<a href="/reseller-guides/reseller-api-guide/java-api-kit/change-log/" target="_blank">Change Log &gt;&gt;</a></span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 1.  Download the API Kit</strong><br />
Click the link below to download the relevant API kits <em>(updated on 6th  March,  2008)</em>.</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"> <a href="/attachments/JAVA_CoreKIT_v3_10.zip">JAVA_CoreKIT_v3_10.zip</a><br />
<a href="/attachments/JAVA_DomainsKIT_v3_10.zip">JAVA_DomainsKIT_v3_10.zip</a><br />
<a href="/attachments/JAVA_HostingKIT_v3_10.zip">JAVA_HostingKIT_v3_10.zip</a><br />
<a href="/attachments/JAVA_OtherProductsKIT_v3_10.zip">JAVA_OtherProductsKIT_v3_10.zip</a></span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 2.  Download the API Documentation</strong><br />
The complete documentation of all classes and methods available in the API can  be found in the Docs below. The Docs below are javadocs, but the function names  and explanations remain the same for all the platforms and the documentation is  self explanatory. We recommend you download the docs and read through them  completely once before you integrate your application <em>(updated on 6th  March, 2008)</em>.</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-family: Verdana; font-size: x-small;"> <a href="/attachments/Core_Docs_v3_10.zip">Core_Docs_v3_10.zip</a><br />
<a href="/attachments/Domains_Docs_v3_10.zip">Domains_Docs_v3_10.zip</a> <em>(updated on  1st April, 2008)</em><br />
<a href="/attachments/Hosting_Docs_v3_10.zip">Hosting_Docs_v3_10.zip</a><br />
<a href="/attachments/OtherProducts_Docs_v3_10.zip">OtherProducts_Docs_v3_10.zip</a></span>
</p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 3.  Extract the files from the API Kit archive</strong><br />
You should get the following directory &amp; files structure</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-family: Verdana; font-size: x-small;"> WEB-INF/classes/ &#8211; Precompiled examples. You can directly run the examples to  test API functionality<br />
examples/src/ &#8211; The examples for using the API<br />
WEB-INF/lib/ &#8211; The jar files that you will need in order to compile/run the classes<br />
WEB-INF/build.xml &#8211; The API archive also contains a build.xml file. You can use this  file to build the examples using Ant.</span>
</p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">The Ant target  to build the examples is <strong>build</strong>. If you do not want to use Ant, you can just  compile the files in the &#8220;src&#8221; folder. You will need to include the jar files  provided in the lib folder while compiling the classes.</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 4. Run  the examples</strong><br />
You can run the precompiled examples provided in the &#8220;classes&#8221; folder.  Note the following however:</span>
</p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">1. Upload the  &#8220;classes&#8221; and &#8220;lib&#8221; folders to your server.  Make sure that both these folders are uploaded to the same parent folder.</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">2. You must  have a Demo account ready the first time. Read the General instructions  if you have not yet setup your demo account. Reference: </span><span style="font-family: Verdana; font-size: xx-small;"> <a href="/reseller-guides/reseller-api-guide/read-this-first-general-api-integration-instructions/" target="_blank">General API Integration Instructions &gt;&gt;</a></span></p>
<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><strong> <span style="font-family: Verdana; color: #ff0000; font-size: x-small;">IMPORTANT</span></strong> </p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">The  Demo server duplicates all functionality of the live server, however all Domain  Names will appear as available on the Demo Server. It does not query the live  registry and therefore names which are not available on the live registry will  still appear as available on the Demo Server. At times connectivity to the DEMO  Registry may be down resulting in errors.</span></p>
<p> </p></div>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">3. Make the  appropriate changes to the &#8220;settings.properties&#8221; file in the &#8220;WEB-INF\classes\com\logicboxes\properties&#8221; folder, by  putting in the values for your &#8220;ResellerUsername&#8221;, &#8220;ResellerPassword&#8221; and &#8220;ParentId&#8221;. The remaining  settings have already been made for you in this file.</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">4. The URL to  which the call is made is maintained in the &#8220;settings.properties&#8221; file inside the  &#8220;WEB-INF\classes\com\logicboxes\properties&#8221; folder. By default, all calls are made to the demo server URL  using HTTP. You can make changes to this file and redirect your calls to the  appropriate server.</span></p>
<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><strong> <span style="font-family: Verdana; color: #ff0000; font-size: x-small;">IMPORTANT</span></strong> </p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">If you  are using HTTPS calls you MUST have JDK 1.4 or greater installed. HTTPS calls will not work  with JDK 1.3 or lower.</span></p>
<p> </p></div>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">5. Set your  class path to include the bin folder and EVERY jar file in the lib  folder. You would use the following command for that</span></p>
<p align="left"><em><span style="text-decoration: underline;"><span style="font-family: Verdana; font-size: x-small;">Windows</span></span></em></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"> <span style="color: #008080;">set  CLASSPATH=%CLASSPATH%;<br />
&lt;/fullPathTo&gt;/classes;<br />
&lt;/fullPathToLibFolder&gt;/aaxerces-1_4_3.jar;<br />
&lt;/fullPathToLibFolder&gt;/axis.jar;<br />
&lt;/fullPathToLibFolder&gt;/commons-discovery.jar;<br />
&lt;/fullPathToLibFolder&gt;/commons-logging.jar;<br />
&lt;/fullPathToLibFolder&gt;/jaxrpc.jar;<br />
&lt;/fullPathToLibFolder&gt;/junit.jar;<br />
&lt;/fullPathToLibFolder&gt;/logicboxes-sfnb-v2.jar;<br />
&lt;/fullPathToLibFolder&gt;/saaj.jar;<br />
&lt;/fullPathToLibFolder&gt;/servlet.jar;<br />
&lt;/fullPathToLibFolder&gt;/wsdl4j.jar</span></span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-family: Verdana; font-size: x-small;"> <span style="text-decoration: underline;"><em>Linux</em></span></span>
</p>
<p align="left"><span style="font-family: Verdana; color: #008080; font-size: x-small;"> set  CLASSPATH=$CLASSPATH:<br />
&lt;/fullPathTo&gt;/classes:<br />
&lt;/fullPathToLibFolder&gt;/aaxerces-1_4_3.jar:<br />
&lt;/fullPathToLibFolder&gt;/axis.jar:<br />
&lt;/fullPathToLibFolder&gt;/commons-discovery.jar:<br />
&lt;/fullPathToLibFolder&gt;/commons-logging.jar:<br />
&lt;/fullPathToLibFolder&gt;/jaxrpc.jar:<br />
&lt;/fullPathToLibFolder&gt;/junit.jar:<br />
&lt;/fullPathToLibFolder&gt;/logicboxes-sfnb-v2.jar:<br />
&lt;/fullPathToLibFolder&gt;/saaj.jar:<br />
&lt;/fullPathToLibFolder&gt;/servlet.jar:<br />
&lt;/fullPathToLibFolder&gt;/wsdl4j.jar</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">6. Run the java  program using the command line below<br />
<span style="color: #008080;"><br />
java -classpath $CLASSPATH  com.logicboxes.foundation.sfnb.user.CustomerServiceLocator &lt;params for test class&gt;</span></span>
</p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">To find out the parameters that  the command above takes you can simply choose to not pass any parameter the  first time you run it. The example will print out the parameters that it expects.</span></p>
<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><strong> <span style="font-family: Verdana; color: #ff0000; font-size: x-small;">IMPORTANT</span></strong> </p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">In  registering/managing any domain name on the demo server always use  <em>ns1.onlyfordemo.net</em> and <em>ns2.onlyfordemo.net</em> as your nameservers. ANY OTHER Nameserver will result in an  <em>INVALID NAMESERVER error</em>.</span></p>
<p> </p></div>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">Follow the same  instructions above to run all the examples as below</span></p>
<p><span style="font-family: Verdana; font-size: x-small;">Domain Contact example:<br />
<span style="color: #008080;">java -classpath $CLASSPATH  com.logicboxes.foundation.sfnb.order.DomainContactServiceLocator &lt;params  required for the class&gt;</span></span></p>
<p>Domain example:<br />
<span style="color: #008080;">java -classpath $CLASSPATH  com.logicboxes.foundation.sfnb.order.DomainServiceLocator &lt;params required for the class&gt;</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> Fund example:<br />
<span style="color: #008080;">java -classpath $CLASSPATH  com.logicboxes.foundation.sfnb.management.FundServiceLocator &lt;params required  for the class&gt;</span></span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 5. Understanding Errors</strong><br />
Make sure you have read the General API Integration Instructions to obtain links to the error format and possible error documents. Reference: </span><span style="font-family: Verdana; font-size: xx-small;"> <a href="/reseller-guides/reseller-api-guide/read-this-first-general-api-integration-instructions/" target="_blank">General API Integration Instructions &gt;&gt;</a></span><span style="font-family: Verdana; font-size: x-small;"> </span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 6.  Writing your own code</strong><br />
After running each example above, if you simply refer to the corresponding .java  file in the src folder you will easily be able to figure out the code  snippet you need to write in order to make a similar call.</span>
</p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">Making an API  call to perform any action is a matter of two steps:</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-family: Verdana; font-size: x-small;"> (i) Obtain a pointer to the required service. This is done by using the code  below</span></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><span style="color: #008080;"> com.logicboxes.foundation.sfnb.user.Customer customerObj = new  com.logicboxes.foundation.sfnb.user.CustomerServiceLocator(serviceAddress).getCustomerService();</span></span></p>
<p><span style="font-family: Verdana; font-size: x-small;">In the above call &#8220;serviceAddress&#8221; is passed as a parameter to the constructor  of &#8220;CustomerServiceLocator&#8221;. This serviceAddress refers to the URL of the server  to which you are communicating. You can obtain this URL from the &#8220;settings.properties&#8221;  file in the &#8220;WEB-INF\classes\com\logicboxes\properties&#8221; folder.</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> (ii) Call the required method on this object. A complete reference of all  methods is available in the Java Docs. This can be achieved by using the code  below</span></p>
<p align="left"><span style="font-family: Verdana; color: #008080; font-size: x-small;">int customerId =  customerObj.addCustomer(resellerUserName, resellerPassword, &#8220;reseller&#8221;,resellerLangPref,  parentId, customerUsername, customerPassword, name, company,address1, address2,  address3, city, state, country, zip,telNoCc, telNo, altTelNoCc, altTelNo,  faxNoCc, faxNo, langPref);</span></p>
<div style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><strong><span style="font-family: Verdana; color: #ff0000; font-size: x-small;"> IMPORTANT</span></strong><span style="font-family: Verdana;"> </span> </p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"> You will notice above that EVERY method in the java docs takes the  same first 5 parameters as below</span></p>
<p align="left"><code><span style="font-family: Verdana; color: #008080; font-size: x-small;"> java.lang.String userName, java.lang.String password, java.lang.String role,  java.lang.String langpref, int parentid</span></code></p>
<p> </p></div>
<p align="left"><span style="font-family: Verdana; font-size: x-small;">These  parameters are common no matter which method you call. These parameters mean the  following</span></p>
<p align="left"><code><span style="font-family: Verdana; font-size: x-small;"><em> java.lang.String userName:</em> Your Username<br />
<em>java.lang.String password:</em> Your Password<br />
<em>java.lang.String role:</em> This will always be a string "reseller"<br />
<em>java.lang.String langpref:</em> The 2 letter code of the language in which you  wish to receive errors and descriptions - "en" for English<br />
<em>int parentid:</em> The ID of your parent which you can get from your profile  section</span></code></p>
<p align="left"><span style="font-family: Verdana; font-size: x-small;"><strong>Step 7.  Change the information to Live information when you are ready</strong><br />
Once you have followed the steps above and got the test examples to work  successfully, you can duplicate the same code in your live application and  replace the Demo Server and Reseller account information with your live username  and password. The URL that you make your calls to also needs to change to the  LIVE Server URL. The list of URLs are available in the &#8220;settings.properties&#8221; file  inside the &#8220;WEB-INF\classes\com\logicboxes\properties&#8221; folder.</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"> </span><span style="font-family: Verdana; font-size: x-small;"> Once again note, </span><span style="font-family: Verdana; color: #ff0000; font-size: x-small;">if you are  using the HTTPS URL you MUST have JDK 1.4 or greater installed. HTTPS calls will not work  with JDK 1.3 or lower.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostingknowledge.com/reseller-guides/reseller-api-guide/java-api-kit/java-api-kit-and-integration-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
