中国移动/电信/联通的WAP 2.0网关不约而同地,
只支持http协议访问,即规范里面的“Wireless Profiled HTTP With WAP Proxy”
不支持TCPIP socket协议访问,即规范里面的“Wireless Profiled TCP with WAP Proxy”
所以,在黑莓手机上面,用WAP2通道访问http://www.baidu.com:80都没有问题。
但是用WAP2通道访问socket://www.baidu.com:80都返回错误代码,分别如下:
1)An error of type 401 occurred: Unauthorized(ChinaTelecom)
2)401 Unauthorized Request(from China Unicom)
3)ZCache-Control no cache. (China Mobile)
注:
虽然黑莓手机上面WAP 2.0 通道无法访问socket,但是你可以使用黑莓的Direct TCP通道(前提是手机的选项-> 高级选项 -> TCP IP设置了正确的APN)透过运营商的网络直接socket访问internet网络。
参考:
The WAP 2.0 conformance release
http://www.wapforum.org/what/technical.htm
Wireless profiled TCP Specification
WAP-225-TCP-20010331-a
ftp://po.istu.ru/public/docs/admin/protocols/wap/spec/WAP-225-TCP-20010331-a.pdf
Wireless profiled HTTP Specification
WAP-229-HTTP-20010329-a