NAV undefined
undefined
cSharp python vb java javascript

Introduction

Lyons Commercial Data XML-based Web Services are hosted in a secure and fully redundant data center to provide near real-time account ownership and account status verification and validation of important transaction processing information.

Applications accessing Lyons Commercial Data web services utilize Representational State Transfer (REST) to process information requests to and from the Lyons Commercial Data servers via https:// for SSL encryption

Error handling for Soap:

SOAP API returns errors as SOAP faults. A SOAP fault response has HTTP status code 500 and contains an XML-formatted error message in the response body. In code, you can catch SOAP faults and web service communication exceptions as shown in language sections.

try
{
  // Do something
}
catch (FaultException ex)
{
  MessageFault msgFault = ex.CreateMessageFault();
  string error = msgFault.HasDetail
                 ? msgFault.GetReaderAtDetailContents().GetAttribute("Text")
                 : ex.Reason.ToString();
  Console.WriteLine(error);
}
catch (CommunicationException ex)
{
  Console.WriteLine(ex.Message);
  Console.WriteLine(ex.InnerException);
}

try {
  // Do something
}
catch (SOAPFaultException e) {
  SOAPFault fault = e.getFault();
  String error = fault.hasDetail()
                 ? fault.getDetail().getAttribute("Text")
                 : fault.getFaultNode();
  System.err.println(error);
}
catch (WebServiceException e) {
  System.err.println(e.getMessage());
}
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode xmlns:a="http://schemas.microsoft.com/2009/WebFault">a:InternalServerError</faultcode>
         <faultstring xml:lang="en-US">Internal Server Error</faultstring>
         <detail>
            <institutionResult xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.RTNService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
               <errorMessage xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService">No primary financial institutions found</errorMessage>
               <institution i:nil="true"/>
            </institutionResult>
         </detail>
      </s:Fault>
   </s:Body>
</s:Envelope>

Authentication

Each web service requires authentication, providing a secure connection between the client and Lyons Commercial Data servers. A company ID, user name and password are required to access Lyons Commercial Data web services.

To receive a company ID, user name and password, please complete the trial request form or contact an account representative.

Service URL

Please use the base URL that you are subscribed to for Authentication to WCF service. Example if subscribed to OFAC service

Logon

 // please use URL for the service you have subscribed to
    var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress(serviceUrl);
try{
    using (ChannelFactory<IABAService> fact = new ChannelFactory<IABAService>(myBinding, myEndpoint))
    {
        IABAService abaSvc = fact.CreateChannel();
        string token = abaSvc.Logon(companyId, userID, password);
    }
}
catch(Exception ex){ }
  // note: please use URL for the service you have subscribed to

import urllib2

in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:Logon>
         <tem:companyId>'Your Assigned company Id'</tem:companyId>
         <tem:userName>'Your Assigned user Id'</tem:userName>
         <tem:password>'Your Assigned password''</tem:password>
      </tem:Logon>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IGeneralServiceContract/Logon",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc?wsdl", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
// note: please use URL for the service you have subscribed to
Sub Main(args As String())
    Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String      
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:Logon>
         <tem:companyId>XXX</tem:companyId>
         <tem:userName>XXXXX</tem:userName>
         <tem:password>XXXXXXX</tem:password>
      </tem:Logon>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IGeneralServiceContract/Logon")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString)
        End Try
 End Sub
private static ABAServiceWCF createABAServiceWCF(String singleWsdlUrl) throws StopProcesingException {
        ABAServiceWCF wcf = null;
        try {
            wcf = new ABAServiceWCF(new URL(singleWsdlUrl));
        } catch (Exception e) {
            log.error("Error creating the ABAServiceWCF: {}", e.getMessage());
            log.error("Exception:", e);
            throw new StopProcesingException();
        }
        return wcf;
    }

    @Bean
    private static IABAService prepareService(@Value("${service.single.wsdl.url}") String singleWsdlUrl)
            throws StopProcesingException {
        ABAServiceWCF wcf = createABAServiceWCF(singleWsdlUrl);
        IABAService svc = null;
        try {
            svc = wcf.getBasicHttpBindingIABAService();
            Assert.notNull(svc, "The returned IABAService is null");
        } catch (RuntimeException e) {
            System.out.println("Error obtaining the basic HTTP binding to IABAService: ".concat(e.getMessage()));
            e.printStackTrace();
            throw new StopProcesingException();
        }
        return svc;
    }
/**
 *    The IABAService is generated same way as  that code snippet for this service above..
 *
 *    The method handleFault extracts the actual error message returned by the service 
 *    in case a ServerSOAPFaultException is thrown.
 *
 */
public abstract class AbstractAbaServiceCall implements AbaServiceCall {

    protected String login(IABAService svc, LogonProperties loginProps) throws StopProcesingException {
        String token = null;
        try {
            LogonResult resObj = svc.logon(loginProps.getCompanyId(), loginProps.getUserName(), loginProps.getPassword());
            Assert.notNull(resObj, "The returned LogonResult is null");
            token = resObj.getToken();
            Assert.notNull(token, "The returned token is null");
        } catch (ServerSOAPFaultException ex) {
            handleFault("Error logging on to IABAService", ex, true);
        } catch (Exception e) {
            handleError("Error communicating to IABAService", e.getMessage(), true);
        }
        return token;
    }

    @SuppressWarnings("rawtypes")
    protected void handleFault(String msg, ServerSOAPFaultException ex, boolean rethrow) throws StopProcesingException {
        String res = null;
        SOAPFault fault = ex.getFault();
        if (fault != null) {
            Detail det = fault.getDetail();
            if (det != null) {
                Iterator resItr = det.getDetailEntries();
                if (resItr != null && resItr.hasNext()) {
                    DetailEntry de = (DetailEntry) resItr.next();
                    if (de != null) {
                        try {
                            JAXBContext ctx = JAXBContext.newInstance(errorClasses);
                            Unmarshaller u = ctx.createUnmarshaller();
                            JAXBElement<ErrorResult> resEl = u.unmarshal(de, ErrorResult.class);
                            ErrorResult resO = resEl.getValue();
                            res = resO.getErrorMessage();
                        } catch (JAXBException e) {
                        }
                    }
                }
            }
        }
        handleError(msg, res, rethrow);
    }

    private static Class<?>[] errorClasses = new Class[] { ErrorResult.class };

    protected void handleError(String msg, String errorMessage, boolean rethrow) throws StopProcesingException {
        String resMsg = MessageFormatter.arrayFormat("{}{}{}", new String[] { msg, errorMessage == null ? " - " : ": ",
                errorMessage == null ? "got a SOAP exception" : errorMessage }).getMessage();
        System.out.println(resMsg);
        if (rethrow) {
            throw new StopProcesingException();
        }
    }

    protected void message(String template, Object... args) {
        String msg = MessageFormatter.arrayFormat(template, args).getMessage();
        System.out.println(msg);
    }
}
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();

//Ensure the proxy variable created below has a service you have subscribed to and  actually loads wsdl.    
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:Logon>" +
                "<tem:companyId>xxx</tem:companyId>" +
                "<tem:userName>xxxxx</tem:userName>" +
                "<tem:password>xxxxxx</tem:password>"+
                "</tem:Logon>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IGeneralServiceContract/Logon", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <LogonResponse xmlns="http://tempuri.org/">
         <LogonResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true"/>
            <token>d0df6cb7-96f0-4963-9949-e52c0c04b609</token>
         </LogonResult>
      </LogonResponse>
   </s:Body>
</s:Envelope>

This method is used to authenticate a client/customer. A companyId, userName and password will be provided by Lyons. The call returns an entity containing a unique session token that will expire after 20 minutes of inactivity.

It is recommended to cache this token and keep it alive by calling the RequiredLogon method asynchronously every 15 minutes for as long as needed. If the RequiredLogon method returns true, the Logon method should be called again and the token re-cached.

This approach allows for fast service transactions (as the Logon and Logoff calls are not part of the overall transaction) and minimizes the load to the service.

Request

Parameter Type Description
companyId integer The ID of the company the user is associated with
userName string the full user name
password string the full password

Response

Parameter Type Description
token string The session token used to access the service methods

RequiredLogon

// note: please use URL for the service you have subscribed to
  var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress(serviceUrl);
try{
    using (ChannelFactory<IABAService> fact = new ChannelFactory<IABAService>(myBinding, myEndpoint))
    {
        IABAService abaSvc = fact.CreateChannel();
        bool status = abaSvc.RequiredLogon(token);
    }
}
catch(Exception ex){ }
// note: please use URL for the service you have subscribed to
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:RequiredLogon>
         <tem:token>xxxxxxxxxxxxx</tem:token>
      </tem:RequiredLogon>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IGeneralServiceContract/RequiredLogon",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
    Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:RequiredLogon>
         <!--Optional:-->
         <tem:token>XXXXXXXXXXXXXXXXXX</tem:token>
      </tem:RequiredLogon>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IGeneralServiceContract/RequiredLogon")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
