2015-01-15 18 views
0

我已经为远程数据库创建了一个简单的SOAP Web服务,它在WebLogic 12c服务器和Jdeveloper HTTP分析器中工作正常。当我在下面的代码中使用相同的Web服务时,出现以下错误(我已将System.out.println输出包含在代码流中)我正在使用Jdeveloper 12C MAF 2.0.0.0。 41在Mac OSx 10.9上。Oracle MAF错误“无法读取DataControl的用法,在loadDataControl上为id:”

清洁香港#0 处理行#1 清洁香港#1 清洁香港#2 [严重 - oracle.adfmf.framework - AmxBindingContext - loadDataControlById]无法读取DataControl上用法,上loadDataControl对于ID:WLFNewActWS。 [严重 - oracle.adfmf.framework - SynchronizationDC - syncDataFromOfflineToOnline] [Ljava.lang.StackTraceElement; @ 467c53d3

public void syncDataFromOfflineToOnline() { 
    Trace.log(Utility.FrameworkLogger, Level.INFO, this.getClass(), "syncDataFromOfflineToOnline", 
       "Executing syncDataFromOfflineToOnline Method"); 
    try { 
     Connection conn = DBConnectionFactory.getConnection(); 
     conn.setAutoCommit(false); 
     String select = "SELECT * FROM DEPARTMENTS"; 
     PreparedStatement pStmt = conn.prepareStatement(select); 
     ResultSet rs = pStmt.executeQuery(); 
     System.out.println("Chk #0");    
     int rowcount = 0;    
     while (rs.next()) { 
      rowcount++; 
      System.out.println("Processing row# " + rowcount); 

      List namesList = new ArrayList(1); 
      List paramsList = new ArrayList(1); 
      List typesList = new ArrayList(1); 

      Department dept = new Department(); 

      dept.setDeptId(rs.getInt("DEPARTMENT_ID")); 
      dept.setDeptName(rs.getString("DEPARTMENT_NAME")); 
      dept.setMgrId(rs.getInt("MANAGER_ID"));     
      dept.setLocId(rs.getInt("LOCATION_ID")); 

      System.out.println("Chk #1"); 
      GenericType gtDept = 
        GenericTypeBeanSerializationHelper.toGenericType("WLFNewActWS.Types.persistDepartments.arg0", dept); 

       System.out.println("Chk #2");     
       namesList.add("arg0"); 
       paramsList.add(gtDept); 
       typesList.add(GenericType.class); 

       AdfmfJavaUtilities.invokeDataControlMethod("WLFNewActWS", null, "persistDepartments", namesList, 
                  paramsList, typesList); 
      System.out.println("Chk #3"); 
     } 
    } catch (SQLException e) { 
     Trace.log(Utility.FrameworkLogger, Level.SEVERE, this.getClass(), "syncDataFromOfflineToOnline", 
        e.getMessage()); 
    } catch (Exception e) { 
     Trace.log(Utility.FrameworkLogger, Level.SEVERE, this.getClass(), "syncDataFromOfflineToOnline", 
        e.getStackTrace()); 
    } 
} 

回答

1

这可能不是回答这个问题,但它可能是给搜索答案为“无法读取DataControl的使用情况,在loadDataControl上为id

在我的情况下是使用Oracle MAF,但这也适用于Oracle ADF。

您的Web服务需要位于DataBindings.cpx文件中。

喜欢的东西:

<dataControlUsages> 
 
    <dc id="WLFNewActWS " path="mobile.WLFNewActWS "/> 
 
</dataControlUsages>

我欺骗和拖动从WS东西放到页面的一个,并有JDeveloper中添加记录在DataBindings.cpx我。

0

这发生绑定问题。请在您的amx页面中创建对'WLFNewActWS'的参考/绑定。它会解决你的问题......!