Connection Information For National Weather Service

For the sample National Weather Service Connector project, review the Connection information code generated by the Integration Framework Wizard.

Public string properties are shown in the connection information code sample below and are located at the top of the project file.

 public class WeatherConnectionInfo : XmlHttpConnectionInfoBase<WeatherConnectionInfo>
 {
     public string BaseUrl { get; set; }
 
     public string UserName { get; set; }
 
     [PasswordPropertyText(true)]
     public string Password { get; set; }

The highlighted Xml part in the first line of the sample above denotes an implementation that includes some defaults for using XML.

The three properties, BaseUrl, UserName,and Password, create entries in the connection form. The Integration Framework turns any property on this class into a Connection Form entry, and on connection, if it is of type string, it sets that property with the value entered in the connection form. Attributes that can be used here include:

  • [IgnoreDataMember] — Hides the associated property.
  • [PasswordPropertyText(true)] — Use this attribute, as shown on the Password property, to mask the contents of the field on the Configuration dialog.

In the code sample above, omitting the masking attribute would have no effect. If a property is named ‘password’ the default is to mask it. To prevent the password from being masked, replace the true in the attribute with false. You can make another property masked if it is not named ‘password’ by adding the [PasswordPropertyText(true)] attribute.

For the National Weather Service Connector the UserName and Password are not necessary. To clean up the code, we just delete those two properties. This gives us a simple Connection dialog with only the BaseUrl as an entry in the connection form.

Currently there is no mechanism in the Integration Framework to make a friendlier label for the BaseUrl property, such as Base URL. Spaces in connection property names are not supported.

See Also

Building A TIBCO Scribe® Connector For National Weather Service

Analyzing The National Weather Service Connection

Starting The National Weather Service Project

Generating The National Weather Service Connector Code

Reviewing Sample National Weather Service Connector Generated Code

Connection Configuration For National Weather Service

Query Configuration For National Weather Service