Wap-Mobile phone side, Create a connection

Hei!! I'm a portuguese student, and I'm a beginner.

I want do an application to a mobile phone in Java, to connect a web site using WAP.

What I need do?? If some one can give me a example or steps to do that fine.

 - I don't know how begin a wap connection and how set the id addrss
  - I need AT COMMANDS ??? (how I do that?)

 Tanks bye bye

Vasco Mouta
ib00049Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jimmackCommented:
A WAP browser on your phone works just like an HTML browser on your desktop.  There is no need to deal with AT commands and things like that.

Where you would write HTML for a web page, you use WML for a WAP page.  Here is an example:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.x
ml">
<wml>
  <card id="card1" title="First card">
    <p>Welcome to the <strong> My First Card </strong> on my first WAP site.</p>
  </card>
</wml>

You just need to save this file on your web server and then enter the URL on your phone.  eg. If this file is saved as "index.wml" and your web server is at "http://www.myserver.com", on your WAP phone, you need to enter the URL as:

http://www.myserver.com/index.wml

You need to ensure that your web server supports the correct MIME types for WAP (most do):

wbmp  image/vnd.wap.wbmp
wml  text/vnd.wap.wml
wmlc  application/vnd.wap.wmlc
wmls  text/vnd.wap.wmlscript
wmlscriptc  application/vnd.wap.wmlscriptc

Have a look at this site too:

file:///usr/share/doc/WML/WML%20Overview.html
0
jimmackCommented:
Sorry ;-)  That link is on my local system.  It should have been:

http://developer.openwave.com/htmldoc/41/wmlref/front.html
0
ib00049Author Commented:
tanks men, i need that side to.

But what I want do is one application to run in the nokia mobile phone serie60, and when i begin this application i go to the site along, whithout insert the url name for the site.

You give me the solution to the page and no to the mobile application

Sorry about the Inglish

Thanks, if you can help in this to nice, the points gone to you

Vasco Mouta
0
Top Threats of Q1 & How to Defend Against Them

WEBINAR: Join WatchGuard CTO and our Threat Research Team on Aug. 2nd to hear the findings from our Q1 Internet Security Report! Learn more about the top threats detected in the first quarter and how you can defend your business against them!

jimmackCommented:
The Nokia series 60 phones have a built-in WAP browser (go to the Services menu and look for "Go to address" or "Go to URL" (or similar) where you can enter the URL).

Alternatively, you could store a bookmark for the site - to avoid having to enter the URL every time.

If you want to write your own application to access the site, you are looking at a *massive* project :-(
0
ib00049Author Commented:
yes, you are right!!!

But i realy need do this..

I need that my application have some communication with the web page.
0
jimmackCommented:
OK.  What programming languages have you used?

If you've used mainly Java, then you need to be looking at creating a J2ME application.  This (again) uses the http protocol to communicate across the network.

http://wireless.java.sun.com/allsoftware/

If you haven't used Java and you want to write native code for the device(s), then I can't really help much further.
0
ib00049Author Commented:
I have all software that i need etc. etc.
Yes if you can help me with this code is nice, like with an example..
0
jimmackCommented:
Have you written anything at all yet?

How much Java experience do you have (specifically J2ME)?

You're asking too much for 50 points - "This question is not important and easy (50 points)".

Here's a link that might help:
http://www.j2me.org/yabbse/index.php?board=10
0
ib00049Author Commented:
you are right but i don´t have to much points.

I only know do simple things nothing more.
 
I can do my simple applications in JAVA(J2ME) but i don't know yet how do this.

ib00049@alunos.deis.isec.pt  is you want privaciti :o)

if you can send me i little example to begin the connection, i try do the rest. I want finish my studies :o)

Tanks men again
0
jimmackCommented:
   private HttpConnection conn;
    private DataInputStream dis;

    private void openConnection(String url) throws IOException
    {
        conn = (HttpConnection)Connector.open(url);
        conn.setRequestProperty("connection", "close");
        dis = conn.openDataInputStream();
    }

    private void closeConnection()
    {
        try
        {
            if (dis != null)
            {
                dis.close();
            }

            if (conn != null)
            {
                conn.close();
            }
        }
        catch (IOException ioe)
        {
        }

        dis = null;
        conn = null;
    }

    public void manageConnection() throws IOException
    {
        openConnection("http://....");

        // Read any data you want here, eg:
        int anInteger = dis.readInt();
        String aString = dis.readUTF();

        closeConnection();
    }

Include your data/commands/instructions to the server in the URL that you use to open the connection (just as you would with a normal browser request), eg:

http://www.myhost.com?param1=abcd¶m2=1234
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Wireless Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.