×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Cool Again Wap VS Internet connections

    I've read couple of threads about this, but were too specific on some operators and not really clear on what is happening.

    I've developed a midlet wich download txt data from my webserver.
    I've tested on:
    gprs internet connection: OK
    wi-fi connection: OK
    gprs wap connection: KO

    I've tested on 9500 and 6600 and some other models and seems the problem is the same: everything is great with "internet connection" but not with the "wap connection".
    A little note: with the phone's browser I can access the webserver with both connections.

    The code I use to connect (taken from Sun website) is:
    c = (HttpConnection)Connector.open(createUrl());
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty( "User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0" );
    c.setRequestProperty("Content-Language", "en-US" );

    What I've got is that:
    - wap connections are passing thought a wap gateway that does something "in the middle"
    - on my webserver I can see the client connecting only with "internet" while with "wap" the server does not receive any request when using the midlet
    - same thing is not true if using the phone internal browser

    Does anyone has a solution to this ? Can I use something on a "lower level" than HttpConnection ?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Why are you setting the user-agent? Do you get two such user-agents fields in your webserver log file when connecting via Internet?

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Re: Again Wap VS Internet connections

    Quote Originally Posted by traud
    Why are you setting the user-agent? Do you get two such user-agents fields in your webserver log file when connecting via Internet?
    No, but infact is the same even without the two lines.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Lightbulb Re: Again Wap VS Internet connections

    So, I think this is the point:

    On phones we have 2 ways to get content from a generic web page:

    - Over IP-based connection (classic Internet connection)
    This is well known TCP/IP as usual and is transparent, what you send is what you get using a socket.

    - Over non-IP-based connection (wap and i-mode)
    This is a different protocol, WSP, and is used by wap gateways, that is what you send has to be interpreted by the wap gateway/proxy whom connects to your webserver, read the contents, compress it and send it back to the application. The communication between the wap gateway and the midlet is done via packets.
    Infacti is quite difficult to debug what is happening here.

    If your phone is midp1.0 then does have

    So, here is the point:

    If your j2me midlet needs to talk to a servlet/webpage you need to use Internet gprs connections - if you want to use a wap connection then you need your own wap gateway.

    Am I right ?

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    No.
    It depends on your settings and the used proxy. Today with WAP 2.0, the Proxy is just a HTTP Proxy forwarding your message. When it works via the internal browser, it should work via a MIDlet, too.

    I guess it is a misconfiguration. Which phone model are you using?

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Re: Again Wap VS Internet connections

    Quote Originally Posted by traud
    I guess it is a misconfiguration. Which phone model are you using?
    Tryed Nok600 Nok9500 and a older motorola

    Quote Originally Posted by traud
    misconfiguration
    Misconfiguration of what if the midlet works on internet connection perfecly and I can wap any page with a wap connection ?
    What could it be ?

  7. #7
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Again Wap VS Internet connections

    Hello,

    MIDP Connectivity
    HTTP can either be implemented using IP protocols (such as TCP/IP) or non-IP protocols (such as WAP and i-mode), because the MIDP extends CLDC connectivity to provide support for a subset of the HTTP protocol.
    .. . .
    . Important Note: All MIDP implementations must provide support for the HTTP protocol. It is up to the implementors to support datagram connections. It is recommended, however, to use only protocols supported by MIDP (e.g. HTTP) because this will allow the application to be portable across all mobile information devices. .

    The idea of having MIDP support the HTTP protocol is very clever. For network programming, you can revert to the HTTP programming model, and your applications will run on any MIDP device, whether it is a GSM phone with a WAP stack, a phone with i-mode, a Palm VII wireless, or a hand-held device with Bluetooth.
    http://developers.sun.com/techtopics...icles/network/

    I've just tried (N6680) and what stated and what traud posted is correct,
    I've used OperaMini and my midlet (HttpConnection) with "WAPGRPS" access point of my provider and both worked fine,
    it really could be either configuration issue or provider issue,

    regards,
    Peter

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Arrow Re: Again Wap VS Internet connections

    Quote Originally Posted by peterblazejewicz
    it really could be [cut] provider issue

    regards,
    Peter
    Thanks Peter, I think it could be a provider issue, could you send me the midlet you tested ? I'm very curious to test it here in Italy - Are you using "SecondExample" taken from that page you linked ? If so, well I've tested it also and got the same issue.

    thanks
    Julien

  9. #9
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Again Wap VS Internet connections

    hi Julien,

    that's not depends on application,
    any midlet should work using HttpConnection,
    for example upload Demos.jar from standard Sun WTK 2.2 distrubution ({Install_dir}\WTK22\apps\Demos\bin\Demos.jar) and it should work,
    "Http" midlet in that suite uses HttpConnection to test Get/Post/Head requests
    and as far as I can test it works on "WAPGRPS" apn on my device (6680),

    regards,
    Peter

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    33

    Angry Re: Again Wap VS Internet connections

    Well, I've installed my application on a Nokia7710 and the behaviour is the same.
    Internet connection feels ok, Wap connection don't.

    I've also tested on the 2 major italian operators (TelecomItaliaMobile and Vodafone) and the stuff is the same.

    I don't know if this counts, but I've noticed that the internal brower can install OTA applications only if using the WAP connection and not the Internet connection.

    I can't really figure out what can be the problem... I'm really thinking now..

Similar Threads

  1. Wap And Internet
    By mreaves in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2005-03-19, 19:22
  2. Different between WAP AP & Internet AP?
    By KK_Dog in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-02-05, 03:11
  3. 7250i wap vs internet connection
    By pkallioniemi in forum OMA DM/DS/CP
    Replies: 2
    Last Post: 2004-01-15, 13:36
  4. Midlet connecting via internet APN instead of WAP APN
    By roarl in forum Mobile Java General
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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