Here is the example how to create a domain: $domain = new JaspersoftDtoResourceSemanticLayerDataSource();$domain->uri = $uri;$domain->dataSource = $dataSourceuri;$domain->label = "Client Domain";$domain->schema = new JaspersoftDtoResourceFile();$domain->schema->content = base64_encode(file_get_contents('schema.data')); // base46 does the trick$domain->schema->type = 'xml';$domain->schema->label = 'schema';$repositoryService->createResource($domain);[/code]