0

I am getting "no ":" in url blackberry" exception when I try to hit web service.
My url is like "http://url/MobileWrapper/action_name.do"

    String redemptionUrl = "http://test.TTMF.com/MobileWrapper/reconfirm.do";
HttpConnection httpConn = null; DataOutputStream dataOS = null;
redemptionUrl = redemptionUrl+ ";deviceside=true";
 httpConn = (HttpConnection) Connector.open(redemptionUrl);
happy
  • 2,550
  • 17
  • 64
  • 109
  • show some snippet of code, otherwise its very difficult to know what is the problem?? – BBdev Dec 28 '11 at 05:17
  • String redemptionUrl = "http://test.TTMF.com/MobileWrapper/reconfirm.do"; HttpConnection httpConn = null; DataOutputStream dataOS = null; System.out.println("strModuleName.trim()::::" + strModuleName.trim()); redemptionUrl = redemptionUrl+ ";deviceside=true"; httpConn = (HttpConnection) Connector.open(redemptionUrl); – happy Dec 28 '11 at 05:55
  • dont comment use edit to put your code... :) – BBdev Dec 28 '11 at 05:56
  • 1
    try to put "http://" or something like that before redemptionUrl. – Rupak Dec 28 '11 at 06:17

1 Answers1

2

Check your generated URL. It must be an invalid URL. Do debug or System.out.print(..).

To make a connection you have to do some common tasks, such as

  • White Space removal from URL.
  • Encode unwanted characters in URL with their HTML equivalent code.
  • Append appropriate connection parameter to the URL depending on connectivity support available on the device.
Rupak
  • 3,674
  • 15
  • 23