HostingRenew
From NETIM
(Difference between revisions)
m (Text replace - "−>" to "->") |
|||
Line 51: | Line 51: | ||
try | try | ||
{ | { | ||
− | $idSession = $ | + | $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); |
− | $trackingID = $ | + | $trackingID = $clientSOAP->hostingRenew($idSession, $hosting, $duration); |
echo($trackingID); | echo($trackingID); | ||
} | } | ||
catch(SoapFault $fault) | catch(SoapFault $fault) | ||
{ | { | ||
− | echo "Exception : " .$ | + | echo "Exception : " .$fault->getMessage(). "\n"; |
} | } | ||
if (isset($idSession)) | if (isset($idSession)) | ||
{ | { | ||
− | $ | + | $clientSOAP->logout($idSession); |
} | } | ||
?> | ?> |
Latest revision as of 10:09, 2 October 2013
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
[edit] 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(); }