t.mehner Posted June 23, 2016 Share Posted June 23, 2016 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. Link to comment Share on other sites More sharing options...
branko.vukasovic Posted February 21, 2017 Share Posted February 21, 2017 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] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now