Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Service API Calls >

GetServerTime


Returns the time from a server.

Usage

You use the GetServerTime method to get the time at the server involved in a Web services API session. The time returned is converted to the time for the locale of the user ID making the request.

Return Value of the Call

The current server time.

Sample SOAP Request - GetServerTime

The following SOAP request retrieves the server time. No arguments are required.

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <TimeWS_GetServerTime_Input xmlns="urn:crmondemand/ws/time/"></TimeWS_GetServerTime_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response

The following response contains the time:

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <SOAP-ENV:Body>

      <ns:TimeWS_GetServerTime_Output xmlns:ns="urn:crmondemand/ws/time/">

         <ns:CurrentServerTime>08/05/2011 10:54:27</ns:CurrentServerTime>

         <ns:TimeZone>(GMT-06:00) Central Time (US &amp; Canada)</ns:TimeZone>

      </ns:TimeWS_GetServerTime_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.