Web Services

Revenue Result Web Service is a small web application that installs on an IIS server or Application servers and responds to incoming web service requests. A producing web service can push data to the Revenue Results Web Service of the following types:

  • Payment
  • Adjustment
  • Debtor / Account creation/update

 Providing the Revenue Results Server and Client software are installed /configured and both are functioning properly.

 Installation Requirements

  • Internet Information Services (IIS) Server
  • Revenue Results Web Services
  • Revenue Results Web Services Module
  • Database Server ASP.NET Account
  • Define XML User
  • Request Web Services XLS Files

 A user is required on the database server to run the Asp.NET Web Service. This user must have Read/Write access to the RevQMater and Revenue Results databases. (Created during Revenue Results Server Installation)

Web Service Instructions (RRWS)

 

Installing the Web Service

 

 1. Run RevQ_Revenue_Results_WebService.[build number].exe.  RRWSSetup.msi must be in the same directory as the .exe.

-or-

Right-click on RRWSSetup.msi and select Install.

 

 2. During installation, choose defaults except Application Pool.  Select "Classic .NET AppPool" instead of "DefaultAppPool".

 

 

Finish setup.

 

  

Testing the Web Service (Basic)

1. Open a browser and navigate to http://localhost/RRWS.  You should see a Revenue Results Web Service page.

 

 

2. Click on TestCredentials.

 

 3. Enter a username and password for an existing Revenue Results user.  Enter the associated Org name.

 

 

4. Click Invoke - you should see a success/fail response.

 

 

 

  

Testing Web Service Imports

  1. Download the Storm application (NOT WCF Storm) here: http://storm.codeplex.com(there is no installer, just unzip the files and put them in a folder where you can find them).

 

2. Run Storm.exe

3. Click Add and enter “http://localhost/RRWS”.  

4.  This should populate a list of methods under Web Services in the upper left.

5. Select any of the methods (we’ll do ImportAdjustmentCSV here), enter Username, Password, OrganizationName in the Header:

6. Then under “Body” enter an import template name (one that is already set up in Revenue Results), and add one line of import data, matching the import template configuration.

7. Click the green arrow to run the method and you should see a success/fail message:


 

Programming Notes
 Methods

The web service contains three methods which allow import of the three types of data:

 

  • Debtor/Account information

    ImportDebtorCSV(string importTemplateName, string importData, bool allowMerge, bool overwriteExistingData)

 

  • Payments


ImportPaymentCSV(string importTemplateName, string importData, bool recalculatePaymentPlans)
 

  • Adjustments

    ImportAdjustmentCSV(string importTemplateName, string importData, string defaultLineItemType)

 Each import method ultimately uses the core Revenue Results importer and therefore uses the same import template configuration and data format

 Import Templates

 Import templates are configured via the Revenue Results client, and are specified as an argument in the above methods.

 Data Format

 Imported data is in CSV format, and must match the format (column sequence, delimiter, etc) specified by the import template.

 Each import method accepts an processes exactly one transaction – one debtor/account import, one payment or one adjustment – and a success/fail response code is returned, and in the case of an error, detailed error information is also returned.

 Example

Here is a simple console application showing the use of the web service.

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Text;

usingRRWSConsumerExample.RRWS;

 

namespaceRRWSConsumerExample

{

    class Program

    {

        static void Main(string[] args)

        {

            // Add a Web Reference by right-clicking on References > Add Web Reference... or

            //                                          References > Add Service Reference... > Advanced... > Add Web Reference...

            // and in this example, the reference was named "RRWS".

           

            // Authentication

            RevenueResultsWebService rrws = new RevenueResultsWebService();

 

            rrws.UserProfileValue = new UserProfile();

            rrws.UserProfileValue.Username = "Username"; // Replace this with a Revenue Results username

            rrws.UserProfileValue.Password = "Password"; // Replace this with a Revenue Results password

            rrws.UserProfileValue.OrganizationName = "Org Name"; // Replace this with your Revenue Results Organization name

 

 

            // An import template defined in the Revenue Results client

            string myImportTemplateName = "RRWS";

 

           

            // Data matching the format defined in the above template

            string myImportData = "Smith,DebtorRef1,Court,AcctRef1,Fine,7/1/2010,100.00";

           

           

            // Import options (the same options provided during a manual import, through the Revenue Results client)

            bool allowMerge = true;

            bool overwriteExistingData = true;

 

           

            // The import

            Response response = rrws.ImportDebtorCSV(myImportTemplateName, myImportData, allowMerge, overwriteExistingData);

 

           

            // Response.Status is an enum: Success, Fail, Warning

            Console.WriteLine("Status: " + response.Status);

 

           

            // Response.Message is a string that contains import details and statistics

            Console.WriteLine("Message: " + response.Message);

 

           

            // The above import prints the following:

 

            // Status: Success

            // Message: Debtors imported: 1, Debtors merged: 0, Number of lines that failed: 0,

            // Accounts imported: 1, Total amount imported: $100.00

 

            Console.ReadLine();

        }

    }

}

 

Sequence of Operations

Since each debtor/account import transaction can only contain one debtor and one account, you’ll need to call ImportDebtorCSV once for each account added.  For example, the web service transactions to set up a Debtor with three Accounts would look like below.

 

Transaction 1 (FirstName,LastName,Add1,City,State,Zip,AreaCode,Phone,AcctRef1,AcctType,LineItem,LineItemAmount)

Chad,Broadus,PO Box 999,Vancouver,WA,98662,360,555-6666,abc123,Tax,Fine,100.00

 

Transaction 2

Chad,Broadus,PO Box 999,Vancouver,WA,98662,360,555-6666,abc456,Restitution,Fine,150.00

 

Transaction 3

Chad,Broadus,PO Box 999,Vancouver,WA,98662,360,555-6666,abc789,Tax,Fine,200.00

 

 

Please note that you’ll need to be careful about the sequence of operations if you’re moving an account from one debtor to another.  The account will need to be linked to the new debtor before it is unlinked from the old to work around the system’s requirement that every account must always be linked to at least one debtor.  For example:

 

Transaction 1 (FirstName,LastName,Add1,City,State,Zip,AreaCode,Phone,AcctRef1,AcctType,LineItem,LineItemAmount,CoReponsible)

Chad,Broadus,PO Box 999,Vancouver,WA,98662,360,555-6666,zxy321,Tax,Fine,100.00,Y

 

Transaction 2

David,Franck,PO Box 999,Vancouver,WA,98662,360,555-6666,zxy321,Tax,Fine,100.00,Y

 

Transaction 3

Shane,Wilks,PO Box 999,Vancouver,WA,98662,360,555-6666,zxy321,Tax,Fine,100.00,U

Main Support Line:

          
All Support Team Members (866) 684-7387 RR_Support@revq.com
Chris Stickney (Support) Ext. 5673 Chris.Stickney@revq.com
Angel Davis (Support) Ext. 5756 Angel.Davis@revq.com
Kellie Mendenhall (Trainer)   Ext. 5676 Kellie.Mendenhall@revq.com
Aaron Burge (Installation) Ext. 5710 Aaron.Burge@revq.com

 

Mailing Address

4400 NE 77th Avenue, STE 100
Vancouver, WA 98662