August 1, 2011

OFAC SDN WEB SERVICE

This web services is created for Money Transfer Businesses in US to meet the requirements of the US Treasury Department s Office of Foreign Asset Control (OFAC).OFAC restricts transactions with specific countries, organizations and individuals. The Office of Foreign Assets Control (OFAC) of the US Department of the Treasury administers and enforces economic and trade sanctions based on US foreign policy and national security goals against targeted foreign countries, terrorists, international narcotics traffickers, and those engaged in activities related to the proliferation of weapons of mass destruction. OFAC acts under Presidential wartime and national emergency powers, as well as authority granted by specific legislation, to impose controls on transactions and freeze foreign assets under US jurisdiction. This WebService checks in SDNLIST Provided by OFAC ,for the Blocked Person (Both FirstName and Last Name) in Method (CheckBlockedNames)or the Corporation (Only Last Name) in Method (CheckBlockedEntities)


 In Method( CheckBlockedNamesWithTolerance) Web Service returns the 
List of Matching Individuals and Corporation within the tolerance given by the web service client by calculating the LEVENSHTEIN distance

WEBSERVICE END POINT : 


http://184.168.209.81/SDNWebService/CheckSDNBlockedPerson.asmx


wsdl document link


http://184.168.209.81/SDNWebService/CheckSDNBlockedPerson.asmx?WSDL



Below is the Test client written to Use all 3 methods of the above web service


1.) Add the web Reference of the web Service  URL 




Default.aspx.cs 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebReference;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
       CheckSDNBlockedPerson OBJ = new CheckSDNBlockedPerson();
     
        //Use Methoid to know if the Individual is in blocked list provided by OFAC Dept
       bool result = OBJ.CheckBlockedNames("Khantibhal", "Patel");


        if (result ==true )
        {
            Response.Write("Khantibhai patel is black listed person <br/>");
        }
        else
        {
            Response.Write("Khantibhai patel is not black listed person <br/>");


        }




        //Use Methoid to know if the Corporation is in blocked list provided by OFAC Dept
        bool result1 = OBJ.CheckBlockedEntities("POPULAR FRONT FOR THE LIBERATION OF PALESTINE");


        if (result1 == true)
        {
            Response.Write("POPULAR FRONT FOR THE LIBERATION OF PALESTINE is balck listed Entity <br/>");
        }
        else
        {
            Response.Write("POPULAR FRONT FOR THE LIBERATION OF PALESTINE is not balck listed Entity <br/>");


        }




        //Use Methoid to get the matching blacklisted names with the tolerance specified


        BLOCKLISTTolerance [] OBJLIST= OBJ.CheckBlockedNamesWithTolerance("KHANTIbHAI", "PATe", 6);
       foreach (BLOCKLISTTolerance I in OBJLIST)
       {


           Response.Write(I.FirstName);
           Response.Write("  ");
           Response.Write(I.LastName );
           Response.Write("  ");
           Response.Write(I.Tolerance);
           Response.Write("<BR/>");




       }




    }
}


Below will be the o/p


No comments:

Post a Comment