Skip to main content
Windward

Windward Access Providers - Data Sources and Import Tags

Overview

Starting in v15.1.48.0, Windward is using a single set of code to address accessing files and web-based data. This adds features with regard to your Data Source credentials as well as how Import Tags access content.

 

Access Providers

These provide a new consistent way to access files and web based data across AutoTag. Windward ships with the following access providers:

.NET (.NET Engine, RESTful Engine, AutoTag)

Java Engine

  1. File based – anonymous & Windows security
  2. Embedded Windows resource
  3. HTTP – anonymous
  4. HTTP – basic
  5. HTTP – digest
  6. HTTP – negotiate (NTLM & KEREBROS)
  7. Claims Based (Microsoft)
  8. AllHttp (try protocols 3 – 6 above)
  1. File based – anonymous
  2. Embedded JAR resource
  3. HTTP – anonymous
  4. HTTP – basic
  5. HTTP – digest
  6. AllHttp (try protocols 3 – 5 above)

 

Customers can write their own Access Provider and it will get added to this list at runtime and is treated identically to the existing providers. A provider should be able to be written in under 200 lines of code (usually much less).

Authentication Protocol

How it works

In the Authentication Protocol field, select the type you want from the dropdown and then fill in the credential fields for that option.  This combination defines the protocol and its properties, and is saved as a connection string in the form “AccessProvider=Basic;Username=username;Password=password;”

 

Note:

  • All of the connection string keywords and any of the common values are in BaseAccessProvider.java if needed directly in your code. AutoTag will build this string for you.
  • One of the protocols is FileBased which is used for reading a local file as well as http files.
  • If no AccessProvider is set in the connection string, Windward it will look at the URL and set it to "AllHttp" if the url starts with  http:, https:, ftp:, etc. Otherwise it will set it to FileBased.

Via Your Data Source

When you edit or create a new web or file-based Data Source, you can set the Authentication Protocol. In AutoTag this is done by selecting the protocol itself and then setting the properties for that protocol. Open your Data Source Connection Editor (see this article for more) and edit or create a new Web/File connection. In the Authentication Protocol field, select the type you want from the dropdown and then fill in the credential fields for that option. The connection editor screen will look slightly different depending on the type of connection. 

 

 

For specific settings with your data source, see these pages:

Connect to a JSON Data Source

Connect to an XML Data Source

Connect to an OData Data Source

Via Your Import Tags

To access the Authentication Protocol for an Import Tag, open the Tag Editor and navigate to the Properties pane. In the Tag Properties, click the [...] button to bring up the Connection String interface.

 

 

There is no URL in the Import Tag credentials because the Import Tag itself provides the URL. 

The Connection String Interface

Use variable

If you select “Use variable,” the variable dropdown will show all variables defined in the template you have open. In this case, the variable needs to be set to find the connection string you want to use; a Set Tag is usually the best Tag to use for this. "Use variable" is very useful if the username/password is to be set differently during production. It is also useful if the same protocol and credentials are used with multiple Import Tags.

Set explicitly

Use this option to set the credentials for this particular Import Tag. The fields will be the same as those used in the Data Connection Editor Interface. 

In the URL

Normally the Import Tag will return something like http://www.windward.net/images/logo.png and all the provider information is set as above. However, if you type or paste a select into your Query Pane similar to what is shown below, all of the above settings, if they exist, are ignored. Instead, Windward assumes the returned value is the entire connection string. 

Url= http://www.windward.net/images/logo.png;AccessProvider=Digest;Username=yourusername;Password=yourpassword; 

 

It uses this mode if it finds  Url= in the string.

 

Passing credentials to an Import Tag via the Engine

Use this Sample Invoice to play along!

 

To pass credentials via the Engine, follow these steps:

Step 1

In your template in AutoTag, create an Input Variable.

  • Give it a variable name, and a default value. The final form of the value you pass in will need to be in this form:

“AccessProvider=Basic;Username=username;Password=password;”

  • Note the variable name because you will use it later!

 

Step 2 

Next Open your Import Tag and navigate to the Properties Pane. Open the Connection String interface, click Use Variable, and select the variable name from the dropdown menu. 

 

 

Once your template has this set up run it to make sure it works in AUtoTag. Once you've tested that, it's time to try it in your Engine.

 

Step 3

Now locate the engine code you're using; either open Catapult, or navigate to where the Windward Engine Samples are stored on your machine. 

Find the Advanced section/folder, and open the Variables example. Here is the basic information that will need to be added to your code:

 

.NET (C#) Java (note 
            //This is where we pass in the parameters
            Dictionary<string, object> map = new Dictionary<string, object>();
            //order is our variable
            map.Add("order", “AccessProvider=Basic;Username=username;Password=password;”);
            //This is the function where we actually tell our report the parameter values
            data.Map = map;
       //This is where we pass in the parameters to the datasource
        Map map = new HashMap();
        map.put("order", “AccessProvider=Basic;Username=username;Password=password;”);
        //the actual function that gives the datasource our parameters
        data.setMap(map);