首页 新闻 会员 周边 捐助

如何模拟这个XHR(xmlhttprequest)客户端请求?

0
悬赏园豆:20 [已关闭问题] 关闭于 2011-04-12 11:36

http://v3.espacenet.com/publicationDetails/inpadoc?CC=CN&NR=101433645A&KC=A&FT=D&date=20090520&DB=EPODOC&locale=en_gb

我想获得这个页面上的的部分信息如下:

CN F 200810042683   A (Patent of invention)
  PRS Date : 2009/05/20
  PRS Code : C06
  Code Expl.: +   PUBLICATION
  PRS Date : 2009/07/15
  PRS Code : C10
  Code Expl.:   REQUEST OF EXAMINATION AS TO SUBSTANCE

但是,这个页面总共向服务器发送了两次请求,(我用firefox的插件firebug捕获到的),第一个请求用Httpwebrequest可以很轻松得到,但是第二个很难,怎么搞都得不到正确的响应:

Host: v3.espacenet.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: PGS=10; menuCurrentSearch=http%3A%2F%2Fworldwide.espacenet.com%2FsearchResults%3FDB%3DEPODOC%26ST%3Dsingleline%26compact%3Dfalse%26locale%3Den_EP%26query%3Dfluoxetine; LevelXLastSelectedDataSource=EPODOC; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en_GB; JSESSIONID=E4D6210709A9DBF3FF1A5FD43ABF3562.espacenet_levelx_prod_7
Cache-Control: max-age=0

请求二:

Host: v3.espacenet.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: text/plain; charset=UTF-8
Referer: http://v3.espacenet.com/publicationDetails/inpadoc?CC=CN&NR=101433645A&KC=A&FT=D&date=20090520&DB=EPODOC&locale=en_gb
Content-Length: 388
Cookie: PGS=10; menuCurrentSearch=http%3A%2F%2Fworldwide.espacenet.com%2FsearchResults%3FDB%3DEPODOC%26ST%3Dsingleline%26compact%3Dfalse%26locale%3Den_EP%26query%3Dfluoxetine; LevelXLastSelectedDataSource=EPODOC; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en_GB; JSESSIONID=E4D6210709A9DBF3FF1A5FD43ABF3562.espacenet_levelx_prod_7
Pragma: no-cache
Cache-Control: no-cache

但是对于第二个请求,我怎么模拟都不能够得到正确的响应。

还望高手赐教。

谢谢。

问题补充: 用fiddler捕获的请求二的内容: POST http://v3.espacenet.com/dwr/call/plaincall/jsInpadocDataRetrievalHelper.getLegalData.dwr HTTP/1.1 Host: v3.espacenet.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-cn,zh;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Content-Type: text/plain; charset=UTF-8 Referer: http://v3.espacenet.com/publicationDetails/inpadoc?CC=CN&NR=101433645A&KC=A&FT=D&date=20090520&DB=EPODOC&locale=en_gb Content-Length: 388 Cookie: PGS=10; menuCurrentSearch=http%3A%2F%2Fworldwide.espacenet.com%2FsearchResults%3FDB%3DEPODOC%26ST%3Dsingleline%26compact%3Dfalse%26locale%3Den_EP%26query%3Dfluoxetine; LevelXLastSelectedDataSource=EPODOC; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en_GB; JSESSIONID=E4D6210709A9DBF3FF1A5FD43ABF3562.espacenet_levelx_prod_7 Pragma: no-cache Cache-Control: no-cache callCount=1 page=/publicationDetails/inpadoc?CC=CN&NR=101433645A&KC=A&FT=D&date=20090520&DB=EPODOC&locale=en_gb httpSessionId=E4D6210709A9DBF3FF1A5FD43ABF3562.espacenet_levelx_prod_7 scriptSessionId=4CC8C05C6AD251CFFEA281499CDDE97E306 c0-scriptName=jsInpadocDataRetrievalHelper c0-methodName=getLegalData c0-id=0 c0-param0=string:CN%20101433645A%20A%20D c0-param1=boolean:false batchId=0
chzhcpu的主页 chzhcpu | 初学一级 | 园豆:120
提问于:2011-04-06 10:29
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册