2015-03-31 73 views
-1

我有一些误差如何调用适配器混合应用MobileFirst平台6.3

引起:FWLSE0099E:在调用程序[项目EMoney]出错InquiryAdapters/HttpRequestFWLSE0100E:参数:[项目EMoney] Http请求失败:org.apache.http.conn.HttpHostConnectException:连接到rss.cnn.com:80 [rss.cnn.com/74.125.200.121]失败:连接超时:连接

FWLSE0101E:导致:[project EMoney] org.apache.http.conn.HttpHostConnectException:连接到rss.cnn.com:80 [rss.cnn.com/74.125.200.121]失败:连接超时:connectjava.lang.Runtim eException:Http请求失败:org.apache.http.conn.HttpHostConnectException:连接到rss.cnn.com:80 [rss.cnn.com/74.125.200.121]失败:连接超时:连接

引起: org.apache.http.conn.HttpHostConnectException:连接到rss.cnn.com:80 [rss.cnn.com/74.125.200.121]失败:连接超时:连接

引起:java.net.ConnectException:连接超时:连接

inquiryAdapters.xml

<wl:adapter name="InquiryAdapters" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:wl="http://www.ibm.com/mfp/integration" 
xmlns:http="http://www.ibm.com/mfp/integration/http"> 

<displayName>InquiryAdapters</displayName> 
<description>InquiryAdapters</description> 
<connectivity> 
    <connectionPolicy xsi:type="http:HTTPConnectionPolicyType"> 
     <protocol>http</protocol> 
     <domain>rss.cnn.com</domain> 
     <port>80</port> 
     <connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds> 
     <socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds> 
     <maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode> 
     <!-- Following properties used by adapter's key manager for choosing specific certificate from key store 
     <sslCertificateAlias></sslCertificateAlias> 
     <sslCertificatePassword></sslCertificatePassword> 
     -->  
    </connectionPolicy> 
</connectivity> 

<procedure name="getStories"/> 

<procedure name="getStoriesFiltered"/> 

<procedure name="getFeedsFiltered"/> 
</wl:adapter> 

inquiryAdapters.impl

function getStories(interest) { 
path = getPath(interest); 

var input = { 
    method : 'get', 
    returnedContentType : 'xml', 
    path : path 
}; 
return WL.Server.invokeHttp(input);} 


function getStoriesFiltered(interest) { 
path = getPath(interest); 

var input = { 
    method : 'get', 
    returnedContentType : 'xml', 
    path : path, 
    transformation : { 
     type : 'xslFile', 
     xslFile : 'filtered.xsl' 
    } 
}; 

return WL.Server.invokeHttp(input);} 


function getFeedsFiltered() { 

var input = { 
    method : 'get', 
    returnedContentType : 'xml', 
    path : "rss.xml", 
    transformation : { 
     type : 'xslFile', 
     xslFile : 'filtered.xsl' 
    } 
}; 

return WL.Server.invokeHttp(input);} 


function getPath(interest) { 
if (interest == undefined || interest == '') { 
    interest = ''; 
}else { 
    interest = '_' + interest; 
} 
return 'rss/edition' + interest + '.rss';} 
当我要调用的适配器(HTTP适配器)

+1

你能告诉你如何调用适配器吗? “www.w3schools.com”与它有什么关系? – 2015-03-31 04:35:12

+0

我喜欢教程https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/invoking-adapter-procedures-hybrid-client-applications/ – user3879559 2015-03-31 04:51:26

+1

@ user3879559,你没有回答这个问题 - 你在代码中修改了什么,错误提到了w3schools?这个错误无法表现出来。用您正在使用的实际代码编辑问题。 – 2015-03-31 04:53:00

回答

1

如果按照下面的步骤还没有收到“连接超时”的错误,你可能有一个网络问题无关MobileFirst平台6.3:检查是否有阻止您进行连接,以到达CNN.com

任何防火墙
  1. 创建一个新的项目
  2. 创建一个新的HTTP适配器适配器文件夹
  3. 右键单击>部署MobileFirst适配器
  4. 右键单击文件夹适配器>呼叫MobileFirst适配器

现在带有响应的浏览器窗口应该已打开。

+0

好的谢谢你先生这个问题修复 – user3879559 2015-03-31 05:39:01

+0

多一个先生,我有webservice,我按照这一步“https://developer.ibm。com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/invoking-adapter-procedures-hybrid-client-applications /“当我想预览我的应用时,我现在得到”连接超时“防火墙是在 然后当防火墙关闭可以预览,但我有错误“无法获取未定义或空引用的属性changepage”在JavaScript中你知道它是什么? – user3879559 2015-03-31 06:15:58

相关问题