×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    25

    Lightbulb Making a HTTPConnection in MIDP 2.0

    Hello all,

    I have some questino regarding to the HttpConnection in MIDP 2.0. I have a httpConnection program that work with MIDP 1.0, but not workin with MIDP 2.0. Later on, I read that there're more security issue being implemented in the MIDP 2.0. My question is, how can I initiate a HttpConnection through MIDP 2.0 which is untrusted and not yet signed ? (I assume that once you sign the application, the connection will be granted)
    Hope that anyone can help me


    Regards,


    dark

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    What works in MIDP 1.0 should work in MIDP 2.0 without any changes. If the application is not signed all it means is that the user will get the usual popup asking for permission.
    Chances are that the problem is in the phone's connection settings. You can check out the faq at reqwireless.com, they have instructions to set up the connectivity for a large number of phones for many different network operators.

    shmoove

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    25

    Is it?

    I must say that I can't agree with you shmoove. I was using the same application, same network operator, and i set all the things myself and double check it manually. it was using Nokia 6260(MIDP 2.0), Nokia 6600(MIDP 2.0), Nokia 7650, Siemens SL55. and it throw security exception in all MIDP 2.0, and work well on 7650 and Siemens. So I really can't say that the problems lie on the network setting. I tried also to make a web connection(using phone browser) everytime I set my card in those phone and they're all working. Beside if you open the WTK1 emulator, and WTK2 emulator, you'll see there is difference in the project setting. WTK2 has Permission Tab, while WTK1 don't. If you claim that it work with no problem, I hope than you can give me your private mail, so that I can send my aplication to you to test in MIDP 2.0. Who knows I make a mistake in the code hehehehe, and I hope you can help me with the mistake. Shall I post the source code for you to be reviewed?


    Regards,

    Dark

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Well, same application and network is not enough. Different phones havfe different configurations that work for them in Java. Being able to browse using the microbrowser is not a guarantee that the networking will work with MIDlets. They often have different configurations.

    The only difference with MIDP 2.0 is those permission attributes in the jad but I've deployed without them many times and didn't have problems. The SecurityException will be thrown only if the user declines the permissions. Since I always catch Exceptions (as opposed to IOExceptions) that never caused problems.

    Still, if you want to request the permissions it's pretty simple:
    Code:
    MIDlet-Permissions: javax.microedition.io.Connector.http
    http://developers.sun.com/techtopics...s/permissions/

    shmoove

  5. #5
    Registered User
    Join Date
    May 2004
    Posts
    25

    Some new clue....

    Hello Shmooove, I still haven't managed to make the
    HttpConnection work properly in my Nokia 6260 phone. I have a clue from someone that I should something like :
    ' wap traffic = java traffic '

    Have you ever heard of this thing? I try to look at the cellphone configuration and didn't find it. Or maybe its for the setRequestProperty method??

    THanks,


    dark

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    What network are you on? I know that some MIDP2 phones seem to have problems connecting by HTTP on certain networks.

    Graham.

  7. #7
    Registered User
    Join Date
    May 2004
    Posts
    25

    Symbian error code???

    yooo, I sit in the T-Mobile network.
    once I tried the apps using a Siemens SL55 and it works.
    now I mostly do my testing with Nokia 6260.
    I just try to install the Http Demo from the WTK 2.
    Somebody in a forum claim that the application should work on real phone. I tried to install it and guess what, I got a

    Symbian OS error:-5120 DNS not found.

    i try to connect to the yahoo website and it works well with the emulator. Is it a problem of the Symbian OS?? or must I asked some special setting from T-Mobile?


    Regards,


    Dark

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    T-Mobile from what country?

    I will again forward you to the Reqwireless site to look for your APN.

    shmoove

  9. #9
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    Yup, sounds like your phone isn't configured right. Follow shmoove's link, and check the connection setting for that application.

    Graham.

  10. #10
    Registered User
    Join Date
    May 2004
    Posts
    25

    OOh MY GODDD!!!!

    OOH MY GODDDD!!! ITS ALIVEEEE!!!
    My My My, i have been busy with it for two weeks, and guess what, I just change the APN to "internet" instead of "wap"!!!!!!!

    You guys are great, I owe you all for this solution. Thanks to Shmoove and Graham who helped me solve this problem. I have one question left, so when the configuration don't work for other cellphone, I just simply need to change the APN then??
    its very strange since this is the setting I receive from T-Mobile Netherland, so I was thinking that it is correct ( damn SH** provider ??!! GRMBLL).Thanks again for the support, I'm really happy when this problem already solved. This kind of information as shown by the reqwireless, can it be found on the provider website??


    Regards,


    Dark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×