-1

我有一些错误

原因:FWLSE0099E:调用过程 [project EMoney]InquiryAdapters/HttpRequestFWLSE0100E 时出错:参数:[project 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.RuntimeException :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:连接超时:连接

查询适配器.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>

查询适配器.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 适配器)时。

4

1 回答 1

1

如果您已执行后续步骤但收到“连接超时”错误,您可能遇到了与 MobileFirst Platform 6.3 无关的网络问题:检查是否有任何防火墙阻止您连接到 CNN.com

  1. 创建了一个新项目
  2. 创建一个新的 HTTP 适配器
  3. 右键单击适配器文件夹 > 部署 MobileFirst 适配器
  4. 右键单击适配器文件夹 > 调用 MobileFirst Adapter

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

于 2015-03-31T05:21:26.050 回答