I have a Utilities Web Service, that when I "ask" by SOAP to the Server, they return to me the Date.
@WebMethod(operationName = "getDateTime")
public byte[] getDateTime() {
UtilWS.showIpClient(wsContext);
String format = "yyyy-MM-dd HH:mm:ss.SSS";
SimpleDateFormat sdf = new SimpleDateFormat(format,
Locale.US);
String data = sdf.format(new Date(System.currentTimeMillis()));
System.out.println("== Date Requisiton: " + data);
return data.getBytes();
}
And in my Client side:
byte[] b = CommWS.send(getApplicationContext(), "UtilWS", "getDateTime");
String server_date = new String(b);
The CommWS is my class that implements the SOAP communication with the Server.
cya,
Bertan