views:

12

answers:

1

Using Httpconnection i want to send the login details as data with the request and once verified i need a xml file as a response which is used in my Blackberry device to display the details (I already implemented this and tested with an xml file)

 private void fetchPage(String url) {
// Perform basic validation (set characters to lowercase and add http:// or https://).
boolean validHeader = false;
int i = 0;
for (i = HTTP_PROTOCOL.length - 1; i >= 0; --i) {
  if (-1 != url.indexOf(HTTP_PROTOCOL[i])) {
    validHeader = true;
    break;
  }
}
if (!validHeader) {
  // Prepend the protocol specifier if it is missing.
  url = HTTP_PROTOCOL[0] + url;
}
// Create a new thread for connection operations.
System.out.println("+++++++url : " + url);
_connectionThread.fetch(url);

} Thanks in advance ...

A: 

I managed to find an example file So it's working. If any one has the same pbm i can paste the code thanx a lot :)

Praneel