cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
667
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Mike Sava on 10-03-2010 10:05:30 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 conference = service.getDefaultConference();
                      
Participant [] participants = new Participant[2];
participants[0] = new Participant();
// ParticipantType.value1 = TMS
participants[0].setParticipantCallType( ParticipantType.value1);
participants[0].setNameOrNumber("Yorktown.02-135.STP1");
participants[1] = new Participant();
participants[1].setParticipantCallType( ParticipantType.value1);
participants[1].setNameOrNumber("bjripp.office");
                      
conference.setParticipants(participants);
conference.setTitle("Mike Test conference");
      
                      
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Calendar cal = Calendar.getInstance();
cal.add( Calendar.DAY_OF_MONTH, 1);

Date startDate = cal.getTime();
cal.add( Calendar.HOUR, 1);
Date endDate = cal.getTime();

                      
conference.setStartTimeUTC( sdf.format( startDate ));
conference.setEndTimeUTC( sdf.format( endDate ) );
conference = service.saveConference(conference);                        



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 is failing
Replied by: Nicolai Grødum on 16-03-2010 10:11:25 AM
Can you try with a space instead of the T?

Example: Instead of 2010-03-17T09:47:26Z, try 2010-03-17 09:47:26Z.

Is the RecurrencePattern sent in as null? If not, RecurrenceInstanceIdUTC will also be parsed.

Nicolai Grødum
TANDBERG R&D

Subject: RE: Third Party Booking API is failing
Replied by: Mike Sava on 19-03-2010 01:54:52 AM
I've tried all of the following:

"yyyy-MM-dd'T'HH:mm:ss"
"yyyy-MM-dd HH:mm:ssZ"
"yyyy-MM-dd'T'HH:mm:ssZ"
"yyyy-MM-dd HH:mm:sszzzz"
"yyyy-MM-dd'T'HH:mm:ss.0000000Z"
"yyyy-MM-dd HH:mm:ss.0000000Z"
"yyyy-MM-dd'T'HH:mm:ss.0000000zzzz"


Nothing works.  This is NOT a repeating meeting.

Subject: RE: Third Party Booking API is failing
Replied by: Nicolai Grødum on 23-03-2010 05:17:16 PM
Try setting it as a hardcoded string first. Try e.g."2010-07-17 09:47:26Z" for start and "2010-07-17 09:57:26Z" for end. If you get that to work, examine the resulting string after you format. I would guess "yyyy-MM-dd HH:mm:ss'Z'" without knowing SimpleDateFormat.


The api is used by many others and between our products and has not changed for years. In the .NET client I looked at, the format DateTime.ToString("u") was used.

Even though you are not attempting to create a recurring meeting, verify that your java serializer is not filling in an empty RecurrencePattern, but indeed null/nothing at all.

Nico

Subject: RE: Third Party Booking API is failing
Replied by: Mike Sava on 25-03-2010 02:07:36 PM
Thanks for getting back to me.  I tried hardcoding and I'm getting the following:


System not found. Host name:  System Id: 0


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: System not found. Host name:  System Id: 0
faultActor: http://xxxxx/tms/external/Booking/BookingService.asmx
faultNode:
faultDetail:
{http://tandberg.net/2004/02/tms/external/exception/}errorcode:-2147218301


The recurrance Pattern is indeed NULL.

I didn't see anything in the web log this time so there wasn't much more info to go on.


Mike

Subject: RE: Third Party Booking API is failing
Replied by: Nicolai Grødum on 29-03-2010 05:08:13 PM
Check your client stub generator on the ParticipantType enum values. (You can compare them to the WSDL)

From your line:
participants[0].setParticipantCallType( ParticipantType.value1);

We don't have anything that looks like "value1", so you have to look at what that really maps to in the Web-service.

I suspect that translates to a TMS system ("TMS"), which means you also have to specify the TMS System Id in the ParticipantId field.

Here are our defined values for ParticipanType (from the WSDL):

Subject: RE: Third Party Booking API is failing
Replied by: martin coetzee on 14-10-2010 10:56:48 AM
Hello,

I am new to both Tandberg and Java and need to write an interface from ARCHIBUS Room Reservations to Tandberg using the
http://xxxx/tms/external/Booking/BookingService.asmx service.

Is there any Java sample code available to accomplish this ?

Regards,
MartinC.

Subject: RE: Third Party Booking API is failing
Replied by: Venunadh Veeralanka on 15-10-2010 02:31:34 AM
Mike Sava:
I've tried all of the following:

"yyyy-MM-dd'T'HH:mm:ss"
"yyyy-MM-dd HH:mm:ssZ"
"yyyy-MM-dd'T'HH:mm:ssZ"
"yyyy-MM-dd HH:mm:sszzzz"
"yyyy-MM-dd'T'HH:mm:ss.0000000Z"
"yyyy-MM-dd HH:mm:ss.0000000Z"
"yyyy-MM-dd'T'HH:mm:ss.0000000zzzz"


Nothing works.  This is NOT a repeating meeting.


Hi,
I tried with 2010-05-31T19:05:13.862-05:00 and it works fine.
Here is the sample soap message.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:book="http://tandberg.net/2004/02/tms/external/booking/">
   <soapenv:Header>
      <book:ExternalAPIVersionSoapHeader>
         <book:ClientVersionIn>5</book:ClientVersionIn>
         <!--Optional:-->
         <book:ClientIdentifierIn>?</book:ClientIdentifierIn>
         <!--Optional:-->
         <book:ClientLatestNamespaceIn>?</book:ClientLatestNamespaceIn>
         <!--Optional:-->
         <book:NewServiceURL>?</book:NewServiceURL>
      </book:ExternalAPIVersionSoapHeader>
   </soapenv:Header>
   <soapenv:Body>
      <book:GetConferencesForSystems>
         <!--Zero or more repetitions:-->
         <book:SystemIds>2</book:SystemIds>
         <book:StartTime>2010-05-31T19:05:13.862-05:00</book:StartTime>
         <book:EndTime>2010-10-31T19:05:13.862-05:00</book:EndTime>
         <book:ConferenceStatus>AllExceptDeleted</book:ConferenceStatus>
      </book:GetConferencesForSystems>
   </soapenv:Body>
</soapenv:Envelope>
Getting Started

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:

Quick Links