End Sub
    protected boolean requireLogin(IABAService svc, String token) throws StopProcesingException {
        boolean res = true;
        try {
            BooleanResult resObj = svc.RequiredLogon(token);
            Assert.notNull(resObj, "The returned BooleanResult is null");
            res = resObj.isValue();
        } catch (ServerSOAPFaultException ex) {
            handleFault("Error checking the login status with IABAService", ex, true);
        } catch (Exception e) {
            handleError("Error communicating to IABAService", e.getMessage(), true);
        }
        return res;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:RequiredLogon>" +
                "<tem:token>XXXXXXXXXXXXXXXXXXX</tem:token>" +
                "</tem:Logon>" +
                "</soapenv:RequiredLogon>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IGeneralServiceContract/RequiredLogon", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <RequiredLogonResponse xmlns="http://tempuri.org/">
         <RequiredLogonResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true"/>
            <value>false</value>
         </RequiredLogonResult>
      </RequiredLogonResponse>
   </s:Body>
</s:Envelope>

This method does not have to be called to use the web services. It is available for client applications to determine if the session has expired.

Request

Parameter Type Description
token string the session token returned by the Logon call

Response

Parameter Type Description
value string The activity status of the token

Logoff

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc");
try{
    using (ChannelFactory<IABAService> fact = new ChannelFactory<IABAService>(myBinding, myEndpoint))
    {
        IABAService abaSvc = fact.CreateChannel();
        string token = abaSvc.Logoff(token);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:Logoff>
         <tem:token>XXXXXXXXXXXXXXXXXXXXXX</tem:token>
      </tem:Logoff>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IGeneralServiceContract/Logoff",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:Logoff>
         <tem:token>XXXXXXXXXXXXXXXXXXXXXX</tem:token>
      </tem:Logoff>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IGeneralServiceContract/Logoff")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    protected void logoff(IABAService svc, String token) {
        try {
            svc.logoff(token);
        } catch (Exception e) {
            // swallowing the exception
        }
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:Logoff>" +
                "<tem:token>XXXXXXXXXXXXXXXXXXX</tem:token>" +
                "</tem:Logoff>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IGeneralServiceContract/Logoff", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <LogonResponse xmlns="http://tempuri.org/">
         <LogoffResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">            
         </LogoffResult>
      </LogonResponse>
   </s:Body>
</s:Envelope>

This method is used to log off from an authenticated login.

This approach allows for fast service transactions (as the Logon and Logoff calls are not part of the overall transaction) and minimizes the load to the service.

Request

Parameter Type Description
token string The session token used to access the service methods

Account Ownership and Status Verification

/**
 *
 *    You can find fully functional example client project here.
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */
/**
 *
 *    You can find fully functional example client project here.
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 *  Alternativelly, Upload the binary form of the libraries here
 *
 */

This web service returns a code and/or message to help you determine whether to Accept or Deny a payment transaction for a submitted checking or savings account number.

This web service returns a single, primary financial institution with detailed information for a submitted 9-digit financial institution routing number. Lyons will first verify the financial institution routing number as eligible by applying the industry standard Mod10 algorithm. Upon satisfying this requirement, Lyons will determine the existence of the routing/account number, and if found, will then verify the status of the account as being open and in good standing or Account ownership verification based on the type of request user has access to.

You will be able to download the AOA sample test accounts by clicking here.

WSDL Url

https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?singleWsdl

Check under each code language tab for example projects that demonstrate how to correctly use the web service contracts and proper configurations for the service and the method calls.

Response Codes

Code Message
-999 AOA Service failed
-70 Account Ownership details Missing
-71 The First Name is not provided
-72 The Last Name is not provided
-73 Either Business Name or First/Last Name must be provided
-75 SSN length must be 4 or 9 digits
-76 Date Of Birth must be 8 characters in length
-77 Date Of Birth must be numeric
-78 ID Type value must be one character in length.
-79 Internal AOA failure.
-63 ~ -61 Communication Error
-54 Your AOA account preferences are not configured
-53 Customer Present value must be 0 or 1.
-52 Customer Present value must be one character in length.
-51 Customer Present value must be numeric.
-43 Invalid Amount field.
-42 Amount value length (only digits including the cents) exceeds maximum of 12 characters.
-41 Amount value must be numeric.
-33 Account Number length must be 1 to 17 characters long.
-31 Account Number value must be numeric.
-30 Account Number must be entered.
-22 ABA Number must be exactly 9 digits.
-21 ABA value must be numeric.
-20 ABA value must be entered.
-2 Inquiry field length too short.
-3 Inquiry field length too long.
-4 Populated with improper data type or value.
-5 Amount value cannot be zero or less than 0.01
101 Accept
103 Deny
104 Deny
199 Insufficient info to make a decision

DescribeStatusCode

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        TranslationResponse translation = aoaSvc.DescribeStatusCode(token, code);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://www.lyonsreg.com/WebServices/AOAService">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:DescribeStatusCode>
         <aoa:token>XXXXXXXXXXXXXXXXXX</aoa:token>
         <aoa:statusCode>XXXX</aoa:statusCode>
      </aoa:DescribeStatusCode>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/DescribeStatusCode",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:DescribeStatusCode>
         <aoa:token>XXXXXXXXXXXXXXXXXXXXXXXXc</aoa:token>
         <aoa:statusCode>XXX</aoa:statusCode>
      </aoa:DescribeStatusCode>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/DescribeStatusCode")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()returnDetails    string
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public string call(IAOAService svc, String token, String statusCode)
        throws StopProcesingException {
        string description = null;
        try {
            StatusDescriptionResult res = svc.DescribeStatusCode(token, statusCode);
            Assert.notNull(res, "The returned DescribeStatusCode is null");
            description = res.getStatusDescription();
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.DescribeStatusCode(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.DescribeStatusCode(...) method", e);
            handleError("Error calling the IAOAService.DescribeStatusCode(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                " <aoa:DescribeStatusCode>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:statusCode>XXX</aoa:statusCode>"+
                "</aoa:DescribeStatusCode>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/DescribeStatusCode", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <DescribeStatusCodeResponse xmlns="http://lyonsreg.com/WebServices/AOAService">
         <DescribeStatusCodeResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <statusCode>199</statusCode>
            <statusDescription>Insufficient info to make a decision</statusDescription>
         </DescribeStatusCodeResult>
      </DescribeStatusCodeResponse>
   </s:Body>
</s:Envelope>

Get the status code of an account from the AOA network.

Request

Parameter Type Description
token string the session token returned by the Logon call
statusCode string status code to be translated

Response

Parameter Type Description
statusCode boolean Numeric representation of account ownership and status verification
statusDescription boolean Description of status code representation of account ownership and status verification

CheckAccountOwnershipAndStatus

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        AOAResponse response = aoaSvc.CheckAccountOwnershipAndStatus(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountOwnershipAndStatus>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipAndStatus>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatus",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountOwnershipAndStatus>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipAndStatus>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatus")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public DetailedStatusCodeResult call(IAOAService svc,string token, string returnDetails, AccountStatusRequest accountStatusRequest)
        throws StopProcesingException {
        InstitutionAddress details = null;
        Int code = -1;
        DetailedStatusCodeResult detailedStatus = null;
        try {
            DetailedStatusCodeResult res = svc.CheckAccountOwnershipAndStatus(token, returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountOwnershipAndStatus is null");
            description = res.getPrimaryInstitution();
            code = res.getStatusCode();
            detailedStatus = res;
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountOwnershipAndStatus (...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountOwnershipAndStatus (...) method", e);
            handleError("Error calling the IAOAService.CheckAccountOwnershipAndStatus (...) method", e.getMessage(), true);
        }
        return detailedStatus;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<aoa:CheckAccountOwnershipAndStatus>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>"+
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                         "<aoa:accountOwner>" +             
                         "<aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>"+           
                         "<aoa:city>xxxxxxxxxxxxxx</aoa:city>"+           
                         "<aoa:state>XX</aoa:state>"+             
                         "<aoa:address1>XXXX</aoa:address1>"+
                         "<aoa:zip>XXXX</aoa:zip>"+              
                         "<aoa:ssn>XXXXXXX</aoa:ssn>"+       
                         "</aoa:accountOwner>"+
                    "</aoa:accountStatusRequest>"+
                "</aoa:CheckAccountOwnershipAndStatus >" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatus ", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
       <CheckAccountOwnershipAndStatusResponse xmlns="http://tempuri.org/">
         <CheckAccountOwnershipAndStatusResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
         </CheckAccountOwnershipAndStatusResult>
      </CheckAccountOwnershipAndStatusResponse>
   </s:Body>
</s:Envelope>

Get a message from a status code.

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Account Owner details Mandatory object
firstName string The first name of the Account owner Mandatory field if Business Name not provided
lastName string The last name of the Account owner Mandatory field if Business Name not provided
middleName string The middle name of the Account owner Optional field
namePfx string The Name Prefix Optional field
nameSfx string The Name Suffix Optional field
businessName string The Business Name of Account owner Mandatory field if First Name and Last name not provided
address1 string The Address Line 1 of Account owner Optional field
address2 string The Address Line 2 of Account owner Optional field
city string The City of Account owner Optional field
state string The State abbreviation of the Account owner Optional field
zip string The zip of the Account owner. Format: NNNNN[-NNNN] Optional field
ssn string The ssn of the Account owner. Format: [NNNNN]NNNN Optional field
dob string The date of birth of the Account owner. Format: YYYYMMDD Optional field
idType string The Valid ID Types Optional field *1
idNo string The ID Number Optional field
idState string The ID state abbreviation Optional field

Notes:
* 1 - Valid ID Types are

ID Types Value Description
0 Drivers License USA
1 Military USA
2 Passport
3 Resident Alien ID
4 State identification
5 Student identification
6 Drivers License foreign
7 Drivers License Canada
8 Drivers License Mexico
9 Other primary ID foreign
A Matricula Consular card
B South America Cedula

Response

Parameter Type Description
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number

validRtn | boolean | aba status

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Communication Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with (AOA) service

CheckAccountOwnership

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        AOAResponse response = aoaSvc.CheckAccountOwnership(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountOwnership>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnership>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnership",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountOwnership>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnership>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnership")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public DetailedStatusCodeResult call(IAOAService svc, String token, String returnDetails, AccountStatusRequest accountStatusRequest)
        throws StopProcesingException {
        InstitutionAddress details = null;
        Int code = -1;
        DetailedStatusCodeResult detailedStatus = null;
        try {
            DetailedStatusCodeResult res = svc.CheckAccountOwnership(token,returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountOwnershipis null");
            description = res.getPrimaryInstitution();
            code = res.getStatusCode();
            detailedStatus = res;
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountOwnership(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountOwnership(...) method", e);
            handleError("Error calling the IAOAService.CheckAccountOwnership(...) method", e.getMessage(), true);
        }
        return detailedStatus;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<CheckAccountOwnership>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                         "<aoa:accountOwner>" +             
                         "<aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>"+           
                         "<aoa:city>xxxxxxxxxxxxxx</aoa:city>"+           
                         "<aoa:state>XX</aoa:state>"+             
                         "<aoa:address1>XXXX</aoa:address1>"+
                         "<aoa:zip>XXXX</aoa:zip>"+              
                         "<aoa:ssn>XXXXXXX</aoa:ssn>"+       
                         "</aoa:accountOwner>"+
                    "</aoa:accountStatusRequest>"+
                "</CheckAccountOwnership>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnership", function (response, ctx) {
    console.log(response);
    /*Your response is in XML and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
       <CheckAccountOwnershipResponse xmlns="http://tempuri.org/">
         <CheckAccountOwnershipResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
         </CheckAccountOwnershipResult>
      </CheckAccountOwnershipResponse>
   </s:Body>
</s:Envelope>

Get a message from a status code.

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Account Owner details Mandatory object
firstName string The first name of the Account owner Mandatory field if Business Name not provided
lastName string The last name of the Account owner Mandatory field if Business Name not provided
middleName string The middle name of the Account owner Optional field
namePfx string The Name Prefix Optional field
nameSfx string The Name Suffix Optional field
businessName string The Business Name of Account owner Mandatory field if First Name and Last name not provided
address1 string The Address Line 1 of Account owner Optional field
address2 string The Address Line 2 of Account owner Optional field
city string The City of Account owner Optional field
state string The State abbreviation of the Account owner Optional field
zip string The zip of the Account owner. Format: NNNNN[-NNNN] Optional field
ssn string The SSN of the Account owner Optional field
dob string The date of birth of the Account owner. Format: YYYYMMDD Optional field
idType string The Valid ID Types Optional field *1
idNo string The ID Number Optional field
idState string The ID state abbreviation Optional field

Notes:

* 1 - Valid ID Types are

ID Types Value Description
0 Drivers License USA
1 Military USA
2 Passport
3 Resident Alien ID
4 State identification
5 Student identification
6 Drivers License foreign
7 = Drivers License Canada
8 = Drivers License Mexico
9 = Other primary ID foreign
A = Matricula Consular card
B = South America Cedula

Response

Parameter Type Description
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Communication Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with AOA service

CheckAccountStatus

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        StatusCodeResponse response = aoaSvc.CheckAccountStatus(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://www.lyonsreg.com/WebServices/AOAService">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountStatus>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountStatus>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatus",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountStatus>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountStatus>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatus")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public int call(IAOAService svc,  String token, String returnDetails, AccountStatusRequest accountStatusRequest)
            throws StopProcesingException {
        int code = -1;
        try {
            StatusCodeResult res = svc.CheckAccountStatus(token, returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountStatus is null");
            code = res.getStatusCode();                        
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountStatus(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountStatus(...) method", e);
            handleError("Error calling the IAOAService.CheckAccountStatus(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<CheckAccountStatus>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                    "</aoa:accountStatusRequest>"+
                "</CheckAccountStatus>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatus", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
     <CheckAccountStatusResponse xmlns="http://tempuri.org/">
         <CheckAccountStatusResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
         </CheckAccountStatusResult>
      </CheckAccountStatusResponse>
   </s:Body>
</s:Envelope>

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Do not provide this object.

Response

Parameter Type Description Field Status
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with AOA web service

CheckAccountOwnershipAndStatusWithDates

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        DetailedStatusCodeResultWithDates response = aoaSvc.CheckAccountOwnershipAndStatusWithDates(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountOwnershipAndStatusWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipAndStatusWithDates>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatusWithDates",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountOwnershipAndStatusWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipAndStatuWithDates>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatusWithDates")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public DetailedStatusCodeResultWithDates call(IAOAService svc,string token, string returnDetails, AccountStatusRequest accountStatusRequest)
        throws StopProcesingException {
        InstitutionAddress details = null;
        Int code = -1;
        string lastUpdatedDate = null;
        string lastclosedDate = null;
        DetailedStatusCodeResultWithDates detailedStatus = null;
        try {
            DetailedStatusCodeResultWithDates res = svc.CheckAccountOwnershipAndStatusWithDates(token, returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountOwnershipAndStatusWithDates is null");
            description = res.getPrimaryInstitution();
            code = res.getStatusCode();
            lastUpdatedDate = res.getLastUpdate();
            lastclosedDate = res.getAddClosedDate();
            detailedStatus = res;
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountOwnershipAndStatus (...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountOwnershipAndStatusWithDates (...) method", e);
            handleError("Error calling the IAOAService.CheckAccountOwnershipAndStatusWithDates (...) method", e.getMessage(), true);
        }
        return detailedStatus;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<aoa:CheckAccountOwnershipAndStatusWithDates>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>"+
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                         "<aoa:accountOwner>" +             
                         "<aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>"+           
                         "<aoa:city>xxxxxxxxxxxxxx</aoa:city>"+           
                         "<aoa:state>XX</aoa:state>"+             
                         "<aoa:address1>XXXX</aoa:address1>"+
                         "<aoa:zip>XXXX</aoa:zip>"+              
                         "<aoa:ssn>XXXXXXX</aoa:ssn>"+       
                         "</aoa:accountOwner>"+
                    "</aoa:accountStatusRequest>"+
                "</aoa:CheckAccountOwnershipAndStatusWithDates >" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipAndStatusWithDates ", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
       <CheckAccountOwnershipAndStatusWithDatesResponse xmlns="http://tempuri.org/">
         <CheckAccountOwnershipAndStatusResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
            <a:lastUpdate>20201214</a:lastUpdate>
            <a:addClosedDate>20201214</a:addClosedDate>
         </CheckAccountOwnershipAndStatusResult>
      </CheckAccountOwnershipAndStatusWithDatesResponse>
   </s:Body>
</s:Envelope>

Get a message from a status code.

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Account Owner details Mandatory object
firstName string The first name of the Account owner Mandatory field if Business Name not provided
lastName string The last name of the Account owner Mandatory field if Business Name not provided
middleName string The middle name of the Account owner Optional field
namePfx string The Name Prefix Optional field
nameSfx string The Name Suffix Optional field
businessName string The Business Name of Account owner Mandatory field if First Name and Last name not provided
address1 string The Address Line 1 of Account owner Optional field
address2 string The Address Line 2 of Account owner Optional field
city string The City of Account owner Optional field
state string The State abbreviation of the Account owner Optional field
zip string The zip of the Account owner. Format: NNNNN[-NNNN] Optional field
ssn string The ssn of the Account owner. Format: [NNNNN]NNNN Optional field
dob string The date of birth of the Account owner. Format: YYYYMMDD Optional field
idType string The Valid ID Types Optional field *1
idNo string The ID Number Optional field
idState string The ID state abbreviation Optional field

Notes:
* 1 - Valid ID Types are

ID Types Value Description
0 Drivers License USA
1 Military USA
2 Passport
3 Resident Alien ID
4 State identification
5 Student identification
6 Drivers License foreign
7 Drivers License Canada
8 Drivers License Mexico
9 Other primary ID foreign
A Matricula Consular card
B South America Cedula

Response

Parameter Type Description
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number
lastUpdate string Approximately how long ago the Account was updated
addClosedDate string Approximately how long ago a closed date was added to the Account
validRtn boolean aba status

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Communication Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with AOA service

CheckAccountOwnershipWithDates

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        DetailedStatusCodeResultWithDates response = aoaSvc.CheckAccountOwnershipWithDates(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountOwnershipWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipWithDates>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipWithDates",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountOwnershipWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountOwnershipWithDates>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipWithDates")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public DetailedStatusCodeResultWithDates call(IAOAService svc, String token, String returnDetails, AccountStatusRequest accountStatusRequest)
        throws StopProcesingException {
        InstitutionAddress details = null;
        Int code = -1;
         string lastUpdatedDate = null;
        string lastclosedDate = null;
        DetailedStatusCodeResultWithDates detailedStatus = null;
        try {
            DetailedStatusCodeResultWithDates res = svc.CheckAccountOwnershipWithDates(token,returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountOwnershipWithDates is null");
            description = res.getPrimaryInstitution();
            code = res.getStatusCode();
             lastUpdatedDate = res.getLastUpdate();
            lastclosedDate = res.getAddClosedDate();
            detailedStatus = res;
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountOwnershipWithDates(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountOwnershipWithDates(...) method", e);
            handleError("Error calling the IAOAService.CheckAccountOwnershipWithDates(...) method", e.getMessage(), true);
        }
        return detailedStatus;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<CheckAccountOwnershipWithDates>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                         "<aoa:accountOwner>" +             
                         "<aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>"+           
                         "<aoa:city>xxxxxxxxxxxxxx</aoa:city>"+           
                         "<aoa:state>XX</aoa:state>"+             
                         "<aoa:address1>XXXX</aoa:address1>"+
                         "<aoa:zip>XXXX</aoa:zip>"+              
                         "<aoa:ssn>XXXXXXX</aoa:ssn>"+       
                         "</aoa:accountOwner>"+
                    "</aoa:accountStatusRequest>"+
                "</CheckAccountOwnershipWithDates>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountOwnershipWithDates", function (response, ctx) {
    console.log(response);
    /*Your response is in XML and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
       <CheckAccountOwnershipWithDatesResponse xmlns="http://tempuri.org/">
         <CheckAccountOwnershipResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
            <a:lastUpdate>20201214</a:lastUpdate>
            <a:addClosedDate>20201214</a:addClosedDate>
         </CheckAccountOwnershipResult>
      </CheckAccountOwnershipWithDatesResponse>
   </s:Body>
</s:Envelope>

Get a message from a status code.

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Account Owner details Mandatory object
firstName string The first name of the Account owner Mandatory field if Business Name not provided
lastName string The last name of the Account owner Mandatory field if Business Name not provided
middleName string The middle name of the Account owner Optional field
namePfx string The Name Prefix Optional field
nameSfx string The Name Suffix Optional field
businessName string The Business Name of Account owner Mandatory field if First Name and Last name not provided
address1 string The Address Line 1 of Account owner Optional field
address2 string The Address Line 2 of Account owner Optional field
city string The City of Account owner Optional field
state string The State abbreviation of the Account owner Optional field
zip string The zip of the Account owner. Format: NNNNN[-NNNN] Optional field
ssn string The SSN of the Account owner Optional field
dob string The date of birth of the Account owner. Format: YYYYMMDD Optional field
idType string The Valid ID Types Optional field *1
idNo string The ID Number Optional field
idState string The ID state abbreviation Optional field

Notes:

* 1 - Valid ID Types are

ID Types Value Description
0 Drivers License USA
1 Military USA
2 Passport
3 Resident Alien ID
4 State identification
5 Student identification
6 Drivers License foreign
7 = Drivers License Canada
8 = Drivers License Mexico
9 = Other primary ID foreign
A = Matricula Consular card
B = South America Cedula

Response

Parameter Type Description
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number
lastUpdate string Approximately how long ago the Account was updated
addClosedDate string Approximately how long ago a closed date was added to the Account

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Communication Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with AOA service

CheckAccountStatusWithDates

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        DetailedStatusCodeResultWithDates response = aoaSvc.CheckAccountStatusWithDates(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://www.lyonsreg.com/WebServices/AOAService">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckAccountStatusWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountStatusWithDates>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatusWithDates",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckAccountStatusWithDates>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
        </aoa:accountStatusRequest>
      </aoa:CheckAccountStatusWithDates>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatusWithDates")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public int call(IAOAService svc,  String token, String returnDetails, AccountStatusRequest accountStatusRequest)
            throws StopProcesingException {
        int code = -1;
        try {
            DetailedStatusCodeResultWithDates res = svc.CheckAccountStatusWithDates(token, returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckAccountStatusWithDates is null");
            code = res.getStatusCode();                        
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckAccountStatus(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckAccountStatusWithDates(...) method", e);
            handleError("Error calling the IAOAService.CheckAccountStatusWithDates(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<CheckAccountStatusWithDates>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                    "</aoa:accountStatusRequest>"+
                "</CheckAccountStatusWithDates>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckAccountStatusWithDates", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
     <CheckAccountStatusWithDatesResponse xmlns="http://tempuri.org/">
         <CheckAccountStatusResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:statusDescription>Accept</a:statusDescription>
            <a:primaryInstitution>
               <a:Address>451 HUNGERFORD DR STE 119-180,</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Name>PREMIER DELMARVA BANK &amp; TRUST</a:Name>
               <a:Phone>(301) 602-9597</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
               <a:Country>US</a:Country>
            </a:primaryInstitution>
            <a:validRtn>true</a:validRtn>
            <a:lastUpdate>20201214</a:lastUpdate>
            <a:addClosedDate>20201214</a:addClosedDate>
         </CheckAccountStatusResult>
      </CheckAccountStatusWithDatesResponse>
   </s:Body>
</s:Envelope>

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Do not provide this object.

Response

Parameter Type Description Field Status
statusCode number Numeric representation of account verification
statusDescription string Description of status code representation of both Account status and Ownership Verification
validRtn boolean True if the provided routing number is verified.
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number
lastUpdate string Approximately how long ago the Account was updated
addClosedDate string Approximately how long ago a closed date was added to the Account

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with AOA web service

CheckOverallAccountStatusWithOwnersipInfo

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc");
try{
    using (ChannelFactory<IAOAService> fact = new ChannelFactory<IAOAService>(myBinding, myEndpoint))
    {
        IAOAService aoaSvc = fact.CreateChannel();
        AOAResponse response = aoaSvc.CheckOverallAccountStatusWithOwnersipInfo(token, returnDetails, accountStatusRequest);
    }
}
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aoa="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract">
   <soapenv:Header/>
   <soapenv:Body>
      <aoa:CheckOverallAccountStatusWithOwnersipInfo>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckOverallAccountStatusWithOwnersipInfo>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckOverallAccountStatusWithOwnersipInfo",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:aoa=""http://www.lyonsreg.com/WebServices/AOAService"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<aoa:CheckOverallAccountStatusWithOwnersipInfo>
         <aoa:token>xxxxxxxxxxxxxxxxxxxxxx</aoa:token>
         <aoa:returnDetails>true</aoa:returnDetails>
         <aoa:accountStatusRequest>
            <aoa:rtn>XXXXXXXXXX</aoa:rtn>
            <aoa:account>XXXXXXX</aoa:account>
            <aoa:amount>XXXXXXX</aoa:amount>
            <aoa:customerPresent>xxxxxxxxxxx</aoa:customerPresent>
            <aoa:country>US</aoa:country>
            <aoa:accountOwner>             
               <aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>           
               <aoa:city>xxxxxxxxxxxxxx</aoa:city>           
               <aoa:state>XX</aoa:state>             
               <aoa:address1>XXXX</aoa:address1>
               <aoa:zip>XXXX</aoa:zip>              
              <aoa:ssn>XXXXXXX</aoa:ssn>       
            </aoa:accountOwner>
        </aoa:accountStatusRequest>
      </aoa:CheckOverallAccountStatusWithOwnersipInfo>"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckOverallAccountStatusWithOwnersipInfo")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public DetailedStatusCodeResult call(IAOAService svc,string token, string returnDetails, AccountStatusRequest accountStatusRequest)
        throws StopProcesingException {
        InstitutionAddress details = null;
        Int code = -1;
        DetailedStatusCodeResult detailedStatus = null;
        try {
            DetailedStatusCodeResult res = svc.CheckOverallAccountStatusWithOwnersipInfo(token, returnDetails, accountStatusRequest);
            Assert.notNull(res, "The returned CheckOverallAccountStatusWithOwnersipInfo is null");
            description = res.getPrimaryInstitution();
            code = res.getStatusCode();
            detailedStatus = res;
            Assert.notNull(description, "The returned StatusDescription is null");            
        } catch (ServerSOAPFaultException ex) {
            handleFault("IAOAService.CheckOverallAccountStatusWithOwnersipInfo (...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IAOAService.CheckOverallAccountStatusWithOwnersipInfo (...) method", e);
            handleError("Error calling the IAOAService.CheckOverallAccountStatusWithOwnersipInfo (...) method", e.getMessage(), true);
        }
        return detailedStatus;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:aoa='http://www.lyonsreg.com/WebServices/AOAService'>" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<aoa:CheckOverallAccountStatusWithOwnersipInfo>" +
                "<aoa:token>XXXXXXXXXXXXXXXXXXX</aoa:token>" +
                "<aoa:returnDetails>true</aoa:returnDetails>"+
                    "<aoa:accountStatusRequest>"+
                         "<aoa:aba>XXXXXX</aoa:aba>"+
                         "<aoa:account>XXXXXXX</aoa:account>"+
                         "<aoa:amount>XXXXXXXXX</aoa:amount>"+
                         "<aoa:customerPresent>XXXXXXXX</aoa:customerPresent>"+
                         "<aoa:country>US</aoa:country>"+
                         "<aoa:accountOwner>" +             
                         "<aoa:businessName>xxxxxxxxxxxxxx</aoa:businessName>"+           
                         "<aoa:city>xxxxxxxxxxxxxx</aoa:city>"+           
                         "<aoa:state>XX</aoa:state>"+             
                         "<aoa:address1>XXXX</aoa:address1>"+
                         "<aoa:zip>XXXX</aoa:zip>"+              
                         "<aoa:ssn>XXXXXXX</aoa:ssn>"+       
                         "</aoa:accountOwner>"+
                    "</aoa:accountStatusRequest>"+
                "</aoa:CheckOverallAccountStatusWithOwnersipInfo >" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://www.lyonsreg.com/WebServices/AOAService/IAOAService/CheckOverallAccountStatusWithOwnersipInfo ", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
       <CheckOverallAccountStatusWithOwnersipInfoResponse xmlns="http://tempuri.org/">
         <CheckOverallAccountStatusWithOwnersipInfoResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.AOAServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:statusCode>101</a:statusCode>
            <a:validRtn>true</a:validRtn>
            <a:ownershipStatusCode>103</a:ownershipStatusCode>
            <a:overallStatusCode>103</a:overallStatusCode>
            <a:businessOrFullNameMatch>N</a:businessOrFullNameMatch>
            <a:firstNameMatch>U</a:firstNameMatch>
            <a:lastNameMatch>U</a:lastNameMatch>
            <a:cityMatch>U</a:cityMatch>
            <a:stateMatch>U</a:stateMatch>
            <a:zipMatch>U</a:zipMatch>
            <a:ssnMatch>U</a:ssnMatch>
            <a:dobMatch>U</a:dobMatch>
            <a:idMatch>U</a:idMatch>
            <a:primaryInstitution>
               <a:Address>XXXXXXXXXXXX</a:Address>
               <a:City>ROCKVILLE</a:City>
               <a:Country>US</a:Country>
               <a:Name>XXXXXXXXXXXX</a:Name>
               <a:Phone>XXX-XXX-XXXX</a:Phone>
               <a:PostalCode>20850-0000</a:PostalCode>
               <a:State>MD</a:State>
            </a:primaryInstitution>
            <a:lastUpdate>>3 years</a:lastUpdate>
            <a:addClosedDate>>3 years</a:addClosedDate>
         </CheckOverallAccountStatusWithOwnersipInfoResult>
      </CheckOverallAccountStatusWithOwnersipInfoResponse>
   </s:Body>
</s:Envelope>

Returns both Account status code and Account Ownership Status code for an account from the AOA network.

Request

Parameter Type Description Field Status
token string The session token returned by the Logon call Mandatory field
returnDetails string Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. Optional field
accountStatusRequest Object Account status request details Mandatory object
rtn string The routing number to search Mandatory field
accountNo string The account number at the financial institution Mandatory field
amount string The amount of the transaction.Format(no commas):NNN0.00 Optional field
customerPresent string Flag whether the client is present at time of request (provide 1 or 0) Optional field
denyNsf string Flag to deny non sufficient funds (provide 1 or 0) Optional field
country string Two character country code. Optional field
accountOwner Object Account Owner details Mandatory object
firstName string The first name of the Account owner Mandatory field if Business Name not provided
lastName string The last name of the Account owner Mandatory field if Business Name not provided
middleName string The middle name of the Account owner Optional field
namePfx string The Name Prefix Optional field
nameSfx string The Name Suffix Optional field
businessName string The Business Name of Account owner Mandatory field if First Name and Last name not provided
address1 string The Address Line 1 of Account owner Optional field
address2 string The Address Line 2 of Account owner Optional field
city string The City of Account owner Optional field
state string The State abbreviation of the Account owner Optional field
zip string The zip of the Account owner. Format: NNNNN[-NNNN] Optional field
ssn string The ssn of the Account owner. Format: [NNNNN]NNNN Optional field
dob string The date of birth of the Account owner. Format: YYYYMMDD Optional field
idType string The Valid ID Types Optional field *1
idNo string The ID Number Optional field
idState string The ID state abbreviation Optional field

Notes:
* 1 - Valid ID Types are

ID Types Value Description
0 Drivers License USA
1 Military USA
2 Passport
3 Resident Alien ID
4 State identification
5 Student identification
6 Drivers License foreign
7 Drivers License Canada
8 Drivers License Mexico
9 Other primary ID foreign
A Matricula Consular card
B South America Cedula

Response

Parameter Type Description
statusCode number Numeric representation of account verification
validRtn boolean True if the provided routing number is verified.
ownershipStatusCode number Numeric representation of account Ownership verification
overallStatusCode number Numeric representation of combined status(Account status and Ownership) verification
businessOrFullNameMatch string Indicates if Business or full name is matched
firstNameMatch string Indicates if first name is matched
lastNameMatch string Indicates if last name is matched
cityMatch string Indicates if city name is matched
stateMatch string Indicates if state name is matched
zipMatch string Indicates if zip code is matched
ssnMatch string Indicates if ssn is matched
dobMatch string Indicates if date of birth is matched
idMatch string Indicates if id is matched
primaryInstitution Object Primary financial institution if requested.
name string Complete name of the financial institution
address string Physical address line
city string City
state string State
postalCode string Address postal code
country string Two character country code.
phone string Main phone number
lastUpdate string Approximately how long ago the Account was updated
addClosedDate string Approximately how long ago a closed date was added to the Account

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system administration
Internal Communication Error Internal Application Error, contact system administration
Internal Error(Configuration) No Vendor has been set for this customer product
Communication Error(AOA) Error communicating with (AOA) service

OFAC

/**
 *
 *    You can find fully functional example client project here.
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */
/**
 *
 *    You can find fully functional example client project here.
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 *  Alternativelly, Upload the binary form of the libraries  here
 *
 */

Returns results for a name scanned against the OFAC list This web service cross-references a submitted name against the Office of Foreign Asset Controls (OFAC) SDN watch list, the Bureau of Industry and Security (BIS) Denied Persons list, and the new Non-SDN list (NS-PLC). The function returns any potential matches along with a score, indicating the likelihood of an actual match. Lyons will scan the Specially Designated Nations (SDN) and the Bureau of Industry and Security (BIS) Denied Person List for your submitted names and/or country. The results are returned with a weighted score, aliases, the entity type and the list(s) where the name was found.

WSDL URL

https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc?singleWsdl

OFACLogonScanName

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc");
try{
    using (ChannelFactory<IOFACService> fact = new ChannelFactory<IOFACService>(myBinding, myEndpoint))
    {
        IOFACService ofacSvc = fact.CreateChannel();
        OFACListResponse response = ofacSvc.OFACLogonScanName(companyId, userName, password, name);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:OFACLogonScanName>
         <tem:companyId>XXXX</tem:companyId>
         <tem:userName>XXXXXX</tem:userName>
         <tem:password>XXXXX</tem:password>
         <tem:name>XXX</tem:name>
      </tem:OFACLogonScanName>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IOFACService/OFACLogonScanName",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & " <tem:OFACLogonScanName>
         <tem:companyId>xxxx</tem:companyId>
         <tem:userName>xxxxx</tem:userName>
         <tem:password>xxxxxxx</tem:password>
         <tem:name>xxxxx</tem:name>
      </tem:OFACLogonScanName>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IOFACService/OFACLogonScanName")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Entity> call(IOFACService svc, Int companyId, String username, String password, String name)
            throws StopProcesingException {
        EntityList entList = null;
        try {
            EntityListResult res = svc.OFACLogonScanName(token, aba, account, amount, customerPresent);
            Assert.notNull(res, "The returned EntityListResult is null");
            entList = res.getEntities();  
            Assert.notNull(entList, "The returned EntityList is null");                      
        } catch (ServerSOAPFaultException ex) {
            handleFault("IOFACService.OFACLogonScanName(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IOFACService.OFACLogonScanName(...) method", e);
            handleError("Error calling the IOFACService.OFACLogonScanName(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:OFACLogonScanName>" +
                "<tem:companyId>XXX</tem:companyId>" +
                "<tem:userName>XXXXXX</tem:userName>"+
                "<tem:password>XXXXXX</tem:password>"+
                "<tem:name>XXXXX</tem:name>"+
                "</tem:OFACLogonScanName>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://tempuri.org/IOFACService/OFACLogonScanName", function (response, ctx) {
    console.log(response);
    /*Your response is in XML and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <OFACLogonScanNameResponse xmlns="http://tempuri.org/">
         <OFACLogonScanNameResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.OFACScan" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <entities>
               <entity>
                  <entityNumber>7224</entityNumber>
                  <fullName>MAMO, Eliyahu</fullName>
                  <entityType>aka</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>7304c49b-fe90-40d8-a04e-e5fcc6f75f1e</guid>
                  <score>80</score>
               </entity>
               <entity>
                  <entityNumber>11082</entityNumber>
                  <fullName>SHAMIM</fullName>
                  <entityType>vessel</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>7304c49b-fe90-40d8-a04e-e5fcc6f75f1e</guid>
                  <score>81.632653061224488</score>
               </entity>               
            </entities>
         </OFACLogonScanNameResult>
      </OFACLogonScanNameResponse>
   </s:Body>
</s:Envelope>

OFAC Logon to service and checks an individuals name or company's name against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Security (BIS) Denied Persons list and the Non-SDN list (NS-PLC).

Request

Parameter Type Description
companyId int The ID of the company the user is associated with
userName string the full username
password string the full password
name string full name for search query

Response

Parameter Type Description
entityNumber integer A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name).
fullname string The full name of the entity.
nameForProcessing string The adjusted entity name that was used for matching.
nameInAscii string The ASCII equivalent of the name.
entityType string Identifies the entity as an individual, aircraft, vessel, etc.
country string Two character country code.
listType string The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc.
guid string A temporary globally unique identifier for referencing this entity. This identifier will changes hourly.
score integer An indicator with values between 80 and 100 of the matching likelihood.

Error Messages

Message Description
Internal system error - 67 Internal system error, please contact system administration
Must pass a name when searching. Empty search name

OFACScanName

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc");
try{
    using (ChannelFactory<IOFACService> fact = new ChannelFactory<IOFACService>(myBinding, myEndpoint))
    {
        IOFACService ofacSvc = fact.CreateChannel();
        OFACListResponse response = ofacSvc.OFACScanName(token, name);
    }
}
catch(Exception ex){ }

in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:OFACScanName>
         <tem:token>XXXXXXXXXXXXXXXXXXXX</tem:token>
         <tem:name>XXXXXX</tem:name>
      </tem:OFACScanName>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IOFACService/OFACScanName",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
 Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & " <tem:OFACScanName>
         <tem:token>xxxxxxxxxxxxxxxxxxxxxx</tem:token>
         <tem:name>xxxxxx</tem:name>
      </tem:OFACScanName>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IOFACService/OFACScanName")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Entity> call(IOFACService svc, String token, String name)
            throws StopProcesingException {
        EntityList entList = null;
        try {
            EntityListResult res = svc.OFACScanName(token, name);
            Assert.notNull(res, "The returned EntityListResult is null");
            entList = res.getEntities();  
            Assert.notNull(entList, "The returned EntityList is null");                      
        } catch (ServerSOAPFaultException ex) {
            handleFault("IOFACService.OFACScanName(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IOFACService.OFACScanName(...) method", e);
            handleError("Error calling the IOFACService.OFACScanName(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:OFACScanName>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:name>XXXXX</tem:name>"+
                "</tem:OFACScanName>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your WSDL*/
proxy.send(message, "http://tempuri.org/IOFACService/OFACScanName", function (response, ctx) {
    console.log(response);
    /*Your response is in XML and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <OFACScanNameResponse xmlns="http://tempuri.org/">
         <OFACScanNameResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.OFACScan" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <entities>
               <entity>
                  <entityNumber>7224</entityNumber>
                  <fullName>MAMO, Eliyahu</fullName>
                  <entityType>aka</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>177edc8e-ef67-41f6-8cb5-bd5e71acd02b</guid>
                  <score>80</score>
               </entity>
               <entity>
                  <entityNumber>11082</entityNumber>
                  <fullName>SHAMIM</fullName>
                  <entityType>vessel</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>177edc8e-ef67-41f6-8cb5-bd5e71acd02b</guid>
                  <score>81.632653061224488</score>
               </entity>               
            </entities>
         </OFACScanNameResult>
      </OFACScanNameResponse>
   </s:Body>
</s:Envelope>

Checks an individuals name or company's name against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Security (BIS) Denied Persons list and the Non-SDN list (NS-PLC).

Request

Parameter Type Description
token string the session token returned by the Logon call
name string full name for search query

Response

Parameter Type Description
entityNumber integer A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name).
fullname string The full name of the entity.
nameForProcessing string The adjusted entity name that was used for matching.
nameInAscii string The ASCII equivalent of the name.
entityType string Identifies the entity as an individual, aircraft, vessel, etc.
country string Two character country code.
listType string The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc.
guid string A temporary globally unique identifier for referencing this entity. This identifier will changes hourly.
score integer An indicator with values between 80 and 100 of the matching likelihood.

Error Messages

Message Description
Internal system error - 89 Internal system error, please contact system administration
Internal system error - 214 Error looking up country
Internal system error - 240 Error looking up country code
[XX] is not a valid country code. Invalid country code
Must pass a name when searching. Empty search name
Must pass either a name or a valid country name or its 2-letter code when searching invalid search parameters

OFACScanCountry

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc");
try{
    using (ChannelFactory<IOFACService> fact = new ChannelFactory<IOFACService>(myBinding, myEndpoint))
    {
        IOFACService ofacSvc = fact.CreateChannel();
        OFACListResponse response = ofacSvc.OFACScanCountry(token, name, state);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:OFACScanCountry>
         <tem:token>xxxxxxxxxxxxxxx</tem:token>
         <tem:name>xxxxxxx</tem:name>
         <tem:country>xxxxxxxxxxxxx</tem:country>
      </tem:OFACScanCountry>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IOFACService/OFACScanCountry",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & " <tem:OFACScanCountry>
         <tem:token>xxxxxxxxxxxxxxx</tem:token>
         <tem:name>xxxxxxx</tem:name>
         <tem:country>xxxxxxxx</tem:country>
      </tem:OFACScanCountry>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IOFACService/OFACScanCountry")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Entity> call(IOFACService svc, String token, String name, String country)
            throws StopProcesingException {
        EntityList entList = null;
        try {
            EntityListResult res = svc.OFACScanCountry(token, name, country);
            Assert.notNull(res, "The returned EntityListResult is null");
            entList = res.getEntities();  
            Assert.notNull(entList, "The returned EntityList is null");                      
        } catch (ServerSOAPFaultException ex) {
            handleFault("IOFACService.OFACScanCountry(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IOFACService.OFACScanCountry(...) method", e);
            handleError("Error calling the IOFACService.OFACScanCountry(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:OFACScanCountry>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:name>XXXXX</tem:name>"+
                "<tem:country>XXXXXXXXX</tem:country>"+
                "</tem:OFACScanCountry>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IOFACService/OFACScanCountry", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <OFACScanCountryResponse xmlns="http://tempuri.org/">
         <OFACScanCountryResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.OFACScan" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <entities>
               <entity>
                  <entityNumber>7224</entityNumber>
                  <fullName>MAMO, Eliyahu</fullName>
                  <entityType>aka</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>ca683db9-175e-433b-9f5e-504bb0d0a301</guid>
                  <score>80</score>
               </entity>
               <entity>
                  <entityNumber>11082</entityNumber>
                  <fullName>SHAMIM</fullName>
                  <entityType>vessel</entityType>
                  <country/>
                  <listType>sdn</listType>
                  <guid>ca683db9-175e-433b-9f5e-504bb0d0a301</guid>
                  <score>81.632653061224488</score>
               </entity>               
            </entities>
         </OFACScanCountryResult>
      </OFACScanCountryResponse>
   </s:Body>
</s:Envelope>

Checks an individuals name or company's name along with country against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Securitys (BIS) Denied Persons list and the Non-SDN list (NS-PLC).

Request

Parameter Type Description
token string the session token returned by the Logon call
name string full name for search query
country string Two character country code.

Response

Parameter Type Description
entityNumber integer A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name).
fullname string The full name of the entity.
nameForProcessing string The adjusted entity name that was used for matching.
nameInAscii string The ASCII equivalent of the name.
entityType string Identifies the entity as an individual, aircraft, vessel, etc.
country string Two character country code.
listType string The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc.
guid string A temporary globally unique identifier for referencing this entity. This identifier will changes hourly.
score integer An indicator with values between 80 and 100 of the matching likelihood.

Error Messages

Message Description
Internal system error - 162 Internal system error, please contact system admin
Internal system error - 163 Internal system error, please contact system admin
Internal system error - 214 Error looking up country name
Internal system error - 240 Error looking up country code
[XX] is not a valid country code. Invalid country code
Must pass a name when searching. Empty search name
Must pass either a name or a valid country name or its 2-letter code when searching invalid search parameters

GetCountryList

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc");
try{
    using (ChannelFactory<IOFACService> fact = new ChannelFactory<IOFACService>(myBinding, myEndpoint))
    {
        IOFACService ofacSvc = fact.CreateChannel();
        GetCountryListResponse response = ofacSvc.GetCountryList(token);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetCountryList>
         <tem:token>xxxxxxxxxxxxx</tem:token>
      </tem:GetCountryList>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IOFACService/GetCountryList",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
 Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:GetCountryList>
         <tem:token>XXXXXXXXXXXXXXXXXXXXXX</tem:token>
      </tem:GetCountryList>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IOFACService/GetCountryList")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Country> call(IOFACService svc, String token)
            throws StopProcesingException {
        GetCountryList cotList = null;
        List<Country> list = null;
        try {
            CountryListResult res = svc.GetCountryList(token);
            Assert.notNull(res, "The returned EntityListResult is null");
            cotList = res.getCountries();  
            Assert.notNull(entList, "The returned CountryList is null");                      
            list = res.getCountry();  
            Assert.notNull(entList, "The returned List<Country> is null");   
        } catch (ServerSOAPFaultException ex) {
            handleFault("IOFACService.GetCountryList(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IOFACService.GetCountryList(...) method", e);
            handleError("Error calling the IOFACService.GetCountryList(...) method", e.getMessage(), true);
        }
        return list;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:GetCountryList>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "</tem:GetCountryList>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IOFACService/GetCountryList", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetCountryListResponse xmlns="http://tempuri.org/">
         <CountryListResult xmlns:a="http://schemas.datacontract.org/2004/07/OFACService.Lyons.OFACServiceContract" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <countries>
               <country>
                  <code>AF</code>
                  <name>AFGHANISTAN</name>
               </country>
               <country>
                  <code>AL</code>
                  <name>ALBANIA</name>
               </country>
               <country>
                  <code>DZ</code>
                  <name>ALGERIA</name>
               </country>
               <country>
                  <code>AO</code>
                  <name>ANGOLA</name>
               </country>
               <country>
                  <code>AR</code>
                  <name>ARGENTINA</name>
               </country>
               <country>
                  <code>AM</code>
                  <name>ARMENIA</name>
               </country>
            </countries>
         </CountryListResult>
      </GetCountryListResponse>
   </s:Body>
</s:Envelope>

Returns a list of countries from the OFAC database.

Request

Parameter Type Description
token string the session token returned by the Logon call

Response

Parameter Type Description
code integer Country 2 letter code
name string Full country name

Error Messages

Message Description
Internal system error - 187 Internal system error, please contact system admin
Internal system error - 188 Internal system error, please contact system admin

OFACScanNameFullRecord

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc");
try{
    using (ChannelFactory<IOFACService> fact = new ChannelFactory<IOFACService>(myBinding, myEndpoint))
    {
        IOFACService ofacSvc = fact.CreateChannel();
        FullEntityListResult response = ofacSvc.OFACScanNameFullRecord(token, name, state);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:OFACScanNameFullRecord>
         <tem:token>XXXXXXXXXXXXXX</tem:token>
         <tem:name>XXXXXX</tem:name>
         <tem:country>XXXXXXX</tem:country>
      </tem:OFACScanNameFullRecord>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IOFACService/OFACScanNameFullRecord",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:OFACScanNameFullRecord>
         <tem:token>XXXXXXXXXXXXXXXXXXXX</tem:token>
         <tem:name>XXXX</tem:name>
         <tem:country>XXXXX</tem:country>
      </tem:OFACScanNameFullRecord>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IOFACService/OFACScanNameFullRecord")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Entity> call(IOFACService svc, String token, String name, String country)
            throws StopProcesingException {
        FullEntityList entList = null;
        try {
            FullEntityListResult res = svc.OFACScanNameFullRecord(token, name, country);
            Assert.notNull(res, "The returned FullEntityListResult is null");
            entList = res.getEntities();  
            Assert.notNull(entList, "The returned FullEntityList is null");                      
        } catch (ServerSOAPFaultException ex) {
            handleFault("IOFACService.OFACScanNameFullRecord(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IOFACService.OFACScanNameFullRecord(...) method", e);
            handleError("Error calling the IOFACService.OFACScanNameFullRecord(...) method", e.getMessage(), true);
        }
        return status;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/ofac/OFACServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:OFACScanNameFullRecord>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:name>xxxxxxxxxx</tem:name>" +
                "<tem:country>xxxxxxxxxxxxxxxxxxx</tem:country>" +
                "</tem:OFACScanNameFullRecord>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IOFACService/OFACScanNameFullRecord", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <OFACScanNameFullRecordResponse xmlns="http://tempuri.org/">
         <OFACScanNameFullRecordResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.OFACScan" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <entities>
               <fullEntity>
                  <entityNumber>16</entityNumber>
                  <fullName>AIMAN AMMAR</fullName>
                  <entityType i:nil="true"/>
                  <country>US</country>
                  <listType>bis_dpl</listType>
                  <guid>65a732e8-3059-41a7-b714-57d8d31cdcc9</guid>
                  <score>80</score>
                  <program>BIS DPL List</program>
                  <remarks/>
                  <sdnType/>
                  <title/>
                  <callSign/>
                  <vessType/>
                  <vessTonnage/>
                  <vessGRT/>
                  <vessFlag/>
                  <vessOwner/>
                  <dob/>
                  <pob/>
                  <passport/>
                  <cedula/>
                  <citizen/>
                  <additionalAddress>
                     <entityAddress>
                        <address>1265 CAMDEN WAY</address>
                        <city>YUBA CITY</city>
                        <state>CA</state>
                        <postalCode/>
                        <country>US</country>
                        <addrRemarks i:nil="true"/>
                     </entityAddress>
                  </additionalAddress>
                  <additionalAlias>
                     <entityAlias>
                        <fullName>EL-MASRI, Moshir</fullName>
                        <entType>aka</entType>
                        <remarks/>
                     </entityAlias>
                     <entityAlias>
                        <fullName>AL-HABAL, Mushir</fullName>
                        <entType>individual</entType>
                        <remarks/>
                     </entityAlias>
               </fullEntity>           
            </entities>
         </OFACScanNameFullRecordResult>
      </OFACScanNameFullRecordResponse>
   </s:Body>
</s:Envelope>

Checks an individuals name or companys name along with country against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Securitys (BIS) Denied Persons list and the Non-SDN list (NS-PLC) and retrieve the full list information for that search.

Request

Parameter Type Description
token string the session token returned by the Logon call
name string full name for search query
country string Two character country code.

Response

Parameter Type Description
entityNumber integer A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name).
fullname string The full name of the entity.
nameForProcessing string The adjusted entity name that was used for matching.
nameInAscii string The ASCII equivalent of the name.
entityType string Identifies the entity as an individual, aircraft, vessel, etc.
country string Two character country code.
listType string The list in which it appears. Abbreviations may be used, e.g. "sdn" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "plc" for "Palestinian Legislative Council", etc.
guid string A temporary globally unique identifier for referencing this entity. This identifier will changes hourly.
score double An indicator with values between 80 and 100 of the matching likelihood.
program string The name/abbreviation of the sanction program.
remarks string Additional information, if any, about the entiry.
sdnType string Currently it is the same as the entityType.
title string If the entity is an individual, the individual's title.
callSign string If the entity is a vessel, the vessel's call sign.
vessType string The vessel type, e.g. "Bulk Cargo", "Container Ship", "Ferry", etc.
vessTonnage string The vessel's tonnage.
vessGRT string The vessel's gross registered tonnage.
vessFlag string The vessel's flag.
vessOwner string The vessel's owner.
dob string date of birth of the entity (blank)
passport string If an entity is an individual, this is the pasport number.
additionalAddress Object List A list of addresses the entity is known to posses.
- address string The full address for the additional address.
- city string The city for the additional address.
- state string The state for the additional address.
- postalCode string The postal code for the additional address.
- country string Two character country code.
- addrRemarks string Additional information about the address.
additionalAlias Object List A list of alternative identities of the entity.
- fullName string The full name of the entity.
- entType string Identifies the entity as a person, business, vessel, etc.
- remarks string Additional information about the address.

Error Messages

Message Description
Internal system error - 167 Internal system error, please contact system admin
Internal system error - 214 Error looking up country name
Internal system error - 240 Error looking up country code
[XX] is not a valid country code. Invalid country code
Must pass a name when searching. Empty search name
Must pass either a name or a valid country name or its 2-letter code when searching invalid search parameters

RTN

/**
 *
 *    You can find fully functional example client project here.
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */
/**
 *
 *    You can find fully functional example client project here.
 *  Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 *  Alternativelly, Upload the binary form of the libraries  here
 *
 */

The RTN Web Service API provides the most information about each institution including main and branch information with institution names, routing numbers, addresses, phone numbers and much more. Currently the RTN service provides information for both US and Canadian financial institutions.

Lyons will determine if the routing number is currently active, and will return the routing and demographic information for the institution associated with the searched routing number.

Check under each code language tab for example projects that demonstrate how to correctly use the web service contracts and proper configurations for the service and the method calls.

WSDL Url

https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc?singleWsdl

Error Messages

Message Description
Internal server error Internal Application Error, contact system admin
No financial institutions found No financial institutions found for that ABA

VerifyRTN

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        BooleanResponse response = rtnSvc.VerifyRTN(token, aba, country, includeInactives, includeHistory);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:VerifyRTN>
         <tem:token>XXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:VerifyRTN>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/VerifyRTN",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
 Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:VerifyRTN>
         <tem:token>XXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXX</tem:rtn>
         <tem:country>XXX</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:VerifyRTN>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/VerifyRTN")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public boolean call(IABAService svc, String token, String rtn, String country, Boolean includeInactives, Boolean includeHistory)
            throws StopProcesingException {
        boolean valid = false;
        try {
            BooleanResult res = svc.verifyABA(token, rtn, country, includeInactives, includeHistory);
            Assert.notNull(res, "The returned BooleanResult is null");
            valid = res.isValue();
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.verifyRTN(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.verifyRTN(...) method", e);
            handleError("Error calling the IRTNService.verifyRTN(...) method", e.getMessage(), true);
        }
        return ivalid;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:VerifyRTN>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:rtn>XXXXXXXX</tem:rtn>" +
                "<tem:country>US</tem:country>" +
                "<tem:includeInactive>true</tem:includeInactive>" +
                "<tem:includeHistory>true</tem:includeHistory>" +
                "</tem:VerifyRTN>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/VerifyRTN", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <VerifyRTNResponse xmlns="http://tempuri.org/">
         <VerifyRTNResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true"/>
            <value>true</value>
         </VerifyRTNResult>
      </VerifyRTNResponse>
   </s:Body>
</s:Envelope>

Lookup Routing Number on Lyons Server and return true if found.

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
country string Two character country code.
includeInactives boolean flag to determin if search should include inactive routing numbers
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
status boolean Status of routing number

VerifyWire(RTN)

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        BooleanResponse response = rtnSvc.VerifyWire(token, aba, country, includeInactives, includeHistory);
    }
}
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:VerifyWire>
         <tem:token>XXXXXXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeHistory>false</tem:includeHistory>
      </tem:VerifyWire>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/VerifyWire",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & " <tem:VerifyWire>
         <tem:token>XXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeHistory>false</tem:includeHistory>
      </tem:VerifyWire>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/VerifyWire")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public boolean call(IABAService svc, String token, String rtn, String country, Boolean includeInactives, Boolean includeHistory)
            throws StopProcesingException {
        boolean valid = false;
        try {
            BooleanResult res = svc.verifyABA(token, rtn, country, includeInactives, includeHistory);
            Assert.notNull(res, "The returned BooleanResult is null");
            valid = res.isValue();
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.verifyWire(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.verifyWire(...) method", e);
            handleError("Error calling the IRTNService.verifyWire(...) method", e.getMessage(), true);
        }
        return ivalid;
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:VerifyWire>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:rtn>XXXXXXXX</tem:rtn>" +
                "<tem:country>US</tem:country>" +
                "<tem:includeInactive>true</tem:includeInactive>" +
                "<tem:includeHistory>true</tem:includeHistory>" +
                "</tem:VerifyWire>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/VerifyWire", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <VerifyWireResponse xmlns="http://tempuri.org/">
         <VerifyWireResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true"/>
            <value>true</value>
         </VerifyWireResult>
      </VerifyWireResponse>
   </s:Body>
</s:Envelope>

Lookup the Routing Number as a wire on Lyons Server and return true if found.

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
country string Two character country code.
includeInactives boolean flag to determine if inactive routing numbers should be included in search
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
status boolean Status of routing number

GetInstitutionsDetailsPrimaryFirst(RTN)

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        InstitutionListResponse response = rtnSvc.GetInstitutionsDetailsPrimaryFirst(token, aba, country, includeInactive, includeHistory);
    }
}
catch (FaultException fe)
         {
           MessageFault mf = fe.CreateMessageFault();
           string errorDetail = null;
           if (mf.HasDetail)
           {
               ErrorResult errorData = mf.GetDetail<InstitutionListResult>();
               errorDetail = errorData.ErrorMesssage;
               Console.WriteLine(" --> Error: {0}", errorDetail);
           }
           result = new InstitutionListResult(errorDetail);
 }
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetInstitutionsDetailsPrimaryFirst>
         <tem:token>XXXXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeWireSearch>false</tem:includeWireSearch>
         <tem:includeHistory>false</tem:includeHistory>
      </tem:GetInstitutionsDetailsPrimaryFirst>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/GetInstitutionsDetailsPrimaryFirst",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:GetInstitutionsDetailsPrimaryFirst>
         <tem:token>XXXXXXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeWireSearch>false</tem:includeWireSearch>
         <tem:includeHistory>false</tem:includeHistory>
      </tem:GetInstitutionsDetailsPrimaryFirst>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/GetInstitutionsDetailsPrimaryFirst")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Institution> call(IRTNService svc, String token, String rtn, String country, Boolean includeInactive, Boolean includeHistory)
            throws StopProcesingException {
        InstitutionList instLst = null;
        try {
            InstitutionListResult res = svc.GetInstitutionsDetailsPrimaryFirst(token, rtn, country, includeInactive, includeWireSearch, includeHistory);
            Assert.notNull(res, "The returned InstitutionListResult is null");
            instLst = res.getInstitutions();
            Assert.notNull(instLst, "The returned InstitutionList is null");
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.GetInstitutionsDetailsPrimaryFirst(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.GetInstitutionsDetailsPrimaryFirst(...) method", e);
            handleError("Error calling the IRTNService.GetInstitutionsDetailsPrimaryFirst(...) method", e.getMessage(), true);
        }
        return instLst.getInstitution();
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:GetInstitutionsDetailsPrimaryFirst>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:rtn>XXXXXXXX</tem:rtn>" +
                "<tem:country>US</tem:country>" +
                "<tem:includeInactive>true</tem:includeInactive>" +
                "<tem:includeWireSearch>true</tem:includeWireSearch>" +
                "<tem:includeHistory>true</tem:includeHistory>" +
                "</tem:GetInstitutionsDetailsPrimaryFirst>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/GetInstitutionsDetailsPrimaryFirst", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetInstitutionsDetailsPrimaryFirstResponse xmlns="http://tempuri.org/">
         <GetInstitutionsDetailsPrimaryFirstResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.RTNService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:institutions>
               <a:institution>
                  <a:institutionId>1</a:institutionId>
                  <a:legacyLyonsId>1</a:legacyLyonsId>
                  <a:mainInstitutionId i:nil="true"/>
                  <a:externalInstitutionId i:nil="true"/>
                  <a:institutionType>Banks</a:institutionType>
                  <a:name>STATE BANK OF MISSOURI</a:name>
                  <a:branchName>STATE BANK OF MISSOURI</a:branchName>
                  <a:addressLine1>101 NW 2ND ST</a:addressLine1>
                  <a:addressLine2 i:nil="true"/>
                  <a:city>CONCORDIA</a:city>
                  <a:state>MO</a:state>
                  <a:country>US</a:country>
                  <a:postalCode>64020-0000</a:postalCode>
                  <a:mailingAddr>PO BOX 819; CONCORDIA, MO 64020</a:mailingAddr>
                  <a:fedWire>false</a:fedWire>
                  <a:swift/>
                  <a:fax>660-463-2196</a:fax>
                  <a:telex/>
                  <a:homePage>www.gostatebank.com</a:homePage>
                  <a:notes/>
                  <a:active>true</a:active>
                  <a:branchCount>5</a:branchCount>
                  <a:routingNumbers>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ABA</a:purpose>
                        <a:fractional>XXXXXXXXX19</a:fractional>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ACH</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>true</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>true</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:18:15.980-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>false</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:17:15.390-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                        </a:history>
                     </a:institutionRoutingNumber>
                  </a:routingNumbers>
                  <a:contacts>
                     <a:contact>
                        <a:contactType>Adjust</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Customer Service</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>ACH</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Wire</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Institution</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email>sbminfo@gostatebank.com</a:email>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Return</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                  </a:contacts>
                  <a:correspondents>
                     <a:correspondent>
                        <a:correspondentInstitutionId>1</a:correspondentInstitutionId>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:account i:nil="true"/>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:notes i:nil="true"/>
                     </a:correspondent>
                  </a:correspondents>
                  <a:internationalCorrespondents>
                     <a:internationalCorrespondent>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:swift>UMKCUS44</a:swift>
                        <a:participant>true</a:participant>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:accountNumber i:nil="true"/>
                     </a:internationalCorrespondent>
                  </a:internationalCorrespondents>
               </a:institution
                <a:institution>
                  <a:institutionId>2</a:institutionId>
                  <a:legacyLyonsId>123</a:legacyLyonsId>
                  <a:mainInstitutionId>12343</a:mainInstitutionId>
                  <a:externalInstitutionId i:nil="true"/>
                  <a:institutionType>Banks</a:institutionType>
                  <a:name>STATE BANK OF MISSOURI</a:name>
                  <a:branchName>STATE BANK OF MISSOURI</a:branchName>
                  <a:addressLine1>114 S COUNTY RD</a:addressLine1>
                  <a:addressLine2 i:nil="true"/>
                  <a:city>ALMA</a:city>
                  <a:state>MO</a:state>
                  <a:country>US</a:country>
                  <a:postalCode>64001-0000</a:postalCode>
                  <a:mailingAddr>PO BOX 199; ALMA, MO 64001</a:mailingAddr>
                  <a:fedWire>false</a:fedWire>
                  <a:swift/>
                  <a:fax>660-674-2801</a:fax>
                  <a:telex/>
                  <a:homePage>www.gostatebank.com</a:homePage>
                  <a:notes/>
                  <a:active>true</a:active>
                  <a:branchCount>0</a:branchCount>
                  <a:routingNumbers>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ABA</a:purpose>
                        <a:fractional>XXXXXXXXX19</a:fractional>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ACH</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>true</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>true</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:23:21.830-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>false</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:21:10.373-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                        </a:history>
                     </a:institutionRoutingNumber>
                  </a:routingNumbers>
                  <a:contacts>
                     <a:contact>
                        <a:contactType>Adjust</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Customer Service</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>ACH</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Wire</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Institution</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email>sbminfo@gostatebank.com</a:email>
                        <a:phoneNumber>(660) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Return</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                  </a:contacts>
                  <a:correspondents>
                     <a:correspondent>
                        <a:correspondentInstitutionId>86699</a:correspondentInstitutionId>
                        <a:routingNumber>101000695</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:account i:nil="true"/>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:notes i:nil="true"/>
                     </a:correspondent>
                  </a:correspondents>
                  <a:internationalCorrespondents>
                     <a:internationalCorrespondent>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:swift>UMKCUS44</a:swift>
                        <a:participant>true</a:participant>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:accountNumber i:nil="true"/>
                     </a:internationalCorrespondent>
                  </a:internationalCorrespondents>
               </a:institution>

            </a:institutions>
        </GetInstitutionsDetailsPrimaryFirstResult>
     </GetInstitutionsDetailsPrimaryFirstResponse>
   </s:Body>
</s:Envelope>

Returns a list of financial institutions with full details for an RTN sorted by main locations first.

The mainInstitutionId attribute in the returned institution objects has the following meaning:

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
country string Two character country code.
includeInactive boolean flag to determine if inactive routing numbers should be included in search
includeWireSearch boolean flag to determine if Wire routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
institutionId int The institution identification number associated with the institution
legacyLyonsId int The old lyons institution identification number associated with the institution
mainInstitutionId int The institution identification number associated with this institutions main branch
externalInstitutionId int The external institution identification number associated with canadian institutions which is referred to FinancialInstitutionID
institutionType string Institution Type
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
mailingAddr string Mailing Address
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fax string Main Fax Number
telex string TELEX identifier
homePage string Institutions Internet home page / URL
notes string Account Notes
active boolean Active Institution
branchCount int The number of branches as defined for Main institutions.
routingNumbers array list of routingNumber objects that are connected with this institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- fractional string 11 Digit Fractional code.
-- correspondent boolean If the routing number comes from a correspondent institution.
-- active boolean Indicates if the routing number used is in active state.
-- preferred boolean Indicates if the routing number used is preferred one.
-- useForTransactions boolean If this routing number is used for transactions
-- notes string Notes for particular routing number
--routingNumberHistory Array A list of previous routing numbers for this record
----routingNumber string Routing Number
---- purpose string The application of this routing number Electronic, Paper, or Wire
---- fractional string 11 Digit Fractional code.
---- correspondent boolean If the routing number comes from a correspondent institution.
----active boolean Indicates if the routing number used is in active state.
---- preferred boolean Indicates if the routing number used is preferred one.
---- useForTransactions boolean If this routing number is used for transactions
---- notes string Notes for particular routing number
---- archivedDate string The EST date and time this record was created.
contacts array list of contacts that are connected with this institution
-- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
-- name string name for contact
-- email string Primary or corporate e-mail address for contact
-- phoneNumber string phone number for contact
-- Extension string phone number Extension for contact
correspondents array list of correspondent institutions associated with this branches routing number
--correspondentInstitutionId int The institution identification number associated with the correspondent institution
-- institutionName string Institution Name
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- account string Correspondent Account Number
-- notes string Notes for particular routing number
internationalCorrespondents array list of International correspondent institutions associated with this branches routing number
-- institutionName string Institution Name
-- swift string Society for Worldwide Interbank Financial Communications.' Within the. international transfer world, SWIFT is a universal messaging system. SWIFTs are BICs. (Bank Identifier Code) connected to the S.W.I.F.T. network
-- participant boolean Indicates if the Institution is participant.
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- accountNumber string International correspondent account number.

GetInstitutionsDetailsBySwift(RTN)

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        InstitutionListResponse response = rtnSvc.GetInstitutionsDetailsBySwift(token, swift, country, includeInactive, includeRoutingNumberHistory);
    }
}
catch (FaultException fe)
         {
           MessageFault mf = fe.CreateMessageFault();
           string errorDetail = null;
           if (mf.HasDetail)
           {
               ErrorResult errorData = mf.GetDetail<InstitutionListResult>();
               errorDetail = errorData.ErrorMesssage;
               Console.WriteLine(" --> Error: {0}", errorDetail);
           }
           result = new InstitutionListResult(errorDetail);
 }
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetInstitutionsDetailsBySwift>
         <tem:token>XXXXXXXXX</tem:token>
         <tem:swift>XXXXXXX</tem:swift>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeRoutingNumberHistory>true</tem:includeRoutingNumberHistory>
      </tem:GetInstitutionsDetailsBySwift>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/GetInstitutionsDetailsBySwift",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:GetInstitutionsDetailsBySwift>
         <tem:token>XXXXXXXXXXXXXXXXXX</tem:token>
         <tem:swift>XXXXXXXX</tem:swift>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeRoutingNumberHistory>true</tem:includeRoutingNumberHistory>
      </tem:GetInstitutionsDetailsBySwift>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/GetInstitutionsDetailsBySwift")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public List<Institution> call(IRTNService svc, String token, String swift, String country, Boolean includeInactive, Boolean includeRoutingNumberHistory)
            throws StopProcesingException {
        InstitutionList instLst = null;
        try {
            InstitutionListResult res = svc.GetInstitutionsDetailsBySwift(token, swift, country, includeInactive, includeRoutingNumberHistory);
            Assert.notNull(res, "The returned InstitutionListResult is null");
            instLst = res.getInstitutions();
            Assert.notNull(instLst, "The returned InstitutionList is null");
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.GetInstitutionsDetailsBySwift(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.GetInstitutionsDetailsBySwift(...) method", e);
            handleError("Error calling the IRTNService.GetInstitutionsDetailsBySwift(...) method", e.getMessage(), true);
        }
        return instLst.getInstitution();
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:GetInstitutionsDetailsBySwift>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:swift>XXXXXXXX</tem:swift>" +
                "<tem:country>US</tem:country>" +
                "<tem:includeInactive>true</tem:includeInactive>" +
                "<tem:includeRoutingNumberHistory>true</tem:includeRoutingNumberHistory>" +
                "</tem:GetInstitutionsDetailsBySwift>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/GetInstitutionsDetailsBySwift", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetInstitutionsDetailsBySwiftResponse xmlns="http://tempuri.org/">
         <GetInstitutionsDetailsBySwiftResult 
         xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.RTNService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:institutions>
               <a:institution>
                  <a:institutionId>1</a:institutionId>
                  <a:legacyLyonsId>1</a:legacyLyonsId>
                  <a:mainInstitutionId i:nil="true"/>
                  <a:externalInstitutionId i:nil="true"/>
                  <a:institutionType>Banks</a:institutionType>
                  <a:name>STATE BANK OF MISSOURI</a:name>
                  <a:branchName>STATE BANK OF MISSOURI</a:branchName>
                  <a:addressLine1>101 NW 2ND ST</a:addressLine1>
                  <a:addressLine2 i:nil="true"/>
                  <a:city>CONCORDIA</a:city>
                  <a:state>MO</a:state>
                  <a:country>US</a:country>
                  <a:postalCode>64020-0000</a:postalCode>
                  <a:mailingAddr>PO BOX 819; CONCORDIA, MO 64020</a:mailingAddr>
                  <a:fedWire>false</a:fedWire>
                  <a:swift/>
                  <a:fax>660-463-2196</a:fax>
                  <a:telex/>
                  <a:homePage>www.gostatebank.com</a:homePage>
                  <a:notes/>
                  <a:active>true</a:active>
                  <a:branchCount>5</a:branchCount>
                  <a:routingNumbers>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ABA</a:purpose>
                        <a:fractional>XXXXXXXXX19</a:fractional>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ACH</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>true</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>true</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:18:15.980-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>false</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:17:15.390-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                        </a:history>
                     </a:institutionRoutingNumber>
                  </a:routingNumbers>
                  <a:contacts>
                     <a:contact>
                        <a:contactType>Adjust</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Customer Service</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>ACH</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Wire</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Institution</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email>sbminfo@gostatebank.com</a:email>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Return</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                  </a:contacts>
                  <a:correspondents>
                     <a:correspondent>
                        <a:correspondentInstitutionId>1</a:correspondentInstitutionId>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:account i:nil="true"/>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:notes i:nil="true"/>
                     </a:correspondent>
                  </a:correspondents>
                  <a:internationalCorrespondents>
                     <a:internationalCorrespondent>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:swift>UMKCUS44</a:swift>
                        <a:participant>true</a:participant>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:accountNumber i:nil="true"/>
                     </a:internationalCorrespondent>
                  </a:internationalCorrespondents>
               </a:institution
                <a:institution>
                  <a:institutionId>2</a:institutionId>
                  <a:legacyLyonsId>123</a:legacyLyonsId>
                  <a:mainInstitutionId>12343</a:mainInstitutionId>
                  <a:externalInstitutionId i:nil="true"/>
                  <a:institutionType>Banks</a:institutionType>
                  <a:name>STATE BANK OF MISSOURI</a:name>
                  <a:branchName>STATE BANK OF MISSOURI</a:branchName>
                  <a:addressLine1>114 S COUNTY RD</a:addressLine1>
                  <a:addressLine2 i:nil="true"/>
                  <a:city>ALMA</a:city>
                  <a:state>MO</a:state>
                  <a:country>US</a:country>
                  <a:postalCode>64001-0000</a:postalCode>
                  <a:mailingAddr>PO BOX 199; ALMA, MO 64001</a:mailingAddr>
                  <a:fedWire>false</a:fedWire>
                  <a:swift/>
                  <a:fax>660-674-2801</a:fax>
                  <a:telex/>
                  <a:homePage>www.gostatebank.com</a:homePage>
                  <a:notes/>
                  <a:active>true</a:active>
                  <a:branchCount>0</a:branchCount>
                  <a:routingNumbers>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ABA</a:purpose>
                        <a:fractional>XXXXXXXXX19</a:fractional>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>ACH</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>false</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history i:nil="true"/>
                     </a:institutionRoutingNumber>
                     <a:institutionRoutingNumber>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:fractional i:nil="true"/>
                        <a:correspondent>true</a:correspondent>
                        <a:active>true</a:active>
                        <a:preferred>true</a:preferred>
                        <a:useForTransactions>true</a:useForTransactions>
                        <a:notes i:nil="true"/>
                        <a:history>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>true</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:23:21.830-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                           <a:routingNumberHistory>
                              <a:routingNumber>XXXXXXXXX</a:routingNumber>
                              <a:purpose>Wire</a:purpose>
                              <a:fractional i:nil="true"/>
                              <a:correspondent>false</a:correspondent>
                              <a:active>true</a:active>
                              <a:preferred>false</a:preferred>
                              <a:useForTransactions>true</a:useForTransactions>
                              <a:notes i:nil="true"/>
                              <a:archivedDate>2019-04-18T15:21:10.373-04:00</a:archivedDate>
                           </a:routingNumberHistory>
                        </a:history>
                     </a:institutionRoutingNumber>
                  </a:routingNumbers>
                  <a:contacts>
                     <a:contact>
                        <a:contactType>Adjust</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Customer Service</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>ACH</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Wire</a:contactType>
                        <a:name/>
                        <a:title i:nil="true"/>
                        <a:email/>
                        <a:phoneNumber>(XXX) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Institution</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email>sbminfo@gostatebank.com</a:email>
                        <a:phoneNumber>(660) 674-2216</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                     <a:contact>
                        <a:contactType>Return</a:contactType>
                        <a:name i:nil="true"/>
                        <a:title i:nil="true"/>
                        <a:email i:nil="true"/>
                        <a:phoneNumber>(XXX) 463-2194</a:phoneNumber>
                        <a:extension i:nil="true"/>
                     </a:contact>
                  </a:contacts>
                  <a:correspondents>
                     <a:correspondent>
                        <a:correspondentInstitutionId>86699</a:correspondentInstitutionId>
                        <a:routingNumber>101000695</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:account i:nil="true"/>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:notes i:nil="true"/>
                     </a:correspondent>
                  </a:correspondents>
                  <a:internationalCorrespondents>
                     <a:internationalCorrespondent>
                        <a:institutionName>UMB BANK, NA</a:institutionName>
                        <a:swift>UMKCUS44</a:swift>
                        <a:participant>true</a:participant>
                        <a:routingNumber>XXXXXXXXX</a:routingNumber>
                        <a:purpose>Wire</a:purpose>
                        <a:accountNumber i:nil="true"/>
                     </a:internationalCorrespondent>
                  </a:internationalCorrespondents>
               </a:institution>

            </a:institutions>
        </GetInstitutionsDetailsBySwiftResult>
     </GetInstitutionsDetailsBySwiftResponse>
   </s:Body>
</s:Envelope>

Returns a list of financial institutions with full details for a swift sorted by main locations first.

The mainInstitutionId attribute in the returned institution objects has the following meaning:

Request

Parameter Type Description
token string the session token returned by the Logon call
swift string swift code to search
country string Two character country code.
includeInactive boolean flag to determine if inactive routing numbers should be included in search
includeRoutingNumberHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
institutionId int The institution identification number associated with the institution
legacyLyonsId int The old lyons institution identification number associated with the institution
mainInstitutionId int The institution identification number associated with this institutions main branch
externalInstitutionId int The external institution identification number associated with canadian institutions which is referred to FinancialInstitutionID
institutionType string Institution Type
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
mailingAddr string Mailing Address
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fax string Main Fax Number
telex string TELEX identifier
homePage string Institutions Internet home page / URL
notes string Account Notes
active boolean Active Institution
branchCount int The number of branches as defined for Main institutions.
routingNumbers array list of routingNumber objects that are connected with this institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- fractional string 11 Digit Fractional code.
-- correspondent boolean If the routing number comes from a correspondent institution.
-- active boolean Indicates if the routing number used is in active state.
-- preferred boolean Indicates if the routing number used is preferred one.
-- useForTransactions boolean If this routing number is used for transactions
-- notes string Notes for particular routing number
--routingNumberHistory Array A list of previous routing numbers for this record
----routingNumber string Routing Number
---- purpose string The application of this routing number Electronic, Paper, or Wire
---- fractional string 11 Digit Fractional code.
---- correspondent boolean If the routing number comes from a correspondent institution.
----active boolean Indicates if the routing number used is in active state.
---- preferred boolean Indicates if the routing number used is preferred one.
---- useForTransactions boolean If this routing number is used for transactions
---- notes string Notes for particular routing number
---- archivedDate string The EST date and time this record was created.
contacts array list of contacts that are connected with this institution
-- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
-- name string name for contact
-- email string Primary or corporate e-mail address for contact
-- phoneNumber string phone number for contact
-- Extension string phone number Extension for contact
correspondents array list of correspondent institutions associated with this branches routing number
--correspondentInstitutionId int The institution identification number associated with the correspondent institution
-- institutionName string Institution Name
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- account string Correspondent Account Number
-- notes string Notes for particular routing number
internationalCorrespondents array list of International correspondent institutions associated with this branches routing number
-- institutionName string Institution Name
-- swift string Society for Worldwide Interbank Financial Communications.' Within the. international transfer world, SWIFT is a universal messaging system. SWIFTs are BICs. (Bank Identifier Code) connected to the S.W.I.F.T. network
-- participant boolean Indicates if the Institution is participant.
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- accountNumber string International correspondent account number.

GetPrimaryInstitutionDetails(RTN)

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        InstitutionResponse response = rtnSvc.GetPrimaryInstitutionDetails(token, rtn, includeInactive, includeWireSearch, includeHistory);
    }
}
catch (FaultException fe)
            {
                MessageFault mf = fe.CreateMessageFault();
                string errorDetail = null;
                if (mf.HasDetail)
                {
                    ErrorResult errorData = mf.GetDetail<InstitutionResult>();
                    errorDetail = errorData.ErrorMesssage;
                    Console.WriteLine(" -->Error: {0}", errorDetail);
                }
                result = new InstitutionResult(errorDetail);
            }
catch(Exception ex){ }
    in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetPrimaryInstitutionDetails>
         <tem:token>XXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeWireSearch>true</tem:includeWireSearch>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:GetPrimaryInstitutionDetails>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/GetPrimaryInstitutionDetails",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:GetPrimaryInstitutionDetails>
         <tem:token>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</tem:token>
         <tem:rtn>XXXXXXXXXX</tem:rtn>
         <tem:country>US</tem:country>
         <tem:includeInactive>true</tem:includeInactive>
         <tem:includeWireSearch>true</tem:includeWireSearch>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:GetPrimaryInstitutionDetails>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/GetPrimaryInstitutionDetails")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public Institution call(IRTNService svc, String token, String rtn, String country, Boolean includeInactive, Boolean includeWireSearch, Boolean includeHistory)
            throws StopProcesingException {
        Institution instLst = null;
        try {
            InstitutionListResult res = svc.getPrimaryInstitutionDetails(token, rtn, country, includeInactive, includeWireSearch, includeHistory);
            Assert.notNull(res, "The returned InstitutionResult is null");
            instLst = res.getInstitution();
            Assert.notNull(instLst, "The returned Institution is null");
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.getPrimaryInstitutionDetails(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.getPrimaryInstitutionDetails(...) method", e);
            handleError("Error calling the IRTNService.getPrimaryInstitutionDetails(...) method", e.getMessage(), true);
        }
        return instLst.getInstitution();
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:GetPrimaryInstitutionDetails>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:rtn>XXXXXXXX</tem:rtn>" +
                "<tem:country>US</tem:country>" +
                "<tem:includeInactive>true</tem:includeInactive>" +
                "<tem:includeWireSearch>true</tem:includeWireSearch>" +
                "<tem:includeHistory>true</tem:includeHistory>" +
                "</tem:GetPrimaryInstitutionDetails>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/GetPrimaryInstitutionDetails", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetPrimaryInstitutionDetailsResponse xmlns="http://tempuri.org/">
         <GetPrimaryInstitutionDetailsResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.RTNService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:institution>
               <a:institutionId>87416</a:institutionId>
               <a:legacyLyonsId>31255</a:legacyLyonsId>
               <a:mainInstitutionId i:nil="true"/>
               <a:externalInstitutionId i:nil="true"/>
               <a:institutionType>Banks</a:institutionType>
               <a:name>STATE BANK OF MISSOURI</a:name>
               <a:branchName>STATE BANK OF MISSOURI</a:branchName>
               <a:addressLine1>101 NW 2ND ST</a:addressLine1>
               <a:addressLine2 i:nil="true"/>
               <a:city>CONCORDIA</a:city>
               <a:state>MO</a:state>
               <a:country>US</a:country>
               <a:postalCode>64020-0000</a:postalCode>
               <a:mailingAddr>PO BOX 819; CONCORDIA, MO 64020</a:mailingAddr>
               <a:fedWire>false</a:fedWire>
               <a:swift/>
               <a:fax>660-463-2196</a:fax>
               <a:telex/>
               <a:homePage>www.gostatebank.com</a:homePage>
               <a:notes/>
               <a:active>true</a:active>
               <a:branchCount>5</a:branchCount>
               <a:routingNumbers>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>101908577</a:routingNumber>
                     <a:purpose>ABA</a:purpose>
                     <a:fractional>08008571019</a:fractional>
                     <a:correspondent>false</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history i:nil="true"/>
                  </a:institutionRoutingNumber>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>101908577</a:routingNumber>
                     <a:purpose>ACH</a:purpose>
                     <a:fractional i:nil="true"/>
                     <a:correspondent>false</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history i:nil="true"/>
                  </a:institutionRoutingNumber>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>101000695</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:fractional i:nil="true"/>
                     <a:correspondent>true</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history>
                        <a:routingNumberHistory>
                           <a:routingNumber>101000695</a:routingNumber>
                           <a:purpose>Wire</a:purpose>
                           <a:fractional i:nil="true"/>
                           <a:correspondent>true</a:correspondent>
                           <a:active>true</a:active>
                           <a:preferred>false</a:preferred>
                           <a:useForTransactions>true</a:useForTransactions>
                           <a:notes i:nil="true"/>
                           <a:archivedDate>2019-04-18T15:18:15.980-04:00</a:archivedDate>
                        </a:routingNumberHistory>
                        <a:routingNumberHistory>
                           <a:routingNumber>101000695</a:routingNumber>
                           <a:purpose>Wire</a:purpose>
                           <a:fractional i:nil="true"/>
                           <a:correspondent>false</a:correspondent>
                           <a:active>true</a:active>
                           <a:preferred>false</a:preferred>
                           <a:useForTransactions>true</a:useForTransactions>
                           <a:notes i:nil="true"/>
                           <a:archivedDate>2019-04-18T15:17:15.390-04:00</a:archivedDate>
                        </a:routingNumberHistory>
                     </a:history>
                  </a:institutionRoutingNumber>
               </a:routingNumbers>
               <a:contacts>
                  <a:contact>
                     <a:contactType>Adjust</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Customer Service</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>ACH</a:contactType>
                     <a:name/>
                     <a:title i:nil="true"/>
                     <a:email/>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Wire</a:contactType>
                     <a:name/>
                     <a:title i:nil="true"/>
                     <a:email/>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Institution</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email>sbminfo@gostatebank.com</a:email>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Return</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(660) 463-2194</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
               </a:contacts>
               <a:correspondents>
                  <a:correspondent>
                     <a:correspondentInstitutionId>86699</a:correspondentInstitutionId>
                     <a:routingNumber>101000695</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:account i:nil="true"/>
                     <a:institutionName>UMB BANK, NA</a:institutionName>
                     <a:notes i:nil="true"/>
                  </a:correspondent>
               </a:correspondents>
               <a:internationalCorrespondents>
                  <a:internationalCorrespondent>
                     <a:institutionName>UMB BANK, NA</a:institutionName>
                     <a:swift>UMKCUS44</a:swift>
                     <a:participant>true</a:participant>
                     <a:routingNumber>101000695</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:accountNumber i:nil="true"/>
                  </a:internationalCorrespondent>
               </a:internationalCorrespondents>
            </a:institution>
         </GetPrimaryInstitutionDetailsResult>
      </GetPrimaryInstitutionDetailsResponse>
   </s:Body>
</s:Envelope>

Get primary single institution with full details for an RTN.. The mainInstitutionId attribute in the returned institution object has the following meaning:

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
country string Country name to serach
includeInactive boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search
includeWireSearch boolean flag to determine if Wire routing numbers should be included in the search

Response

Parameter Type Description
institutionId int The institution identification number associated with the institution
legacyLyonsId int The old lyons institution identification number associated with the institution
mainInstitutionId int The institution identification number associated with this institutions main branch
externalInstitutionId int The external institution identification number associated with canadian institutions which is referred to FinancialInstitutionID
institutionType string Institution Type
name string Complete name of the financial institution
branchName string Individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
mailingAddr string Mailing Address
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fax string Main Fax Number
telex string TELEX identifier
homePage string Institutions Internet home page / URL
notes string Account Notes
active boolean Active Institution
branchCount int The number of branches as defined for Main institutions.
routingNumbers array list of routingNumber objects that are connected with this institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- fractional string 11 Digit Fractional code.
-- correspondent boolean If the routing number comes from a correspondent institution.
-- active boolean Indicates if the routing number used is in active state.
-- preferred boolean Indicates if the routing number used is preferred one.
-- useForTransactions boolean If this routing number is used for transactions
-- notes string Notes for particular routing number
--routingNumberHistory Array A list of previous routing numbers for this record
----routingNumber string Routing Number
---- purpose string The application of this routing number Electronic, Paper, or Wire
---- fractional string 11 Digit Fractional code.
---- correspondent boolean If the routing number comes from a correspondent institution.
----active boolean Indicates if the routing number used is in active state.
---- preferred boolean Indicates if the routing number used is preferred one.
---- useForTransactions boolean If this routing number is used for transactions
---- notes string Notes for particular routing number
---- archivedDate string The EST date and time this record was created.
contacts array list of contacts that are connected with this institution
-- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
-- name string name for contact
-- email string Primary or corporate e-mail address for contact
-- phoneNumber string phone number for contact
-- Extension string phone number Extension for contact
correspondents array list of correspondent institutions associated with this branches routing number
--correspondentInstitutionId int The institution identification number associated with the correspondent institution
-- institutionName string Institution Name
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- account string Correspondent Account Number
-- notes string Notes for particular routing number
internationalCorrespondents array list of International correspondent institutions associated with this branches routing number
-- institutionName string Institution Name
-- swift string Society for Worldwide Interbank Financial Communications.' Within the. international transfer world, SWIFT is a universal messaging system. SWIFTs are BICs. (Bank Identifier Code) connected to the S.W.I.F.T. network
-- participant boolean Indicates if the Institution is participant.
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- accountNumber string International correspondent account number.

GetInstitutionDetailsById(RTN)

var myBinding = new BasicHttpBinding();
var myEndpoint = new EndpointAddress("https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc");
try{
    using (ChannelFactory<IRTNService> fact = new ChannelFactory<IRTNService>(myBinding, myEndpoint))
    {
        IRTNService rtnSvc = fact.CreateChannel();
        InstitutionResponse response = rtnSvc.GetInstitutionDetailsById(token, institutionId, includeHistory);
    }
}
catch (FaultException fe)
            {
                MessageFault mf = fe.CreateMessageFault();
                string errorDetail = null;
                if (mf.HasDetail)
                {
                    ErrorResult errorData = mf.GetDetail<InstitutionResult>();
                    errorDetail = errorData.ErrorMesssage;
                    Console.WriteLine(" -->Error: {0}", errorDetail);
                }
                result = new InstitutionResult(errorDetail);
            }
catch(Exception ex){ }
in_xml="""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:GetInstitutionDetailsById>
         <tem:token>XXXXXXXXXXX</tem:token>
         <tem:institutionId>XXXXXXX</tem:institutionId>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:GetInstitutionDetailsById>
   </soapenv:Body>
</soapenv:Envelope>"""
http_headers={
    "Accept": "application/soap+xml",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "SOAPAction": "http://tempuri.org/IRTNService/GetInstitutionDetailsById",
    "Content-Type": "text/xml; charset=utf-8"
}
request_object = urllib2.Request("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc", in_xml, http_headers)
response = urllib2.urlopen(request_object)
html_string = response.read()
print(html_string)
Dim Request As WebRequest
    Dim Response As WebResponse
    Dim DataStream As Stream
    Dim Reader As StreamReader
    Dim SoapByte() As Byte
    Dim SoapStr As String

    Sub Main(args As String())
        SoapStr = "<?xml version=""1.0"" encoding=""utf-8""?>"
        SoapStr = SoapStr & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">"
        SoapStr = SoapStr & "<soapenv:Header/>"
        SoapStr = SoapStr & "<soapenv:Body>"
        SoapStr = SoapStr & "<tem:GetInstitutionDetailsById>
         <tem:token>XXXXXXXXXXXXXXXX</tem:token>
         <tem:institutionId>XXXXXX</tem:institutionId>
         <tem:includeHistory>true</tem:includeHistory>
      </tem:GetInstitutionDetailsById>
"
        SoapStr = SoapStr & "</soapenv:Body>"
        SoapStr = SoapStr & "</soapenv:Envelope>"

        Try
            SoapByte = System.Text.Encoding.UTF8.GetBytes(SoapStr)

            Request = WebRequest.Create("https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc")
            Request.Headers.Add("SOAPAction", "http://tempuri.org/IRTNService/GetInstitutionDetailsById")

            Request.ContentType = "text/xml; charset=utf-8"
            Request.ContentLength = SoapByte.Length
            Request.Method = "POST"

            DataStream = Request.GetRequestStream()
            DataStream.Write(SoapByte, 0, SoapByte.Length)
            DataStream.Close()

            Response = Request.GetResponse()
            DataStream = Response.GetResponseStream()
            Reader = New StreamReader(DataStream)
            Dim SD2Request As String = Reader.ReadToEnd()
            Console.WriteLine(SD2Request)

            DataStream.Close()
            Reader.Close()
            Response.Close()

        Catch ex As WebException
            Console.WriteLine(ex.ToString
                              )
        End Try
    End Sub
    public Institution call(IRTNService svc, String token, int institutionId, Boolean includeHistory)
            throws StopProcesingException {
        Institution inst = null;
        try {
            InstitutionResult res = svc.GetInstitutionDetailsById(token, rtn, institutionId, includeHistory);
            Assert.notNull(res, "The returned InstitutionListResult is null");
            inst = res.getInstitution();
            Assert.notNull(inst, "The returned Institution is null");
        } catch (ServerSOAPFaultException ex) {
            handleFault("IRTNService.GetInstitutionDetailsById(...) returned and error", ex, false);
        } catch (Exception e) {
            log.error("General exception when calling IRTNService.GetInstitutionDetailsById(...) method", e);
            handleError("Error calling the IRTNService.getInstitutionsDetails(...) method", e.getMessage(), true);
        }
        return inst.getInstitution();
    }
/// perform  NPM install wcf.js module before you run this code on node server.

var Proxy = require('wcf.js').Proxy; 
var BasicHttpBinding = require('wcf.js').BasicHttpBinding; 

var binding = new BasicHttpBinding();   
var proxy = new Proxy(binding, "https://lyonsreg.com/WebServices/rtn2.1/RTNServiceWCF.svc?wsdl");

/*Ensure your message below looks like a valid working SOAP UI request*/
var message = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/" +
                "<soapenv:Header/>" +
                "<soapenv:Body>" +
                "<tem:GetInstitutionDetailsById>" +
                "<tem:token>xxxxxxxxxxxxxxxxxxx</tem:token>" +
                "<tem:institutionId>XXXXXXXX</tem:institutionId>" +
                "<tem:includeHistory>true</tem:includeHistory>" +
                "</tem:GetInstitutionDetailsById>" +
                "</soapenv:Body>" +
                "</soapenv:Envelope>";
/*The message that you created above, ensure it works properly in SOAP UI rather copy a working request from SOAP UI*/

/*proxy.send's second argument is the soap action; you can find the soap action in your wsdl*/
proxy.send(message, "http://tempuri.org/IRTNService/GetInstitutionDetailsById", function (response, ctx) {
    console.log(response);
    /*Your response is in xml and which can either be used as it is of you can parse it to JSON etc.....*/
});

The SOAP response is structured like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetInstitutionDetailsByIdResponse xmlns="http://tempuri.org/">
         <GetInstitutionDetailsByIdResult xmlns:a="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.RTNService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <errorMessage i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Autoscribe.Lyons.GeneralService"/>
            <a:institution>
               <a:institutionId>1</a:institutionId>
               <a:legacyLyonsId>1</a:legacyLyonsId>
               <a:mainInstitutionId i:nil="true"/>
               <a:externalInstitutionId i:nil="true"/>
               <a:institutionType>Banks</a:institutionType>
               <a:name>STATE BANK OF MISSOURI</a:name>
               <a:branchName>STATE BANK OF MISSOURI</a:branchName>
               <a:addressLine1>101 NW 2ND ST</a:addressLine1>
               <a:addressLine2 i:nil="true"/>
               <a:city>CONCORDIA</a:city>
               <a:state>MO</a:state>
               <a:country>US</a:country>
               <a:postalCode>64020-0000</a:postalCode>
               <a:mailingAddr>PO BOX 819; CONCORDIA, MO 64020</a:mailingAddr>
               <a:fedWire>false</a:fedWire>
               <a:swift/>
               <a:fax>660-463-2196</a:fax>
               <a:telex/>
               <a:homePage>www.gostatebank.com</a:homePage>
               <a:notes/>
               <a:active>true</a:active>
               <a:branchCount>5</a:branchCount>
               <a:routingNumbers>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>XXXXXXX</a:routingNumber>
                     <a:purpose>ABA</a:purpose>
                     <a:fractional>08008571019</a:fractional>
                     <a:correspondent>false</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history i:nil="true"/>
                  </a:institutionRoutingNumber>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>XXXXXXX</a:routingNumber>
                     <a:purpose>ACH</a:purpose>
                     <a:fractional i:nil="true"/>
                     <a:correspondent>false</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history i:nil="true"/>
                  </a:institutionRoutingNumber>
                  <a:institutionRoutingNumber>
                     <a:routingNumber>XXXXXXX</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:fractional i:nil="true"/>
                     <a:correspondent>true</a:correspondent>
                     <a:active>true</a:active>
                     <a:preferred>true</a:preferred>
                     <a:useForTransactions>true</a:useForTransactions>
                     <a:notes i:nil="true"/>
                     <a:history>
                        <a:routingNumberHistory>
                           <a:routingNumber>XXXXXXX</a:routingNumber>
                           <a:purpose>Wire</a:purpose>
                           <a:fractional i:nil="true"/>
                           <a:correspondent>true</a:correspondent>
                           <a:active>true</a:active>
                           <a:preferred>false</a:preferred>
                           <a:useForTransactions>true</a:useForTransactions>
                           <a:notes i:nil="true"/>
                           <a:archivedDate>2019-04-18T15:18:15.980-04:00</a:archivedDate>
                        </a:routingNumberHistory>
                        <a:routingNumberHistory>
                           <a:routingNumber>XXXXXXX</a:routingNumber>
                           <a:purpose>Wire</a:purpose>
                           <a:fractional i:nil="true"/>
                           <a:correspondent>false</a:correspondent>
                           <a:active>true</a:active>
                           <a:preferred>false</a:preferred>
                           <a:useForTransactions>true</a:useForTransactions>
                           <a:notes i:nil="true"/>
                           <a:archivedDate>2019-04-18T15:17:15.390-04:00</a:archivedDate>
                        </a:routingNumberHistory>
                     </a:history>
                  </a:institutionRoutingNumber>
               </a:routingNumbers>
               <a:contacts>
                  <a:contact>
                     <a:contactType>Adjust</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Customer Service</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>ACH</a:contactType>
                     <a:name/>
                     <a:title i:nil="true"/>
                     <a:email/>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Wire</a:contactType>
                     <a:name/>
                     <a:title i:nil="true"/>
                     <a:email/>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Institution</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email>sbminfo@gostatebank.com</a:email>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
                  <a:contact>
                     <a:contactType>Return</a:contactType>
                     <a:name i:nil="true"/>
                     <a:title i:nil="true"/>
                     <a:email i:nil="true"/>
                     <a:phoneNumber>(XXX) XXX-XXXX</a:phoneNumber>
                     <a:extension i:nil="true"/>
                  </a:contact>
               </a:contacts>
               <a:correspondents>
                  <a:correspondent>
                     <a:correspondentInstitutionId>1</a:correspondentInstitutionId>
                     <a:routingNumber>(XXX) XXX-XXXX</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:account i:nil="true"/>
                     <a:institutionName>UMB BANK, NA</a:institutionName>
                     <a:notes i:nil="true"/>
                  </a:correspondent>
               </a:correspondents>
               <a:internationalCorrespondents>
                  <a:internationalCorrespondent>
                     <a:institutionName>UMB BANK, NA</a:institutionName>
                     <a:swift>UMKCUS44</a:swift>
                     <a:participant>true</a:participant>
                     <a:routingNumber>(XXX) XXX-XXXX</a:routingNumber>
                     <a:purpose>Wire</a:purpose>
                     <a:accountNumber i:nil="true"/>
                  </a:internationalCorrespondent>
               </a:internationalCorrespondents>
            </a:institution>
         </GetInstitutionDetailsByIdResult>
      </GetInstitutionDetailsByIdResponse>
   </s:Body>
</s:Envelope>

Returns a list of financial institutions with full details. Both Routing Number and wire routing numbers will be searched.

The mainInstitutionId attribute in the returned institution objects has the following meaning:

Request

Parameter Type Description
token string the session token returned by the Logon call
institutionId int InstitutionId of institution
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
institutionId int The institution identification number associated with the institution
legacyLyonsId int The old lyons institution identification number associated with the institution
mainInstitutionId int The institution identification number associated with this institutions main branch
externalInstitutionId int The external institution identification number associated with canadian institutions which is referred to FinancialInstitutionID
institutionType string Institution Type
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
mailingAddr string Mailing Address
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fax string Main Fax Number
telex string TELEX identifier
homePage string Institutions Internet home page / URL
notes string Account Notes
active boolean Active Institution
branchCount int The number of branches as defined for Main institutions.
routingNumbers array list of routingNumber objects that are connected with this institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- fractional string 11 Digit Fractional code.
-- correspondent boolean If the routing number comes from a correspondent institution.
-- active boolean Indicates if the routing number used is in active state.
-- preferred boolean Indicates if the routing number used is preferred one.
-- useForTransactions boolean If this routing number is used for transactions
-- notes string Notes for particular routing number
--routingNumberHistory Array A list of previous routing numbers for this record
----routingNumber string Routing Number
---- purpose string The application of this routing number Electronic, Paper, or Wire
---- fractional string 11 Digit Fractional code.
---- correspondent boolean If the routing number comes from a correspondent institution.
----active boolean Indicates if the routing number used is in active state.
---- preferred boolean Indicates if the routing number used is preferred one.
---- useForTransactions boolean If this routing number is used for transactions
---- notes string Notes for particular routing number
---- archivedDate string The EST date and time this record was created.
contacts array list of contacts that are connected with this institution
-- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
-- name string name for contact
-- email string Primary or corporate e-mail address for contact
-- phoneNumber string phone number for contact
-- Extension string phone number Extension for contact
correspondents array list of correspondent institutions associated with this branches routing number
--correspondentInstitutionId int The institution identification number associated with the correspondent institution
-- institutionName string Institution Name
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- account string Correspondent Account Number
-- notes string Notes for particular routing number-- routingNumber
internationalCorrespondents array list of International correspondent institutions associated with this branches routing number
-- institutionName string Institution Name
-- swift string Society for Worldwide Interbank Financial Communications.' Within the. international transfer world, SWIFT is a universal messaging system. SWIFTs are BICs. (Bank Identifier Code) connected to the S.W.I.F.T. network
-- participant boolean Indicates if the Institution is participant.
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- accountNumber string International correspondent account number.