任何幫助解決此invokeDataControl方法將不勝感激。請找到下面的鏈接以獲取有關該問題的完整參考。我基本上正在嘗試執行一個Oracle/Java MAF示例來理解這個概念,並將其呈現給用戶以便進行關鍵性的去/不去情況。Oracle MAF WebService invokeDataControlMethod SOAP錯誤
環境:
1)Jdeveloper中12.1.3.0.0 2)MAF 2.0.1 3)實施例嘗試:在DSI037 https://java.net/projects/smuenchadf/pages/ADFMobile OR 「http://deepakcs.blogspot.com/2013/06/offline-data-synchronization-for-adf.html」 4)MAC OS 10.9 5)的WebLogic 12C 6)錯誤消息
[嚴重 - oracle.adfmf.framework - HttpServiceConnection - 日誌]連接錯誤:500 [嚴重 - oracle.adfmf.framework - HttpTransport - parseResponse]響應[錯誤:{0}]:{ 1} [嚴重 - oracle.adfmf.framework - SoapTransportLayer - invokeSoapRequest]遇到異常而調用的SOAP請求 端點:http://XXX.XXX.XXX.XXX:80/EJBSyncWebServiceApp/SessionFacadeBeanService 的SOAPAction:「http://service.soap.dsid.com/persistDepartments」 異常:HTTP狀態代碼500內部服務器錯誤:服務器遇到這使它不能履行的意外情況請求。
7)更多詳細信息:
以下代碼已執行。該方法和所有其他被在HTTP分析器工作正常地或單獨地被執行時,當包裝在AdfmfJavaUtilities.invokeDataControlMethod
public void syncDataFromOfflineToOnline() {
Trace.log(Utility.FrameworkLogger, Level.FINE, this.getClass(), "syncDataFromOfflineToOnline",
"Executing syncDataFromOfflineToOnline Method");
try {
Connection conn = DBConnectionFactory.getConnection();
conn.setAutoCommit(false);
PreparedStatement pStmt =
conn.prepareStatement("SELECT DEPARTMENT_ID, DEPARTMENT_NAME, LOCATION_NAME, STATUS from DEPARTMENTS WHERE STATUS IN (?, ?, ?)");
pStmt.setString(1, STATUS_NEWLY_CREATED);
pStmt.setString(2, STATUS_MODIFIED);
pStmt.setString(3, STATUS_DELETED);
ResultSet rs = pStmt.executeQuery();
while (rs.next()) {
List namesList = new ArrayList(1);
List paramsList = new ArrayList(1);
List typesList = new ArrayList(1);
Departments dept = new Departments();
dept.setDepartmentId(rs.getInt("DEPARTMENT_ID"));
dept.setDepartmentName(rs.getString("DEPARTMENT_NAME"));
dept.setLocationName(rs.getString("LOCATION_NAME"));
dept.setStatus(STATUS_NOT_CHANGED);
if (rs.getString("STATUS").equals(STATUS_NEWLY_CREATED)) {
System.out.println("I got a STATUS_NEWLY_CREATED");
GenericType gtDept =
GenericTypeBeanSerializationHelper.toGenericType("MYWS.Types.persistDepartments.arg0",
dept);
namesList.add("arg0");
paramsList.add(gtDept);
typesList.add(Object.class);
AdfmfJavaUtilities.invokeDataControlMethod("MYWS", null, "persistDepartments", namesList,
paramsList, typesList);
//Once the data sync with online, change the status for the row as STATUS_NOT_CHANGED
PreparedStatement pStmt1 =
conn.prepareStatement("UPDATE DEPARTMENTS SET STATUS=? WHERE DEPARTMENT_ID=?");
pStmt1.setString(1, STATUS_NOT_CHANGED);
pStmt1.setInt(2, rs.getInt("DEPARTMENT_ID"));
pStmt1.execute();
conn.commit();
<<< more codes >>>
謝謝。我改變了陳述,但仍然導致同樣的錯誤。如果使用來自「persistDepartments」DataControl對象的命令按鈕創建表單(「arg0」),但我無法理解爲什麼在通過invokeDataControlMethod以編程方式調用時不起作用。對我來說,錯誤信息也是通用的。那麼web應用程序可以幫助嗎? – 2015-01-16 16:25:44
更改,但getiing相同的錯誤。如果我使用表單(「arg0」)添加一條記錄,但是在通過invokeDataControlMethod以編程方式調用時不起作用,它工作正常。對我來說,錯誤信息也是通用的。那麼,具有Web應用程序知識的人可以幫助嗎?錯誤消息[SEVERE - oracle.adfmf.framework - HttpServiceConnection - 日誌]連接錯誤:500 [SEVERE - oracle.adfmf.framework - HttpTransport - parseResponse]響應[Error:{0}]:{1} [SEVERE - oracle .adfmf.framework - SoapTransportLayer - invokeSoapRequest] – 2015-01-16 16:32:05