I'm searching a solution for a problem that may not ever happen in some countries.
I'm in China. China Mobile provides different packages for people who purchase different phones (SIM cards). One package may restrict users in some functions they can use. Others may not.
The problem occurs in one package that forbids users to access the HTTP access point, which means people who purchase this package can only surf WAP sites. This, I believe, results in the failure of http connections of MIDLets.
I came up with a hypothesis to wrap a http request to servlets to become a wap request that can be dealt with by a WAP gateway. However, I am not terribly familiar with the underlying mechanism of WAP, and how a WAP gateway distinguish whether an incoming request is a wap request or a http request.
Any technical hints or suggestion is extremely appreciated.
Http is a higher level protocol than WAP. On the wired internet it is usually transfered over tcp, but that is by no means because it has to be over tcp, just because tcp is the predominant transport protocol on the net. As far as specifications go, there is nothing stopping http from being delivered over WAP.
If we are talking about Java (this is the Java forum after all), then you can't but you don't have to. The HttpConnection class is just a high level abstraction, and the phone's software is the one that does all the work. You have no control over this work. The phone could implement your http request over WAP if it has been programmed for it (Nokia Series 40 phones do this for example).
So basically, you use the same code for WAP or internet access points, and it can work or not depending on if the phone supports it (like I said, Nokia Series 40 support it, the Sony Ericsson T610 can only use internet access points for instance).