I want to create a domain using the PHP Rest Client.
I created a semanticLayerDatasource. I want to create the schema of this domain in $domname_files.
The object semanticLayer.... needs a schema, but the documentation lacks in this point.
So any idea or at best an example how to create a domain via the php client would be much appreciated.
I tried to create a xml file locally and set schema to the uri of this source. This way i am able to create a domain, but if i try to create an adhoc view, i get a null exception.
Thank you.
1 Answer:
Posted on February 21, 2017 at 3:06am
Here is the example how to create a domain:
$domain = new Jaspersoft\Dto\Resource\SemanticLayerDataSource(); $domain->uri = $uri; $domain->dataSource = $dataSourceuri; $domain->label = "Client Domain"; $domain->schema = new Jaspersoft\Dto\Resource\File(); $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);