Powered by Zoomin Software. For more details please contactZoomin

Develop with XCC

Connecting XCC to Progress Data Cloud

  • Last Updated: April 14, 2026
  • 2 minute read

Progress Data Cloud is a Software as a Service (SaaS) platform that hosts MarkLogic Server and other Progress products as services. These services work behind a reverse proxy.

Connecting XCC to Progress Data Cloud requires both token-based authentication and a base path that maps to a port of an application server in the destination MarkLogic cluster.

Note:

  • Connecting XCC to Progress Data Cloud requires SSL.

  • When XCC connects to Progress Data Cloud,

    • xcc.httpcompliant is automatically set to TRUE.

    • Session affinity is automatically preserved.

To connect to Progress Data Cloud, you specify apiKey instead of username and password when constructing an instance of ContentSource.

The method newContentSource() is overloaded to provide multiple options to instantiate ContentSource.

One option is to use the following method overload signature:

static ContentSource newContentSource(
  java.net.URI uri,
  SecurityOptions options
)

The following example uses that method overload signature to supply the apiKey as part of the connection uri:

import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import javax.net.ssl.SSLContext;
...

String host = "devhost";
int port = 443;
String apiKey = "P5XiwQ0uIeD8VvzS1QI5uQ==";
String encodedApiKey = URLEncoder.encode(apiKey, StandardCharsets.UTF_8.toString());
String basePath = "/ml/test/marklogic/app-services/";
String encodedBasePath = URLEncoder.encode(basePath, StandardCharsets.UTF_8.toString());

SSLContext sslContext = SSLContext.getInstance("TLSv1.3");
// initialize as per your company security policy
sslContext.init(null, null, null);
SecurityOptions sslOptions = new SecurityOptions(sslContext);

URI uri = new URI(
  "xccs://" + host + ":" + port + 
  "?apikey=" + encodedApiKey + 
  "&basepath=" + encodedBasePath
);
ContentSource contentSource = ContentSourceFactory.newContentSource(
  uri, 
  new SecurityOptions(sslOptions.getSslContext())
);

Session session = contentSource.newSession();
...

Another option is to pass these parameters separately using this method overload signature:

static ContentSource newContentSource(
  java.lang.String host,
  int port,
  char[] apiKey,
  java.lang.String contentbaseName,
  java.lang.String basePath,
  SecurityOptions options
)

The following example uses that method overload signature to pass the parameters:

import javax.net.ssl.SSLContext;
...
// configuration values that may be retrieved by some other mechanism
// outside scope of this guide.
String host = "devhost";
int port = 443;
String apiKey = "P5XiwQ0uIeD8VvzS1QI5uQ==";
String basePath = "/ml/test/marklogic/app-services/";

SSLContext sslContext = SSLContext.getInstance("TLSv1.3");
// initialize as per your company security policy
sslContext.init(null, null, null);
SecurityOptions sslOptions = new SecurityOptions(sslContext);

ContentSource contentSource =
  ContentSourceFactory.newContentSource(
    host,
    port,
    apiKey.toCharArray(),
    null,
    basePath,
    new SecurityOptions(sslOptions.getSslContext())
  );
  
Session session = contentSource.newSession();
...
  • host: The fully qualified domain name of the Progress Data Cloud tenancy.

  • apiKey: The user API key unique to each Progress Data Cloud user. See Manage an API key in Use Progress Data Cloud.

  • basePath: A base URL that maps to a port of an application server on the source MarkLogic Server cluster hosted by Progress Data Cloud.

    This URL would be one of the Progress Data Cloud integration endpoints. See Service cards in Use Progress Data Cloud. An example URL is the preconfigured endpoint for the default App-Services app server, /ml/test/marklogic/app-services/.

    See Expose an app server in Use Progress Data Cloud to expose a custom MarkLogic Server XDBC app server.

  • port: 443 (since Progress Data Cloud requires SSL connection).

See Coding Basics for other required class imports.

For more details on ContentSourceFactory, see ContentSourceFactory.newContentSource().

Progress Data Cloud errors are reflected in PDCloudRequestException.

TitleResults for “How to create a CRG?”Also Available inAlert