|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
WML - Emulators work, actual phones cant access index.wml
Hi guys, I'm new to wml and have been on this site all week learning and now I'm trying to create a sample wap portal to send games to a phone but having issues. our server is linux and running Apache and php5. I had my friend who knows linux put all the MIME types for .jar and .jad and .wml in where it should go. (I don't know linux). I think he said he made a separate mime file for them so that's the onlything different.
anyways, the OpenWave Simulator can load the portal and actually simulates downloading the game just fine. I also tried wapsilon emulator and it can see the portal and navigate up until the download because I'm spitting out the link in a .php file and wapsilon apparently doesn't like php. my issue is when testing on actual phones they can't even access the portal. I have no clue why. the Sanya Katana and 7400 say no result or no page displayed. the Trio says "WML content contains invalid syntax". another says "error, bad gateway. the proxy server received an invalid response from an upstream server". I ran my index.wml through a Validator at http://www.w3schools.com/wap/wml_validate.asp and it says it's fine. Here is the code for it just in case I'm missing something. index.wml (I only have Games as a link for testing) Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="Home" title="Fusion Mobile">
<img align="left" src="images/logo.png" alt="FusionMobile" />
<p>
<table columns="2">
<tr>
<td> <img src="images/Games.png" alt="games" /> </td>
<td> <anchor> <go href="Games.wml#games"/>games </anchor> </td>
</tr>
<tr>
<td> <img src="images/Ringtones.png" alt="Ringtones" /> </td>
<td>Ringtones</td>
</tr>
<tr>
<td> <img src="images/Wallpaper.png" alt="Wallpaper" /> </td>
<td>Wallpaper</td>
</tr>
</table>
</p>
</card>
</wml>
|
|
#2
|
|||
|
|||
|
i changed my index.wml and copy and pasted a tutorial "hello world" to make sure it wasn't my code... the actual phone could view wap.yahoo.com but not my basic hello world... so that tells me it has to do with the server. any ideas what to look for? the phones that can't acces it at all are Sanya Katana, 7400 i think, Trio but yet my friend with a blackberry can view it.
is there some file you have to have that detects what phone it is and does something so they can see your portal and download your game? OpenWave is telling me Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.Bc |
|
#3
|
||||
|
||||
|
Can you show your current code?
The first snippet you have shown is invalid wml for the header you are using... Is your server actually serving .wml as wml? You may want to consider using XHTML MP if your targeted device is a blackberry or other modern devices.
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
|
#4
|
|||
|
|||
|
Here's my stripped down index.wml
my target audience is all phones basically. sanya katana, treo, etc. from what I read my buddy set up the server so the default is index.wml and he put the mime types that I found for .wml, .jad, .jar. maybe I'm missing one? can you tell me what my header should be for any random phone to view this basic index.wml? I'll read up on xhtml mp and see if I can try that. should I switch to using wml 2.0 at least? index.wml Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="Home" title="Test">
<img align="left" src="images/logo.png" alt="Test" /> <br/>
<p>
<br/><img src="images/Games.png" alt="games" /> <a href="Games.wml#games">Games</a> <br/>
<img src="images/Ringtones.png" alt="Ringtones" /> Ringtones <br/>
<img src="images/Wallpaper.png" alt="Wallpaper" /> Wallpaper <br/>
</p>
</card>
</wml>
|
|
#5
|
|||
|
|||
|
I changed it to xhtml mp. let me know if this looks correct now for all phones to see
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>xHTML MP test</title>
</head>
<body>
<p><img src="images/logo.png" alt="logo" /></p>
<p><img src="images/Games.png" alt="Games" /><a href="Games.xhtml">Games</a></p>
<p><img src="images/Ringtones.png" alt="Ringtones" />Ringtones</p>
<p><img src="images/Wallpaper.png" alt="Games" />Wallpaper</p>
</body>
</html>
|
|
#6
|
||||
|
||||
|
You should have the following in the <head> of your document..
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Change the content to whatever you are sending the content as.. There are validators on the web that you can test pages offline as well as online(i.e. direct input) - try some of them out. See the WAP FAQs for more details on this.. Good luck. Making progress ![]() You may want to investigate png support for your targeted devices ![]() Last edited by jabba_29 : May 1st, 2008 at 03:56 AM. |
|
#7
|
|||
|
|||
|
ok, thanks for the heads up on the png. i changed them to .jpg and seem to work now. I'm a little confused as to when you put that meta tag in your <head>. If I just want to test sending them a .jar when they click a link below, when do I put the
<meta http-equiv="Content-Type" content="application/java-archive"> in? I can't put this meta in my Games.xhtml below because it won't load at all. can you look at code below and see what i need change to send a .jar when they click? thank you! Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
</head>
<body>
<p>Click game below to test download<br/><br/></p>
<p><a href="games/0001.jar"><img src="images/games/0001.jpg" alt="0001" /></a></p>
<p><a href="games/0002.jar"><img src="images/games/0002.jpg" alt="0002" /></a></p> <br/>
<p><a href="index.xhtml"><img src="images/Home.jpg" alt="Home" /></a></p>
</body>
</html>
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > WML - Emulators work, actual phones cant access index.wml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|