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

Sample Code to Retrieve Records

Sample Code to Retrieve Records

After you set up an Eclipse client, you can write code to interact with the MDM Hub. For example, create a class and add the following sample code that uses the
SearchQueryRequest
and
SearchQueryResponse
classes to retrieve records:
import java.io.File; import java.util.ArrayList; import java.util.List; import com.siperian.sif.client.SiperianClient; import com.siperian.sif.client.SoapSiperianClient; import com.siperian.sif.message.Parameter; import com.siperian.sif.message.Record; import com.siperian.sif.message.mrm.SearchQueryRequest; import com.siperian.sif.message.mrm.SearchQueryResponse; public class SearchQuery { public static void main(String[] args) { 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; } SoapSiperianClient sipClient = (SoapSiperianClient) SiperianClient.newSiperianClient(file); SearchQueryRequest request = new SearchQueryRequest(); request.setRecordsToReturn(5); request.setSiperianObjectUid("BASE_OBJECT.C_PARTY"); request.setFilterCriteria("C_PARTY.FIRST_NAME =?"); ArrayList params = new ArrayList(2); params.add(new Parameter("3333")); request.setFilterParameters(params); SearchQueryResponse response = (SearchQueryResponse) sipClient.process(request); List <Record> records = response.getRecords(); for (Record record : records) { System.out.println("Period Start Date: " + record.getField("PERIOD_START_DATE").getDateValue().toString()); System.out.println("Period End Date: " + record.getField("PERIOD_END_DATE").getDateValue().toString()); } } }

0 COMMENTS

We’d like to hear from you!
Ajay Kumar - December 27, 2022

Please check whether the for loop is correct in sample code.

Informatica Documentation Team - January 02, 2023

Hi Ajay,

We’re working to address your comments and will get back to you.

Thanks,

Informatica Documentation team


Informatica Documentation Team - January 05, 2023

Hi Ajay,

We’re happy to let you know that we have corrected the code and addressed your feedback in the documentation.

Thanks,

Informatica Documentation team