Exception “no ”:“ in url blackberry”
-
07-04-2021 - |
Question
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);
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow