JDBC Driver for Xero

Build 22.0.8479

接続の確立

JDBC データソースの作成

Java アプリケーションから接続するJDBC データソースを作成できます。CData JDBC Driver for Xero に基づくJDBC データソースの作成は、3つの基本ステップで構成されます。

  • ドライバーのJAR ファイルをクラスパスに追加します。JAR ファイルはインストールディレクトリの[lib]サブフォルダ内にあります。.lic ファイルはJAR ファイルと同じフォルダ内に配置される必要があることに注意してください。
  • ドライバークラスを入力します。次に例を示します。
    cdata.jdbc.xero.XeroDriver
  • JDBC URL を入力します。次に例を示します。
    jdbc:xero:InitiateOAuth=GETANDREFRESH;
    
    or
    
    jdbc:cdata:xero:InitiateOAuth=GETANDREFRESH;

    上記の2つ目の形式は、同じURL 形式を使用しているドライバー間でアプリケーションに競合がある場合は、CData ドライバーを使用していることを確認するために常に使用できます。URL は "jdbc:xero:" または"jdbc:cdata:xero:" のいずれかから始まり、任意の接続プロパティの名前と値のペアをセミコロン区切りで入力します。

Xero API への接続

本製品 は、以下のXero API をサポートしています。

  • Accounting API:Schema 接続プロパティをACCOUNTING に設定。
  • Australian Payroll API:Schema 接続プロパティをPAYROLLAUS に設定。
  • Files API:Schema 接続プロパティをFILES に設定。
  • Fixed Assets API:Schema 接続プロパティをASSETS に設定。
  • Projects API:Schema 接続プロパティをPROJECTS に設定。

It is also recommended that you set the Tenant property, which can be the name or ID of a Xero organization. Xero allows you to authorize the 本製品 to access multiple organizations. By default the 本製品 will pick the first one, which may not be the one you expect if the 本製品 is granted access to additional organizations.

If you need to confirm what organizations the 本製品 has access to, you can connect without an Tenant and read the Tenants view. This will provide both the ID and the name of each connected organization. You should use the ID to set the Tenant property when possible since multiple organizations can have the same name.

Xero への認証

All connections to Xero are authenticated using OAuth. The 本製品 supports using PKCE applications and OAuth applications. For desktop applications, the 本製品's embedded application is the simplest way to authenticate. 唯一の要件は、InitiateOAuthGETANDREFRESH に設定することです。

When the 本製品 starts, it will open a browser and Xero will request your login information. The 本製品 will use the credentials you provide to access your Xero data. These credentials will be saved and automatically refreshed as needed. For desktop applications, the 本製品's default application is the simplest way to authenticate. 唯一の追加要件は、InitiateOAuthGETANDREFRESH に設定することです。

When the 本製品 starts, it will open a browser and Xero will request your login information. The 本製品 will use the credentials you provide to access your Xero data. These credentials will be saved and automatically refreshed as needed.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8479