2016-11-07 73 views
1

向Yodlees Fastlink API发出请求,特别是向Fastlink Sandbox Environment发出请求。有问题的端点是:HTTP请求在web上运行,但在移动设备上失败? (Yodlee API)

https://node.developer.yodlee.com/authenticate/restserver/

我们通过适当的PARAMS:

rsession:XXXXXXXXXXXXX 
app:10003600 
redirectReq:true 
token:XXXXXXXXXXXXX 
extraParams: 

而且收到以下成功的HTML响应:

<!DOCTYPE html> 
<html> 
    <head> 
     <title>Fast Link</title> 
     <meta charset="utf-8"> 
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0"> 
     <link rel="stylesheet" type="text/css" href="/v5/combo?/brands/default/css/scss/loader.css"> 
    </head> 
    <body> 
     <form action="/finapp/10003600/?brand=XXXXXXXX&amp;id=10003600&amp;appId=XXXXXXXX&amp;channelId=-1&amp;version=1010.45&amp;status=published&amp;c=csit_key_0:XXXXXX=&amp;finappCDNURL=&amp;resturl=httpsXX.XX.XX.XX%2Fservices%2Fsrest%2Frestserver&amp;l=" method="post" id='form'> 
      <input type='hidden' name ='rdata' value ='XXXXXX' /> 
      <input type='hidden' name ='capp' value ='restserver' /> 
      <input type='hidden' name ='userId' value ='XXXXXXXXX' /> 
      <input type='hidden' name ='firmId' value ='' /> 
     </form> 
     <div class="inline-spinner"></div> 
     <script> 
function getCookie(k){var v=document.cookie.match('(^|;) ?'+k+'=([^;]*)(;|$)');return v?v[2]:false}; 
    var error = false; 
    var isCookieSupported = getCookie('isCookie'); 
    var whichBrowser = "CHROME"; 
    if (typeof isCookieSupported != 'undefined' && !isCookieSupported){ 
     try{ 
      sessionStorage.setItem("rdata", "XXXXXXXX"); 
      sessionStorage.setItem('prefs', '{&quot;currencyCode&quot;:&quot;USD&quot;,&quot;dateFormat&quot;:&quot;MM/dd/yyyy&quot;,&quot;timeZone&quot;:&quot;PST&quot;,&quot;decimalSeparator&quot;:&quot;.&quot;,&quot;groupingSeparator&quot;:&quot;,&quot;,&quot;groupPattern&quot;:&quot;###,##0.##&quot;,&quot;groupSize&quot;:0,&quot;currencyNotation&quot;:&quot;SYMBOL&quot;,&quot;locale&quot;:&quot;en_US&quot;,&quot;segmentId&quot;:&quot;-1&quot;}'); 
     } 
     catch(e){ 
      var isOLB = "" 
      var ssoDomain = "" 
      var postSource = "" 
      var query = 'brand=' + XXXXXXX +'&app='+ 10003600 + '&appId=' + 'XXXXXX' + '&cookieDisabled=true' 
         + '&version=' + '1010.45' +'&status=' + 'published'; 

      if (isOLB !=""){ 
       query= query + '&isOLB=true'; 
      } 

      if (ssoDomain !=""){ 
       query= query + '&ssoDomain=' + ssoDomain; 
      }  
      if (postSource !=""){ 
       query= query + '&postSource=' + postSource; 
      } 
      window.location.href='/apperror/?' + query; 
      var error = true; 
     } 
    } 
    //sessionStorage.setItem("capp", "restserver"); 
    if (!error){ 
     document.getElementById("form").submit(); 
    } 
</script> 
    </body> 
</html> 

然而,当我们做完全相同的请求从Android应用REST客户端,它超时。桌面客户端的响应时间少于500毫秒。

这两个平台之间发生了什么不同?

+0

如何在HTTP会话样子正是在这两种情况下?也许有一些差异。它也可能是你的Android设备和目标服务器(路由器/ corpoproxy /防火墙)之间的东西。你是否测试完全相同的网络配置? – jannis

回答

0

我们建议您在HTML表单的帮助下启动FastLink [FL]。在示例HTML表单(下面)中,您需要使用最新的rsession和令牌值进行更新并启动FL2。

<!DOCTYPE html> 
 
<html> 
 
<title>Invoke FastLink 2.0</title> 
 
<body> 
 

 
<table> 
 
<form action="https://node.developer.yodlee.com/authenticate/restserver/" method="POST"> 
 
\t <tr> 
 
\t \t <td>FinAppId's</td> 
 
\t \t <td>::</td> 
 
\t \t <td> \t <input type="text" name="app" value="10003600" /> \t </td> 
 
\t </tr> 
 
\t 
 
\t <tr> 
 
\t \t <td>UserSession</td> 
 
\t \t <td>::</td> 
 
\t \t <td> \t <input type="text" name="rsession" value="XXXXXXXXXXXX"/> \t </td> 
 
\t </tr> 
 

 
\t <tr> 
 
\t \t <td>Access Token</td> 
 
\t \t <td>::</td> 
 
\t \t <td> \t <input type="text" name="token" value="XXXXXXXXXXXX"/> \t </td> 
 
\t </tr> 
 

 
\t <tr> 
 
\t \t <td>RedirectReq</td> 
 
\t \t <td>::</td> 
 
\t \t <td> \t <input type="text" name="redirectReq" value="true"/> \t </td> 
 
\t </tr> 
 
\t 
 
\t <tr> 
 
\t \t <td>Extra Params</td> 
 
\t \t <td>::</td> 
 
\t \t <td> \t <input type='text' name='extraParams' value='callback=http://www.google.co.in/'/> \t </td> 
 
\t </tr> 
 
</table> 
 
\t 
 
\t <input type="submit" name="Submit" /> 
 
</form> 
 

 
</body> 
 
</html>