Did you check all the parms are submitted? According to the documentation 
http://openmeetings.apache.org/RoomService.html#addRoomWithModerationAndExternalTypeAndStartEnd
 
and comparing to what I see in your code you're missing a few. 

You can also try building the URL by hand and go to it in the browser directly 
to see if it at least should work outside of any other program and language.

On 2013-09-07, at 6:57 PM, Pradeep D wrote:

> ---------- Forwarded message ----------
> From: "Pradeep D" <[email protected]>
> Date: 8 Sep 2013 00:17
> Subject: Error while calling RoomWebService
> To: <[email protected]>, <[email protected]>
> Cc: 
> 
> Hi All,
> 
> I download the latest openmeeting 2.1.1m We are calling RoomWebService.
> addRoomWithModerationAndExternalTypeAndStartEnd
>   method which is throwing the below exception, 
> http://localhost:5080/openmeetings/services/RoomService
> Exception in thread "main" 
> com.sun.jersey.api.client.UniformInterfaceException: GET 
> http://localhost:5080/openmeetings/services/RoomService returned a response 
> status of 500 Internal Server Error
>     at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
>     at com.sun.jersey.api.client.WebResource.get(WebResource.java:191)
>     at 
> openmeetingtest.OpenMeetingService.addNewRoomWithModeratorLimitedTime(OpenMeetingService.java:109)
>     at openmeetingtest.OpenMeetingTest.main(OpenMeetingTest.java:26)
> 
> Below is the code for calling the REST service 
> 
> SimpleDateFormat dfDate = new SimpleDateFormat("dd.MM.yyyy");
>         SimpleDateFormat dfTime = new SimpleDateFormat("mm:hh");
>         
>         Client client = new Client();
>         WebResource webResource = 
> client.resource(openMeetingServiceUrl+"/RoomService");
>         
>         MultivaluedMap queryParams = new MultivaluedMapImpl();
>         queryParams.add("SID",sessionResponse.getSession_id());
>         queryParams.add("name","Meeting_"+meetingId);
>         queryParams.add("roomtypes_id","1");
>         queryParams.add("numberOfPartizipants",numberOfUsers.toString());
>         queryParams.add("ispublic","false");
>         queryParams.add("appointment","false");
>         queryParams.add("isDemoRoom","false");
>         queryParams.add("isModeratedRoom","true");
>         queryParams.add("externalRoomType","ebox");
>         queryParams.add("validFromDate",dfDate.format(new Date()));
>         queryParams.add("validFromTime",dfTime.format(new Date()));
>         queryParams.add("validToDate",dfDate.format(new Date()));
>         queryParams.add("validToTime",dfTime.format(new Date()));
>         queryParams.add("isPasswordProtected","false");
>         queryParams.add("reminderTypeId","1");
>         queryParams.add("redirectURL","1");
>         
>         
> webResource.path("addRoomWithModerationAndExternalTypeAndStartEnd").queryParams(queryParams);
>         System.out.println(webResource.getURI());
>         String buffer =  webResource.get(String.class);
>         
>         System.out.println("response:"+buffer);
>         
>         ResponseHandler handler = (ResponseHandler) 
> SAXParserHelper.parse(buffer,ResponseHandler.class);
> 
> Kindly help me in identifying the problem.
> 
> Thanks
> Pradeep D

Reply via email to