whitemarlin Posted September 8, 2011 Share Posted September 8, 2011 I'm trying to replace a manual process by a programmatic process. The process is creating an "analysis client connection". Manually, it is done by steps similar to the following (copied from an internal doc):.a. Add Resource/Other/Analysis Client Connectionb. Select “Mondrian Connection”c. Enter the connection Name and Label. Use the same value for Name and Label. Do not enter a description. Next.d. Locate the OLAP schema from the repository. Select the schema that you created above.e. Next. Next. (no changes required on the next screen).f. Locate the data source “From the Repository.” Select the data source that you created above.g. Next. Save.I am trying to use the putResource(ResourceDescriptor, RequestAttachment[]) method in com.jaspersoft.jasperserver.irplugin.wsclient.WSClient. But I don't know how to specify the OLAP schema and the data source in the ResourceDescriptor.I've looked for examples, docs, forum posts, etc., and have not found anything helpful.Can you help?Thank you. Link to comment Share on other sites More sharing options...
whitemarlin Posted September 12, 2011 Author Share Posted September 12, 2011 I concluded that the 'right' way to do this was to set the ResourceDescriptors for the OLAP schema and the data source as children of the ResourceDescriptor for the client connection. But this was unsuccessful: the client connection was created, but its OLAP schema (at least) was null. I believe this is because MondrianConnectionHandler.updateResource, unlike for example QueryHandler.updateResource and ReportUnitHandler.updateResource, does not look for children of the ResourceDescriptor. (In fact, it does absolutely nothing.)This appears to be still true in 4.1.0.Do I have any recourse other than patching MondrianConnectionHandler.updateResource (and MondrianConnectionHandler.doDescribe) to be cognizant of child ResourceDescriptors? And would that even work?I would appreciate any help.Post Edited by whitemarlin at 09/12/2011 06:59 Link to comment Share on other sites More sharing options...
whitemarlin Posted September 13, 2011 Author Share Posted September 13, 2011 It does appear to work, assuming the patch in my post http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=91764 is applied.The child ResourceDescriptors must be defined as references, by for example rd.setWsType(wsType); // needed? rd.setReferenceUri(uri); rd.setIsReference(true);Attached is the patch that makes the MondrianConnectionHandler changes mentioned above. Link to comment Share on other sites More sharing options...
whitemarlin Posted September 14, 2011 Author Share Posted September 14, 2011 I created http://jasperforge.org/projects/jasperserver/tracker/view.php?id=5446 to track this issue. 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