Jump to content
We've recently updated our Privacy Statement, available here ×

Creating analysis client connection via web service in 3.7


whitemarlin

Recommended Posts

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 Connection
b. 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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...