OSRS — Open SRS Java Client

Public API showcase

OSRS — Open SRS Java Client

OSRS is a public, open-source showcase of the Dyanet API framework: a clean Java client for the OpenSRS domain registry. It connects to the OpenSRS registry, executes requests, and unmarshals the responses into plain Java objects (POJOs) you can consume directly in your application — no XML wrangling required.

The source is on GitHub: github.com/dyanet/osrs.

What's inside

  • Configuration for multiple environments (for example, test and prod)
  • Jackson marshalling and unmarshalling of XML requests, responses, and envelopes
  • Public certificate handling for SSL and MD5 request signatures
  • An extensible request/response model designed to grow into other APIs
  • High-performance Apache HttpClient under the hood
  • A set of basic tests to get you started

Configuration

Configuration is a simple .properties file, resolved in this order: an explicit -Dosrs.config JVM override, then the OSRS_CONFIG environment variable (handy for containers and .env-style deploys), otherwise osrs-<env>.properties on the classpath — where <env> comes from -Dosrs.env (defaults to test). Templates for osrs-test.properties and osrs-prod.properties ship with the project; set your OpenSRS osrs.userName and osrs.key in the one you choose.

A quick taste

OsrsClient client = OsrsClient.getInstance(false);

GetBalance req = new GetBalance();
req.setRegistrantIp(null);

OsrsResponse response = client.sendReceive(req);
Balance balance = ((BalanceResponse) response).getBalance();

Testing

Run mvn test (or mvn verify) for the fast, offline unit suite, which enforces a minimum instruction-coverage bar via JaCoCo. Integration tests tagged integration exercise the live OpenSRS test registry and are opt-in — run them with mvn verify -Pintegration (valid test credentials required).

This is just a sample. OSRS is one client from the wider Dyanet API library. Our full catalog of production-grade API clients — across registries, cloud providers, billing, and messaging platforms — is available under license, together with a tool that keeps your API clients automatically up to date as upstream providers change their contracts.

Get the full library

Want licensed access to the complete API suite and the auto-update tooling? Let's talk.

Contact usView OSRS on GitHub