3 Replies Latest reply on May 11, 2011 7:00 PM by 861243

    Problem with findme example shipped with OCCAS


      I have got OCCAS and x-lite installed on my machine.

      I have deployed findme example on server after which I am able to register the X-lite clients on the server. ( I am getting the message registered on X-Lite)

      When I try to get the list of registered user using jsp provided with example the list is not getting displayed.

      After doing some research I came to know the length of array returned by getAddressOfRecords is zero in jsp. Even though it has non zero length in the method. Not sure what happing when array is returned to Jsp . Can anybody help on this.

      The method which is accessed from UI :

      Java class:

      public SipURI[] getAddressOfRecords() {

      log("entries.size() >>> "+entries.size());
      SipURI[] aors = new SipURI[entries.size()];
      log("aors >>> "+aors.toString());
      log("aors >>> "+aors.length); --------------------------------------------- gives value 2
      log("entries.keySet().toArray(aors) "+entries.keySet().toArray(aors).length);

      SipURI[] xyz = entries.keySet().toArray(aors);

      for(SipURI a : xyz){
      log("a.getUser() >>> "+ a.getUser());
      log("a.getHost() >>> "+ a.getHost()); // All value are listed
      log("a.toString() >>> "+ a.toString());

      return xyz;


      Code on jsp:

      InitialContext ctx = new InitialContext();
      LocationService locationService = (LocationService)
      if (locationService != null) {
      SipURI[] aors = locationService.getAddressOfRecords();
      out.print(aors.length); ------------------------------------------------- gives value 0

      for (SipURI aor : aors) {
      Address[] contacts = locationService.getContacts(aor);
      int i=0;
      for (Address address : contacts) {
      %> <tr>
      <td class="addressofRec"><%=aor %></td>
      StringBuffer buf = new StringBuffer();
      if (address.getDisplayName() != null) {
      buf.append(" &lt ").append(address.getURI());
      buf.append(" &gt");
      <td class="expires"><%=contacts[i++].getExpires() %></td></tr> <%