Ibm mobilefirst 适配器在我的测试设备中未按预期工作
我已经开始在IBMWeb控制台和android移动浏览器模拟器中成功地开发和实现适配器。但是,当安装在我的真实测试设备中时,适配器无法连接到数据库。我不知道在手机上哪里可以找到错误日志Ibm mobilefirst 适配器在我的测试设备中未按预期工作,ibm-mobilefirst,mobilefirst-adapters,Ibm Mobilefirst,Mobilefirst Adapters,我已经开始在IBMWeb控制台和android移动浏览器模拟器中成功地开发和实现适配器。但是,当安装在我的真实测试设备中时,适配器无法连接到数据库。我不知道在手机上哪里可以找到错误日志 currentPage={}; currentPage.init = function() { WL.Logger.debug("Page2 :: init"); }; currentPage.back = function(){ WL.Logger.debug("Page2 :: back
currentPage={};
currentPage.init = function() {
WL.Logger.debug("Page2 :: init");
};
currentPage.back = function(){
WL.Logger.debug("Page2 :: back");
$("#pagePort").load(pagesHistory.pop());
};
function loadSQLRecords(){
var invocationData = {
adapter : 'dball',
procedure : 'getDball',
parameters : []
};
WL.Client.invokeProcedure(invocationData,{
onSuccess : loadSQLQuerySuccess,
onFailure : loadSQLQueryFailure
});
}
function loadSQLQuerySuccess(result){
alert ("success");
if (result.invocationResult.resultSet.length > 0)
displayFeeds(result.invocationResult.resultSet);
else
alert("failure here");
}
function loadSQLQueryFailure() {
alert ("failure");
}
function displayFeeds(result){
for (var i = 0; i < result.length; i++) {
$("#mytable").append("<tr><td>" + result[i].EMPID + "</td></tr>");
$("#mytable").append("<tr><td>" + result[i].EMPNAME + "</td></tr>");
$("#mytable").append("<tr><td>" + result[i].EMAILID + "</td></tr>");
}
}
currentPage={};
currentPage.init=函数(){
调试(“Page2::init”);
};
currentPage.back=函数(){
调试(“Page2::back”);
$(“#pagePort”).load(pagesHistory.pop());
};
函数loadSQLRecords(){
变量调用数据={
适配器:“dball”,
过程:“getDball”,
参数:[]
};
WL.Client.InvokeProcess(调用数据{
onSuccess:loadSQLQuerySuccess,
onFailure:loadSQLQueryFailure
});
}
函数loadSQLQuerySuccess(结果){
警惕(“成功”);
if(result.invocationResult.resultSet.length>0)
displayFeeds(result.invocationResult.resultSet);
其他的
警报(“此处故障”);
}
函数loadSQLQueryFailure(){
警报(“故障”);
}
函数displayFeeds(结果){
对于(变量i=0;i
-
-
戴尔
戴尔
-
-
-
-
-
-
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@192.168.*:***:***:***:***
****
****
-
我接受了你的项目并更改了数据库设置,改为连接到我的(MySQL)。连接成功,数据保存在数据库中
即使强制它失败,它也不会因为“Error is UNDEFINED”而失败,所以我仍然相信这与您的Oracle数据库设置有关。192.168是内部IP地址-即使您认为它是公共IP地址,它也不能作为公共IP地址使用。事实并非如此。您需要与您的IT部门核实这一点,并获得数据库的真实IP地址。1)将适配器XML添加到问题2)设备是否与服务器所在的主机连接到同一网络?我正在使用ecliplse插件mobile frirst studio,以便将服务器集成到同一台机器中。我可以访问服务器url通过我的测试设备浏览器。回答我的两个问题。设备必须与主机连接到同一网络,以便适配器在设备中测试时工作。是的,两者都在同一网络使用您的公共IP地址而不是192.168…好的,您能告诉我为什么我们需要将其更改为公共可用,因为我只尝试连接到适配器,而不是直接连接到后端服务吗?192.168不是公共IP地址。它是一个本地IP地址。它不是要使用的正确地址。你真的和你公司的IT管理员谈过吗?是的,他说这只是一个外部ip地址。如果我尝试连接到你的“外部ip地址”,它将失败,因为它不是一个公共IP地址。你尝试过了吗?我没有提供IP本身。无论如何,有人遇到过这个问题吗?它运行在我的控制台上,也运行在移动浏览器模拟器上,但不在测试设备中。我有一个演示tmrw
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2011, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-->
- <wl:adapter name="dball" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wl="http://www.ibm.com/mfp/integration" xmlns:sql="http://www.ibm.com/mfp/integration/sql">
<displayName>dball</displayName>
<description>dball</description>
- <connectivity>
- <connectionPolicy xsi:type="sql:SQLConnectionPolicy">
- <!-- Example for using a JNDI data source, replace with actual data source name
-->
- <!-- <dataSourceJNDIName>java:/data-source-jndi-name</dataSourceJNDIName>
-->
- <!-- Example for using MySQL connector, do not forget to put the MySQL connector library in the project's lib folder
-->
- <dataSourceDefinition>
<driverClass>oracle.jdbc.driver.OracleDriver</driverClass>
<url>jdbc:oracle:thin:@192.168.*.***:****:****</url>
<user>****</user>
<password>****</password>
</dataSourceDefinition>
</connectionPolicy>
</connectivity>
- <!-- Replace this with appropriate procedures
-->
<procedure name="getDball" />
<procedure name="addDball" />
</wl:adapter>