WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page
  • Provider Key
  • Web Service Calls
  • GET vs POST
  • Configuration
  • Params
  • Allow
  • Test Method

Was this helpful?

  1. Connecting to Data
  2. Data Connectors

Custom Web Services

The WireBootstrap Custom Data Connector is included in the core WireBootstrap framework. The WireBootstrap Custom Data Connector allows custom web services to be used with data sources. These are services developed by in-house teams or third party vendors hosted on-premise or in the cloud.

Provider Key

Use the custom provider key to use the service provider for this data connector with a data source.

const service = new wire.data.DataSource("custom", {
    ...    
});

Web Service Calls

URLs for making service calls are created using the standard template below.

[root]/[method]?[filters]

URL Element

Description

root

method

The method to call on the web service. This will be the entity set in a table query in the from clause.

filters

Any filters passed to the method. These are set up in the table query where clause.

Consider the following query.

const service = new wire.data.DataSource("custom", {
    ServiceRoot: "https://service-reporting"
});

const query = wire.data.select().from("sales")
    .where()
        .eq("product", "PRD-001")
        .eq("territory", "East");
        
const result = service.exec(query);

When using this query with the custom web service provider, the following URL is constructed and used to call the web service.

https://service-reporting/sales?product=PRD-001&territory=East

GET vs POST

The previous query will result in a GET HTTP method being used for the web service call. To use a POST with custom data, change the where clause in the filter to use the custom method to send up any custom data to the method in the body of the request.

In the example below, the same query will be posted to the service.

...

const filter = { product: "PRD-001", territory: "East" }

const query = wire.data.select().from("sales")
    .where()
        .custom(filter)

...

Configuration

Name

Default

Description

params

testMethod

Params

Sometimes its helpful to be able to send custom parameters in the web service calls that are outside of any query filters. Use the provider params configuration option to set these up.

const service = new wire.data.DataSource("custom", {
    ServiceRoot: "https://service-reporting",
    Provider: {
        params: {
            option1: "value1",
            option2: "value2"
        }
    }
});

In the example above, two extra parameters called option1 and option2 will be set up in the URL and sent to the data service.

https://service-reporting/sales?product=PRD-001&territory=East&option1=value1&option2=value2

Allow

Name

Supports

delete

true

discover

false

storedProcedure

false

tableQuery

true

tableQuery.orderBy

false

tableQuery.groupBy

false

test

true

write

true

Test Method

The custom service provider supports testing if the service is available. However, the method to be used for this needs to be specified in the testMethod configuration option.

const service = new wire.data.DataSource("custom", {
    ServiceRoot: "https://service-reporting",
    Provider: {
        testMethod: "test"
    }
});

const available = service.test();
PreviousSQL DataNextLocal Data

Last updated 1 year ago

Was this helpful?

The root to be used in web service calls. This will be the set on the data source.

For more on creating and executing queries, visit and .

Custom parameters to send with query requests. See below.

This method used to test the connection to the data service. See below.

Service providers are able to tell consumers about the functionality they support through an property. Below is a list of the functionality that the custom service provider supports.

Connecting to Data
Creating Queries
allow
details
details
ServiceRoot