I am trying to establish connection to following url :
The problem is that when i am trying to make an connection to above url using WAP2 i am getting connection as null , on the other hand i am able to establish connection and getting correct response when i am making connection on WIFI.
appending :
";ConnectionUID=WAP2Trans" to above url doesn't work.(getting connection as null)
while
appending
";interface=wifi" to above url works.
My logic for getting ConnectionUID is :
ServiceBook sb = ServiceBook.getSB();
   net.rim.device.api.servicebook.ServiceRecord[] records = 
      sb.findRecordsByCid("WPTCP");
   String uid = null;
 /*System.out.println("*****************Records are :" + records);
   System.out.println("*****************Records length :" + ecords.length);*/
   for(int i=0; i < records.length; i++) {
      if (records[i].isValid() && !records[i].isDisabled()) {
         if (records[i].getUid() != null && records[i].getUid().length() != 0) {
            if ((records[i].getCid().toLowerCase().indexOf("wptcp") != -1) && 
               records[i].getUid().toLowerCase().indexOf("wap2") !=- 1 &&
               (records[i].getUid().toLowerCase().indexOf("wifi") == -1) &&
               (records[i].getUid().toLowerCase().indexOf("mms") == -1)) {
               uid = records[i].getUid();
               break;
            }
         }
      }
   }
   if (uid != null) {
      url = url +";ConnectionUID=" + uid;
   }