Discussion Board

Results 1 to 4 of 4
  1. #1
    Nokia Developer Expert widsets's Avatar
    Join Date
    Feb 2008
    Posts
    29
    因为CMWAP接入点加入了拦截页面,所以http请求无法得到正确内容,如何解决?

  2. #2
    Registered User qr11121223's Avatar
    Join Date
    Jul 2008
    Posts
    16
    Quote Originally Posted by widsets View Post
    因为CMWAP接入点加入了拦截页面,所以http请求无法得到正确内容,如何解决?
    试试在服务端加一个标记,根据这个标记来判断是不是正确的信息...

  3. #3
    Registered User mawei1981's Avatar
    Join Date
    Nov 2004
    Location
    china
    Posts
    21
    Quote Originally Posted by qr11121223 View Post
    试试在服务端加一个标记,根据这个标记来判断是不是正确的信息...
    cmwap加了拦截,根本到不了你的服务端,你加了标记也没用。

    在widget中判断,如果请求获得的返回流不是你所期望的,那么再去取一次。即解决这个问题。譬如返回文本中带有wapforum,那么即认为他是cmcc的无聊页面,就再去请求一次咯。

  4. #4
    Nokia Developer Expert widsets's Avatar
    Join Date
    Feb 2008
    Posts
    29
    WRT中如果用的是GET方式请求,程序在CMWAP连接网络后第一次请求得到的是‘移动资费提醒页’。解决办法:程序启动后,先做一次无效请求(IP或域名必须是之后要使用的正式接口的IP或域名),以便通过验证并保持连接。
    如果用POST请求,则可以绕过移动网关验证,所以不需要在程序里做特别处理,并且第一次POST请求并连接网络后,就算是有GET请求网关也不会再做验证。

    所以如果服务器端接受的话,建议所有请求都使用POST方式。

Similar Threads

  1. XMLHttpRequest statud undefined
    By a.sichel in forum Symbian Web Runtime
    Replies: 12
    Last Post: 2009-05-19, 09:03
  2. XMLHTTPRequest Object - JavaScript & Ajax
    By jojos in forum Mobile Web Site Development
    Replies: 12
    Last Post: 2008-09-29, 12:20
  3. Sync XMLHttpRequest crashes the emulator.
    By ashishnm in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2007-12-07, 16:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved