BlackBerry App MIDlet - HttpConnection

Hello

I am writing my first app for Blackberry (or any other mobile device) and I'm having a problem making a Blackberry Simulator http request to a WCF service that is running locally. I use the Blackberry Eclipse plug-in, so when I run the application it launches all the MDS - CS Simulator and then starts the Blackberry Simulator. In the Blackberry Simulator, I can open the Blackberry browser and send a request to the WCF service running on my computer with no problems. The service receives the request and inserts a record in the database. However, when the MIDlet application tries to send the same http request to the WCF service, I get a http response code 400 with a response of "Bad Request" message. Here is the code I am using to send the request:

// Make call to WCF service
System.out.println("Making call to WCF service.");
connection = (HttpConnection) Connector.open("http:///MyService/MyService.svc/ajax/ServiceMethod?Parameter1=1&Parameter2=2&Parameter3=3&Parameter4=4;deviceside=false");
connection.setRequestMethod(HttpConnection.GET);
rc = connection.getResponseCode();
System.out.println("rc="+rc+";response message="+connection.getResponseMessage());
connection.close();

Notice that, at the end of my URL, I have '; deviceside = false. I read somewhere that you include if you use MDS; not sure if that's just fine. I have tried with and without which at the end, but I get the same answer. I've been doing a little research on Google and poking around on the Blackberry Web site, but I haven't had a bit of luck.

Any ideas on what could be the problem? Are there changes in the rimpublic.property file that I have to do? Or other properties of the application, I need to set on the HttpConnection object?

Thanks in advance.

EDIT: I changed the url in the application MIDlet http://www.google.com and I got a response of 200/OK.

