Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: Mike Sava on 15-03-2010 10:14:04 PM I tried using the BOOKING API but the format of the start/end Dates seems to be giving me an error. The samples are not in Java so I am not sure what the format should be in. Right now I am using: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
but that is obviously not correct.
BookingServiceLocator locator = new BookingServiceLocator(); locator.setBookingServiceSoap12EndpointAddress("http://127.0.0.1/tms/external/booking/bookingservice.asmx?WSDL"); //IP not real BookingServiceSoap service = locator.getBookingServiceSoap();
((Stub) service)._setProperty(Call.USERNAME_PROPERTY, "uid"); // uid not real ((Stub) service)._setProperty(Call.PASSWORD_PROPERTY, "xxxxx"); // pw not real
conference = service.saveConference(conference); // FAILS HERE with LOG ERROR BELOW
TMS LOG ERROR:
TMS Version 12.5 15:18:52,373 [5] ERROR Tandberg.TMS.External.SoapExceptionThrower - System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style) at System.DateTime.ParseExact(String s, String format, IFormatProvider provider, DateTimeStyles style) at System.Xml.XmlConvert.ToDateTime(String s, String format) at Tandberg.TMS.External.Booking.ExTMSAttributeMapper.MakeDateTime(String UTCString) at Tandberg.TMS.External.Booking.ExTMSDataAdapter.FillConference(ExConference exConf, Int32 lModifyMask, IConference outConf) at Tandberg.TMS.External.Booking.BookingService.SaveConference(ExConference exConfIn, Boolean bSingleInstance, Boolean includeSIPAnd3G, Boolean includeWebconferenceAndRecordingUri)
Subject: RE: Third Party Booking API (java) failing Replied by: Paul Currie on 07-05-2010 01:00:52 PM Sorry for the late reply.
The Booking API expects UTC date strings to be on the form "yyyy-MM-dd HH:mm:ssZ".
Initializing the SimpleDateFormat class with the format string "yyyy-MM-dd HH:mm:ss'Z'" will produce the correct output for TMS.
I see you tried the format string "yyyy-MM-dd HH:mm:ssZ". The Z token in this string this will append the timezone information on the form '[+-]<4-digit-UTC-offset>' e.g. '+0200', and not the expected string literal 'Z'. Note that to produce the expected UTC time string output you will probably need to convert the Date object from local time to UTC time before calling format();
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: