msgbartop
Gossimer’s Premier Web Hosting and Domain Registration Knowledgebase.
msgbarbottom

05 Sep 10 Common API Examples and Errors

Common API Examples

 

Title: registerDomain method under DomOrder class of Domains kit
Description: The registerDomain method accepts complex variable/parameters whose usage cannot be easily illustrated using HTML forms. Hence, this feature cannot emulated from within your Reseller Control Panel through the Settings -> API -> Emulate API Calls -> Domains API Kit Emulator interface.
Solution: An example of XML sent and received for this method is provided below for reference.
Example XML: XML Sent:

<?xml version=”1.0″ encoding=”UTF-8″?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:si=”http://soapinterop.org/xsd” xmlns:impl=”com.logicboxes.foundation.sfnb.order.DomOrder” xmlns:apachesoap=”http://xml.apache.org/xml-soap”>
<SOAP-ENV:Body>
<impl:registerDomain>
<userName xsi:type=”xsd:string”>
xxxxx@zzz.com</userName>
<password xsi:type=”xsd:string”>xxxxx4</password>
<role xsi:type=”xsd:string”>reseller</role>
<langpref xsi:type=”xsd:string”>en</langpref>
<parentid xsi:type=”xsd:int”>1</parentid>
<addParamList xsi:type=”apachesoap:Vector”>
<item xsi:type=”apachesoap:Map”>
<item>
<key xsi:type=”xsd:string”>domainhash</key>
<value xsi:type=”apachesoap:Map”>
<item>
<key xsi:type=”xsd:string”>apitest.com</key>
<value xsi:type=”xsd:int”>1</value>
</item>
</value>
</item>
<item>
<key xsi:type=”xsd:string”>contacthash</key>
<value xsi:type=”apachesoap:Map”>
<item>
<key xsi:type=”xsd:string”>registrantcontactid</key>
<value xsi:type=”xsd:int”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>admincontactid</key>
<value xsi:type=”xsd:int”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>technicalcontactid</key>
<value xsi:type=”xsd:int”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>billingcontactid</key>
<value xsi:type=”xsd:int”>123456</value>
</item>
</value>
</item>
</item>
</addParamList>
<nameServersList xsi:type=”apachesoap:Vector”>
<item xsi:type=”xsd:string”>
ns11.zzz.com</item>
<item xsi:type=”xsd:string”>
ns12.zzz.com</item>
<item xsi:type=”xsd:string”>
</item>
<item xsi:type=”xsd:string”>
</item>
</nameServersList>
<customerId xsi:type=”xsd:int”>123456</customerId>
<invoiceOption xsi:type=”xsd:string”>OnlyAdd</invoiceOption>
<enablePrivacyProtection xsi:type=”xsd:boolean”>false</enablePrivacyProtection>
<validate xsi:type=”xsd:boolean”>true</validate>
<extraInfo xsi:type=”apachesoap:Map”>
</extraInfo>
</impl:registerDomain>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 

XML Received:

<?xml version=”1.0″ encoding=”UTF-8″?>
<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<soapenv:Body>
<ns1:registerDomainResponse soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:ns1=”com.logicboxes.foundation.sfnb.order.DomOrder”>
<ns2:Map href=_quot;#id0_quot; xmlns:ns2=”http://xml.apache.org/xml-soap”/>
</ns1:registerDomainResponse>
<multiRef id=”id0″ soapenc:root=”0″ soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xsi:type=”ns3:Map” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:ns3=”http://xml.apache.org/xml-soap”>
<item>
<key xsi:type=”xsd:string”>apitest.com</key>
<value href=_quot;#id1_quot;/_gt;
</item>
</multiRef>
<multiRef id=”id1″ soapenc:root=”0″ soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xsi:type=”ns4:Map” xmlns:ns4=”http://xml.apache.org/xml-soap” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/”>
<item>
<key xsi:type=”xsd:string”>actiontypedesc</key>
<value xsi:type=_quot;xsd:string_quot;_gt;Registration of apitest.com for 1 years</value>
</item>
<item>
<key xsi:type=”xsd:string”>status</key>
<value xsi:type=”xsd:string”>Success</value>
</item>
<item>
<key xsi:type=”xsd:string”>entityid</key>
<value xsi:type=”xsd:string”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>eaqid</key>
<value xsi:type=”xsd:string”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>invoiceid</key>
<value xsi:type=”xsd:string”>123456</value>
</item>
<item>
<key xsi:type=”xsd:string”>actionstatus</key>
<value xsi:type=_quot;xsd:string_quot;_gt;PendingExecution_lt;/value_gt;
</item>
<item>
<key xsi:type=”xsd:string”>customercost</key>
<value xsi:type=”xsd:string”>00.00</value>
</item>
<item>
<key xsi:type=”xsd:string”>actiontype</key>
<value xsi:type=_quot;xsd:string_quot;_gt;AddNewDomain_lt;/value_gt;
</item>
<item>
<key xsi:type=”xsd:string”>description</key>
<value xsi:type=”xsd:string”>apitest.com</value>
</item>
<item>
<key xsi:type=”xsd:string”>actionstatusdesc</key>
<value xsi:type=_quot;xsd:string_quot;_gt;Order waiting to be executed.</value>
</item>
<item>
<key xsi:type=”xsd:string”>orderid</key>
<value xsi:type=”xsd:string”>123456</value>
</item>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
 

 