I ended up creating a WCF RESTful zero service using this tutorial and it worked. I can call from the browser and the MIDlet app successfully. I guess that the original WCF service I called is not fully restorative. The way it is set up is very different from what's in the tutorial, I'll have to take a closer look.

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Smartphones MIDlet name missing attribute

    Despite the appworld deletion, then by restarting my blackberry with a battery pull whenever I try to re download appworld I get the same error message saying that the 'MIDlet name attribute is missing. " I just can't work it out and tried so many times. Can anyone help?

    I found these threads:

    Let us know if it works.

    http://supportforums.BlackBerry.com/T5/BlackBerry-Curve/helpp-the-MIDlet-name-attribute-is-missing/t...

    http://supportforums.BlackBerry.com/T5/BlackBerry-App-World-General/upgraded-to-7-1-on-bold-9900-and...

  • BlackBerry Smartphones blackberry app world disappears from my bold 9780

    In my bold9780 I download appworld and managed has download applications but now appworld disappears from the list of the menu, system settings shows app world I delete and it redownload but no use still I face same problem how to get appworld

    Hi manish14

    Welcome to the Forums of the BlackBerry Support

    If you encounter a problem with the version of BlackBerry World, then download BlackBerry World version 4.0.0.55 which is the best solution now available for BlackBerry World, first uninstall any existing version of the BlackBerry World from your device, options > device > application > locate and remove BlackBerry World, then do a battery pull reboot by removing the battery while your unit is powered.

    After restarting the device from your BlackBerry browser search or click here http://mobileapps.blackberry.com/devicesoftware/entry.do?code=appworld3 to download the 4.0.0.55 version. Also check out this Knowledge Base for assistance:

    KB29422 BlackBerry App World icon is missing after upgrade to BlackBerry App World 4.0.0.63 to 4.0.0.65

  • BlackBerry App Evernote a shared folder on classic BB

    I shared a folder of Evernote Premium on a Mac and an iPad App Evernote (Basic) on a classic BB. Even if a message is received on the classic indicating that I can't further. I can get to a long reference that the classic tells me that there is no software on the device to open it or the browser opens how I like Evernote does not support the BB browser and invites me to download the app - which I already have!

    It seems to be going around in circles...

    Help please

    Ok. I have it.

    I'll have to experiment, but cannot do so now. I hope that someone will respond before that I'll be back if they don't know a solution.

    (A laptop, I shared with my wife, but she did not really get with the idea, so I really got to dig into it with the BlackBerry or computer. But I dig this evening. As far as I know right now, your experience may be the rule. What I am curious to know is if shared notebooks can be linked to or access the app Evernote on the BlackBerry).

    (For what it's worth, what I do instead is also sharing individual notes with woman and other app Evernote. It's as easy as using surveys BBM, BBM group, e-mail).

    (Thought hard, here is what I'm going to try: account Evernote from my wife, I will create a test booklet and share with me.) I'll answer with a desktop computer accept and see what there is to do this laptop to display on my Evernote. From there, I'll see then if this laptop shared test appears in the Evernote on BlackBerry App. I am sure that the acceptance of the offer of shares will have to be done from a desktop browser. We'll see. If you give a try in front of me, after what you learn.)

  • Player for Blackberry app

    Anyone with an idea of the players of blackberry app... I need to check if the application works to screen different sizzes and downloading is okay

    Thank you & best regards

    Vishnu pascalp

    {DELETED}

    MOD Edit: Remove information staff to comply with the Community guidelines and the terms and Conditions of use.

    So if I you understand, you want to start an application on your PC and then have it run your BlackBerry projects directly.

    The only option I know is a simulator.  I'm not aware of everyone write an App Player to BBOS (BB10) of generic applications.

  • BlackBerry App error 100000

    My car credit account has been charged for BlackBerry App World transaction and I couldn't download the app, that I bought. The same error number 100000

    I tried 5 times so please try to find a quick solution

    Hey mohaly73,

    Welcome to the community of BlackBerry Support Forums.

    Thanks for the question.

    Follow the steps in this article to resolve the problem: www.blackberry.com/btsc/KB24454

    Let me know if you have any other questions.

    See you soon.

  • BlackBerry App Blackberry app world Z10 does not

    Since the last version of the software to update, Blackberry App world on my phone will not work.  I open it and it tries to load but never beyond this stage.  I pulled the battery to see if it can help, but still no luck.  I can't remove it because it is part of the new OS 10.  Any information would be appreciated.

    Thank you

    • On your Z10, go to the icon of your music or games.
    • Tap the icon to overflow on the left three points lower and touchscreen BlackBerry World.
    • Now BlackBerryWorld should start for you.

    credit to ukmight for this solution.

  • BlackBerry App why can't blackberry get blackberry app world to the Zimbabwe.

    I tried to open BlackBerry App World on my BlackBerry Z10 and it does not open. It keeps loading when I'm in Zim, but when I'm in South Africa, opens. Seems that it is the problem of the country. Is there another way I can open it up to the Zimbabwe. ?

    Hello tinotendamukwaiwa

    Unfortunately, to the Zimbabwe is not in the list of countries supported for BlackBerry World as shown below:

    http://support.BlackBerry.com/kb/articleDetail?articleNumber=000024386&language=English

  • Installation of BlackBerry App World on Simulator

    I try to install App World on a BB9300 Simulator. I open the web browser and follow appworld.blackberry.com OTA installation and the application installs fine. However, when I go to run it, I get the message:

    "The non-operational data service.

    I'm testing call world app of my application, so users can easily upgrade to the paid version. Any ideas how can I get app world working on a sim card (no matter what sim will do).

    BlackBerry App World is not supported in BlackBerry smartphone Simulator.  You will need to test this on a real Smartphone BlackBerry.

  • BlackBerry App A word to BB: "Please a transparency for loyal customers.

    I am really sad and frustrated that officials BlackBerry are not because of the Twitter pictures... If we say that not everyone uses what is BlackBerry app will respond not to what is news App; that cannot be said about Twitter because it has millions of BlackBerry users... then why BlackBerry is not attend to this matter? !!! Very strange... or what they know to the BlackBerry not continuous this is BB 10 platform in the near future and those who use it will be left behind...
    A word for BlackBerry: please some transparency we (loyal users of BB10) so that we make our choices...
    Question: if I removed the Twitter version pre-installed on the legacy and reinstalled Twitter to say Mobile 1 app store application: to solve that question photos? And I continue to receive messages from twitter in the hub?
    Thank you

    Gallouly wrote:
    everything I say is directed to management of BB not to everyone here.

    But, as has been explained, this is not the purpose of this forum.

  • BlackBerry App Facebook Z10 questions

    I had a job for years facebook app and I don't have much to complain, but now there's a lot going on with the app that I don't get. After updating the app, I was not able to use it. Now, acting as a kind of shortcut for my browser, calendar, and contacts Facebook, hub is gone and it is now useless as it is now a browser shortcut. How to fix, it downgrade to the previous or how long should I wait for an update that works?

    Exactly, the Facebook for BlackBerry app has been disabled due essentially to the fact that Facebook will not allow access to what is called the BlackBerry Facebook API. Fault of Facebook and the decision. BlackBerry has created the browser shortcut.

    Details here: update required for Facebook

    There is a solution to your Facebook contacts on the device BlackBerry10: How to get Facebook on BB10 contacts

  • Does blackberry app world offers app crash logs?

    Does blackberry app world provides functionality to app crash logs similar to Google game store?

    According to my knowledge, no.

    But must be certain? Please suggest.

    Thank you.

    So to enter into any discussion with Pierre is the answer to the original question No.-

    Does blackberry app world offers app crash logs?

    ANSWER: NO.

    Thank you peter for all your media.

  • Distribute an application outside of BlackBerry App World

    Hi people,

    I have a BlackBerry 10 app I want to distribute to people until it's available on BlackBerry App World.  Is this possible to do?  If so, how are you going to do?  What is also simple to send the file from the bar, or what I need to do something more involved?

    Thank you

    John

    Hello! You can send the BAR + debug the token, but the debugging token will expire in a month and the BAR will stop working.

    Another option is sending a signed BAR but you will not be able to control its further distribution.

  • BlackBerry App BlackBerry App analysis of vulnerability

    Hello

    I'm looking for a way to perform an analysis of the vulnerability on the applications of the BlackBerry World public.

    Currently, we use a variety of tools including NowSecure Lab (for ios and android) to analyize of specific applications for security vulnerabilities that are present.  This includes the binary app static analysis and dynamic analysis of the application running on the device.

    Is there a similar tool to the NowSecure laboratory which can be used for applications BlackBerry World?

    Thank you

    Change Yes I know app BlackBerry vetting of treatment with the help of guardian and their relationship with Trend Micro.

    Two copies. Please see here: http://supportforums.blackberry.com/t5/BlackBerry-World-Development/BlackBerry-App-Vulnerability-Ana...

  • BlackBerry App how login to Blackberry App of Facebook community

    Hello! I save my BB community account or Facebook. Community blackBerry App (on BB (Q10) need to login / password to connect. How can I set password for my Facebook account?

    I find the solution.

    1. Log on Chrome on PC via FB.
    2. Click my settings > social connect > Facebook Connect.
    3. Click on «disconnect your Facebook account»
    4. Appear the popup with the new password request.
    5. After set password, you can connect to Facebook again.

Maybe you are looking for

  • How can I disable tabs, turn off Tabbed browsing?

    I can't find the Forum a useful answer to how to completely disable tabbed browsing in Firefox. I find it almost incomprehensible that Firefox would be forces me to use tabs, but disabling all the options in the section tabs of Options does not in fa

  • Satellite Pro 4600, memory upgrade

    I have twice had problems trying to upgrade memory to my Satellite Pro 4600, so I decided to ask directly if Kingston KTC-SO133/256 MB is compatible with this machine? It's the SODIMM I'm about to try next, but I have to pay for it first. Problems we

  • The Win32 Api hook

    I did a scan Trend Micro Housecall, he said: I have 1 problem he can't fix: Hooked_Service_API, Service Api: ZwTerminateProcess Image path: C:\Windows\System32\Drivers\SPINProc.sys Manager of origin: Service 0x805c866a CurrentHandler 0xeee9f416 numbe

  • Cannot drag down to set cinema mode

    Hello. I don't know how much time there, but I noticed that I can't drag to set cinema mode or similar.The touch works very well (or I think) in other Situations, because I can slide down, scrolling in the menu, etc. But when it is in the face of the

  • !! 0xc01a001d! 28333/89662 (register/Machine/COMPONENTS/DerivedData...)

    Hey I install SP2 you when the system is on the rise and running so he came a message that is! 0xc01a001d! 28333/89662 (register / Machine / component /DerivedData...) Reception recognizing answers David muller