×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    1

    HttpConnection, does it use the WAP gateway?

    As I understand, Series 40 phones do not support socket connections, with the exception of 6800 and 6850 (are there others? does 3200 support sockets?).

    The only connection method available is HttpConnection. Suppose that the underlying bearer is CSD. When using HttpConnection, does the URL get parsed, and a TCP connection (HTTP) is opened to the specified server OR does it go through the WAP gateway, using WSP to connect to gateway and passing the URL to the gateway which, in turn, accesses the specified website?

    In this latter case (phone->WSP->gateway->HTTP->server), what happens if the response from the server is not WML? Does it get dropped by the server or does it get passed AS IS to the client (phone)?

    Specifically, is there a way to access HTML pages through a WAP gateway?

    More generally, is there a way to transfer binary data over HTTP through a WAP gateway (WSP-HTTP)?

    In case, the answers are (as I suppose):
    - HttpConnection connects through the WAP gateway
    - you can only access WML, WMLScript, WBMP etc (but not HTML) through a WAP gateway

    then how does the Nokia XHTML over WAP 1.2.1 stack browser (such as in the Nokia 3200) work? Does it use some kind of non-public API (native calls)?

    Thanks for any info,
    Catalin Drula
    M.Sc. (in progress)
    University of Toronto

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    HttpConnection & WAP GW

    Hi!

    I've been trying to access PHP pages over WAP as well, and it seems I'm stuck at the point where I try to read the output of the HttpConnection.

    What I do is I open a HttpConnection to a PHP script disguised as a WML page. The filename and content-type are set accordingly so that it looks like a regular WAP page. I send two parameters, a username and a password, as GET parameters. Finally, I open the connection's DataInputStream and read the data until the end of the stream is reached.

    On the WTK emulator all of this works perfectly. On my 7210, however, when I print out the reply of the server, I get only a String "[B@11eaa96" instead of the key-value pairs I'm expecting. The logs on the Apache server show that the request is received correctly.

    Bypassing the WAP GW and using a direct mobile Internet GPRS connection is not an option because of the inconvenience of the configuration. (Actually, I haven't even got my direct connection to work at all...)

    In case anyone has a suggestion on how to remedy this, I would be really grateful.

    Cheers,
    Niko Salminen

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    18
    Hi,

    i am not sure what you mean. Accessing e.g. the source-code of a WWW HTML-Page from my Phone seems to be no problem. I live in Germay, maybe this is provider/operator dependent?

    I've heard that for GPRS sometimes underneath HTTP lies TCP/IP and sometimes WAP GW, although I think it must always be at the end a WAP GW.

    So my question: Have you tested the MIDlet Networking Examples provided by Nokia here in this forum or the Sun examples? They should work...

Posting Permissions

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