Common API Errors and their Solution

 

Title: Sending Integers as numbers rather than as strings
Description: Due to the limitations of Java, we cannot accept integers (e.g. 1) as numbers in a hash, rather they must be sent to us as strings (i.e. “1″). This is a recurrent problem when using the PHP Kit since PHP puts in Integers as plain numbers (in a hash).
Solution: Ensure that you’re sending in numbers as strings
Example XML: XML Sent:

POST /anacreon/servlet/rpcrouter HTTP/1.0 User-Agent: NuSOAP/0.6.7 (1.7) Host: www.myorderbox.com Content-Type: text/xml; charset=ISO-8859-1 SOAPAction: “” Content-Length: 1543

<?xml version=”1.0″ encoding=”ISO-8859-1″?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:si=”http://soapinterop.org/xsd” xmlns:impl=”com.logicboxes.foundation.sfnb.order.DomOrder” xmlns:apachesoap=”http://xml.apache.org/xml-soap”><SOAP-ENV:Body><impl:regis terDomain xmlns:impl=”com.logicboxes.foundation.sfnb.order.DomOrder”><userName xsi:type=”xsd:string”>xxxxx@zzz.com</userName><password xsi:type=”xsd:string”>xxxxx4</password><role xsi:type=”xsd:string”>reseller</role><langpref xsi:type=”xsd:string”>en</langpref><parentid xsi:type=”xsd:int”>1</parentid><domainHash xsi:type=”apachesoap:Map”><item><key xsi:type=”xsd:string”>fbc-elroy.com</key><value xsi:type=”xsd:int”>1</value></item></domainHash><ns xsi:type=”apachesoap:Vector”><item xsi:type=”xsd:string”>ns11.zzz.com</item><item xsi:type=”xsd:string”>ns12.zzz.com</item></ns><registrantContactId xsi:type=”xsd:int”>1548641</registrantContactId><adminContactId xsi:type=”xsd:int”>1548641</adminContactId><techContactId xsi:type=”xsd:int”>1548641</techContactId><billingContactId xsi:type=”xsd:int”>1548641</billingContactId><customerId xsi:type=”xsd:int”>321841</customerId><invoiceOption xsi:type=”xsd:string”>NoInvoice</invoiceOption></impl:registerDomain></SOAP- ENV:Body></SOAP-ENV:Envelope>
 

XML Received:

HTTP/1.0 500 Internal Server Error Server: Resin/3.0.s041002 Content-Type: text/xml; charset=utf-8 Date: Fri, 10 Jun 2005 16:40:04 GMT

<?xml version=”1.0″ encoding=”UTF-8″?> <soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>com.logicboxes.error.LogicBoxesException#~#com.logicboxes.util. Util#~#java.lang.Integer#~#error#~#</faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>

 

Title: Incorrect Parent ID
Description: An incorrect parent id is passed when trying to connect to the server
Solution: Pass the correct parent id. You might be passing the one for demo while connecting to the live environment, or vice-versa.
Example XML: Error Received:

Error Code: 2, SOAP raised an error.

