BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 08-07-2008, 09:55 AM   #1 (permalink)
Thumbs Must Hurt
Join Date: Feb 2008
Model: 8310
Carrier: Informatico
Posts: 56
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with httpconnection

Please Login to Remove!

Hi, I have this code to read a webservice:

String url = Globales.CadenaConexion + "service.asmx/ObtenerInformaticaEmailsXML";
//url = url + "?operario=" + operario_actual;
http = (HttpConnection);
//http.setRequestProperty("Content-Type","text/xml; charset=utf-8");

os = http.openOutputStream();
//params = "operario=" + operario_pub;

int respuesta_servidor = http.getResponseCode();
if (respuesta_servidor==200) {

the problem is that the variable respuesta_servidor = 500 and if I execute manually in the internet explorer using the button invoke the webservice ObtenerInformaticaEmailsXML and goes correctly, the url is correct too. What can be the problem?

Thanks, Oscar
Old 08-08-2008, 07:46 AM   #2 (permalink)
Thumbs Must Hurt
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts


So I'd like more information (remember, more is always better!).

- What is "Globales.CadenaConexion" ? Presumably, that's the beginning of the URL, but there are some interesting things that even that string can indicate, so it's better to show us exactly what it contains (for instance, if it looks like "", the final URL will look like "", which is probably not what you're hoping for).

- Does this code fail on a BlackBerry simulator? The simulator will not connect to the Internet unless the MDS simulator is also running on the same machine. In addition, the MDS simulator must have the same proxy/firewall settings as IE. If you launch the MDS simulator, and then launch the BlackBerry Simulator, then try to use the BlackBerry browser to go to some website such as, you should see the results on the BlackBerry simulator, which indicates that the MDS simulator is set up correctly.

- Does this code fail on a real BlackBerry device? The device must be fully activated with the service provider and capable of accessing the Internet (say, through the browser).

Check the following regarding HTTP response codes:

List of HTTP status codes - Wikipedia, the free encyclopedia


Karl G. Kowalski
Owns a RAZR
Develops for BlackBerry
So next phone will iPhone 3G!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

1PC Audio Power Amplifier TDA7294 ZIP-15 ORIGINAL NEW
1PC Audio Power Amplifier TDA7294 ZIP-15 ORIGINAL NEW picture1PC NEW Yaskawa SGD7S-550A00A002
1PC NEW  Yaskawa SGD7S-550A00A002 picture1PC NEW Siemens communications module 6GK7443-1EX10-0XE0
1PC NEW  Siemens communications module 6GK7443-1EX10-0XE0 picture1PC NEW Siemens 6SE7024-7TD84-1HF4
1PC NEW Siemens 6SE7024-7TD84-1HF4 picture1PC NEW Siemens 6SE7090-0XX84-1CE0
1PC NEW Siemens 6SE7090-0XX84-1CE0 picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.