HostingRenew
From NETIM
Release | Runtime |
---|---|
API > 1.4 | Asynchronous |
Description
Renew an hosting for a new subscription period
int hostingRenew(string idSession, string fqdn, int duration)
Parameters
Format | Variable | Description | Notes |
---|---|---|---|
string (32) | idSession | Session ID | |
string (255) | fqdn | hostname | Fully qualified domain name |
int | duration | new duration | in month |
Return
A tracking ID
Notes
None
Examples
PHP
<?php $clientSOAP = new SoapClient("http://URL.wsdl"); $hosting = "example.com"; $duration = 1; try { $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); $trackingID = $clientSOAP->hostingRenew($idSession, $hosting, $duration); echo($trackingID); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if (isset($idSession)) { $clientSOAP->logout($idSession); } ?>
JAVA
DRSServiceLocator service = new DRSServiceLocator(); String idSession; int trackingID; String hosting = "example.com"; int duration = 1; try { DRSPortType port = service.getDRSPort(); idSession = port.login("XXXX", "XXXX", "EN"); trackingID = port.hostingRenew(idSession, hosting, duration); System.out.println(trackingID); port.logout(idSession); } catch (RemoteException re) { System.out.println(re.getMessage()); } catch (ServiceException se) { se.printStackTrace(); }