Error Details:
com.logicboxes.error.AuthenticationException#~#com.logicboxes.foundation.sfnb.Authentication#~#You are not allowed to perform this action#~#warn#~#

 

Title: Maximum Number of Connections to the Registry Exceeded
Description: When too many users send commands to the same Registry using a particular Registrar’s connections, then an error would be displayed
Solution: This is a temporary issue and you need to simply try after sometime. Since the Registry provides each Registrar with a set number of connections, when these get exhausted an exception is thrown.
Example XML: Error Received:

01-jul-2005 16:43:31 org.apache.axis.client.Call invoke
INFO: Mapping Exception to AxisFault
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultString:
com.logicboxes.rtk.RegistryException#~#com.logicboxes.rtk.AbstractFactory#~#Object Not Available for registrar_domorgrrp Pool#~#error#~#
faultActor: null
faultDetail:
stackTrace: AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultString:
com.logicboxes.rtk.RegistryException#~#com.logicboxes.rtk.AbstractFactory#~#Object Not Available for registrar_domorgrrp Pool#~#error#~#
faultActor: null
faultDetail:

 

Title: Error received when making https calls using the .NET API Kit
Description: You may receive an error when trying to make an https call using our .NET API Kit since your .NET API Client needs to set a system security property to allow the system to accept SSL certificates.
Solution: You need to add a class in your project (or the .NET Examples that we provide) having the following lines of code:
 

Imports System.Security.Cryptography.X509CertificatesPublic Class TrustAllCertificatePolicy
Implements System.Net.ICertificatePolicy
Public Sub New()
End Sub
Public Function CheckValidationResult(ByVal srvPoint As System.Net.ServicePoint, ByVal certificate As System.Security.Cryptography.X509Certificates.X509Certificate, ByVal request As System.Net.WebRequest, ByVal certificateProblem As Integer) As Boolean Implements System.Net.ICertificatePolicy.CheckValidationResult
Return True
End Function
End Class


The code will allow the system to accept all kinds of certificates whatsoever. If you want the system to accept only a specific certificate, then you need to modify the code of the function “CheckValidationResult” above accordingly.

Also the user needs to include the following line of code before making the any function call to the https URL:

System.Net.ServicePointManager.CertificatePolicy = New TrustAllCertificatePolicy

We would suggest that you include the above line in the NetAPI.vb class constructor.

After performing all the above steps, you would be able to make the https calls using the .NET API Kit without any error.

Example XML: Error Received

System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. —> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

03 Sep 10 What are the types of Digital Certificates sold by Gossimer?

Gossimer sells four types of thawte Digital Certificates - 1. SGC SuperCert The Server Gated Cryptography (SGC) digital certificate is our premium SSL certificate, providing the highest possible protection in all circumstances. The SGC SuperCert offers 256-bit encryption in all browsers (released after Microsoft Internet Explorer 4.x or Netscape 4.06). In older-browsers it ensures a minimum of 128-bit encryption to 99.9% of all users, even if the user’s browser supports only 40-bit or 56-bit encryption. Who needs an SGC SuperCert? You need an SGC SuperCert instead of our Web Server Certificate, if any of the following are true for your business:

  • You have an International (non-US) audience/customer-base, or/and
  • You need to provide the highest possible encryption for each and every visitor to your website, or/and
  • You conduct medium to high-value e-commerce transactions via your web interface.

SGC SuperCert Features and Benefits at a glance

Encryption 256-bit with lowest possible encryption level of 128-bit protection for 99.9% of users even with older browsers
Browser Ubiquity Highest in industry
Certificate Details Domain and identity authentication and verification
Certificate Authentication Stringent Business Verification and Authentication
Average Issuance Speed Less than 2 days
thawte Trusted Site Seal Yes – free (available in multiple languages)
Root CA Yes
Free Reissues Yes . unlimited for the lifespan of the certificate
Secures Internationalized Domains Yes . thawte is the first Certification Authority to have all its SSL certificates support IDN.s character sets.
SGC Technology Yes . only a few CA.s can offer this

2. Web Server Certificate The thawte SSL Web Server Certificate offers comprehensive authentication procedures (domain name and identity verification). It also offers 256, 128, 56 or 40-bit encryption depending on your client’s browser capability and the cipher suite installed on your web server. This ensures that information is kept private while in transit between your web server and your clients’ web browsers. Web Server Certificate Features and Benefits at a glance

