Table of Contents

Search

  1. Preface
  2. Introduction to Services Integration Framework
  3. Setting Up the SIF SDK
  4. Request and Response Objects
  5. Transactions and Exception Handling
  6. ORS-Specific SIF API
  7. Asynchronous SIF Requests
  8. ORS-Specific JMS Event Messages
  9. Using Security Access Manager
  10. Using Dynamic Data Masking
  11. SIF API Reference
  12. Troubleshooting
  13. Appendix A: Identifiers
  14. Appendix B: Frequently Asked Questions

Services Integration Framework Guide

Services Integration Framework Guide

Exception Handling

Exception Handling

When a SIF request fails, the SIF SDK handles exception through the
com.siperian.common.SipRuntimeException
object. The
SipRuntimeException
object returns the same error codes and messages that the MDM Hub returns.
The
SipRuntimeException
object includes methods that return the following information:
Error Code and Message
Error codes and messages that the MDM Hub returns.
Request Name
Name of the request that failed.
The following sample code uses the
SipRuntimeException
object to handle a SIF request failure:
public static void main(String args[]) { UserTransaction tx = null; try { File file = new File("E:\\siperian-client.properties"); System.out.println("Reading File:" + file.getAbsolutePath()); if (!file.exists()) { System.out.println("***ERROR -> Properties File does not exist in location - "); return; } EncryptionManager en = EncryptionManager.getInstance(); try { en.init(); //System.out.println("check :" + en.isAPIFieldEncrypted("orcl.informatica.com-MDM_SAMPLE.BASE_OBJECT", "C_PARTY", "FIRST_NAME")); } catch (IOException e) { // TODO Auto-generated catch block System.out.print("Exception \n" + e); } EjbSiperianClient sipClient = (EjbSiperianClient) SiperianClient.newSiperianClient(file); tx.begin(); System.out.println("TXN BEGAN"); PutRequest putRequest1 = new PutRequest(); System.out.println("Put 1"); RecordKey recordKey1 = new RecordKey(); recordKey1.setSourceKey("1000022"); //recordKey1.setRowid("1970"); recordKey1.setSystemName("Admin"); Record record1 = new Record(); record1.setSiperianObjectUid("BASE_OBJECT.C_PARTY"); Field field1 = new Field(); Field field2 = new Field(); field1.setName("FIRST_NAME"); field1.setStringValue("kk4"); field2.setName("LAST_NAME"); field2.setStringValue("kk4"); Field field3 = new Field(); field3.setName("PARTY_TYPE"); field3.setStringValue("Person"); record1.setField(field1); record1.setField(field2); record1.setField(field3); putRequest1.setRecord(record1); putRequest1.setRecordKey(recordKey1); System.out.println("Put 2"); PutResponse putResponse1 = (PutResponse) sipClient.process(putRequest1); System.out.println("Record1 created for PUT - " + putResponse1); tx.commit(); System.out.println("TXN COMMITTED"); } catch (Exception name) { throw new SipRunTimeException("ERROR_CODE"); } finally { System.out.println("Finally"); } } }

0 COMMENTS

We’d like to hear from you!