Encryption Upto 256-bit encryption enabled
Browser Ubiquity Highest in industry
Certificate Details Domain and identity authentication and verification
Certificate Authentication Stringent Business Verification and Authentication
Average Issuance Speed Less than 2 days
thawte Trusted Site Seal Yes – free (available in multiple languages)
Root CA Yes
Free Reissues Yes . unlimited for the lifespan of the certificate
Secures Internationalized Domains Yes . thawte is the first Certification Authority to have all its SSL certificates support IDN.s character sets.
SGC Technology No

3. SSL123 Certificate

SSL123 is thawte.s entry level certificate which provides validation that your domain is registered and that you have authorized the purchase of the certificate. Through SSL encryption, the certificate assures that information is kept private between your web server and your clients’ web browsers.

Who needs a SSL123 Digital Certificate? Your choice of digital certificate depends mainly on whether you require your company details added to the certificate contents. If not, then SSL123 is an ideal choice of product as it provides the added benefit of quick issuance. If you need a domain validated SSL certificate issued to you with minimal paperwork within minutes and at an affordable price, then SSL123 is the right certificate for you. SSL123 Certificate Features and Benefits at a glance

Encryption Upto 256-bit encryption enabled
Browser Ubiquity Highest in industry
Certificate Details Domain name verification only
Certificate Authentication Domain name check and validation
Average Issuance Speed Less than 1 day
thawte Trusted Site Seal Yes – free (available in multiple languages)
Root CA Yes
Free Reissues Yes . unlimited for the lifespan of the certificate
Secures Internationalized Domains Yes . thawte is the first Certification Authority to have all its SSL certificates support IDN.s character sets.
SGC Technology No

4. Wildcard Server Certificate The thawte Web Server Wildcard Certificate allows you to conveniently secure multiple sub-domain names on one domain name on the same server using *.yourdomainname.com pattern for the common name. You need not spend time, money and effort on obtaining certificates for different sub-domain names on a domain name. The Wildcard Server Certificate offers comprehensive authentication procedures (domain name and identity verification). It also offers 256, 128, 56 or 40-bit encryption depending on your client’s browser capability and the cipher suite installed on your web server. This ensures that information is kept private between your web server and your clients’ web browsers. Wildcard Server Certificate Features and Benefits at a glance

Encryption Upto 256-bit encryption enabled
Browser Ubiquity Highest in industry
Certificate Details Domain and identity authentication and verification
Certificate Authentication Stringent Business Verification and Authentication
Average Issuance Speed Less than 2 days
thawte Trusted Site Seal Yes – free (available in multiple languages)
Root CA Yes
Free Reissues Yes . unlimited for the lifespan of the certificate
Secures Internationalized Domains Yes . thawte is the first Certification Authority to have all its SSL certificates support IDN.s character sets.
SGC Technology No
IMPORTANT

  • If you wish to secure your domain name on multiple servers through the use of any of the above Digital Certificates, you need to purchase Additional License(s) for your Digital Certificate. Click here to read about Additional Licenses in detail >>

  • The Certificate issuance speed depends upon a lot of factors like the Admin or Technical Contact may not have completed thawte’s verification yet. This could lead to the overall delay in the Certificate issuance.

Which of these four Digital Certificates would suit your business? Depending upon the type of application/interface you wish to secure, you may choose one of the four digital certificates sold by Gossimer:

Typical Applications for Digital Certificates

SGC SuperCert

Web Server and Wildcard Cert

SSL123 Cert

Securing Web domains

Yes

Yes

Yes

Securing gateways (eg. Citrix Secure Gateways)

Yes

Yes

Yes

Securing multiple hosts for a domain on the same server

N/A

Yes (with Wildcard Cert)

N/A

Securing web forms for e-commerce sites

Yes

Yes

Yes

Securing IMAP/POP Mail Servers such as Microsoft Exchange and Outlook Web Access

Yes

Yes

Yes

Securing SMTP mail transfers through STARTTLS Start Transport Layer Security) connections

Yes

Yes

Yes

Securing transfer connections to FTP servers (FTPS connections)

Yes

Yes

Yes

SSL VPN.s

Yes

Yes

Yes

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,


SEO Powered By SEOPressor