ncheruku Posted September 1, 2009 Share Posted September 1, 2009 Hi,I do have a requirement where I need to get the whole folder as a list object in which it has the child folders and in turn has reports under each folder which has the following directory structure.I have gone through the webservices guide and it says that we can attach one resource descriptor for one request.For the one resource descriptor can I add the children in this way and extract it..Please do let me know if this is the correct way as I need to get all the folders as well as the reports in the folder at a time through single request.......Can I use the list method for this purpose...For Example: FolderA FolderAa FolderAx report1 report2 report3 FolderAy report1 report2 report3 FolderAb report1 report2 null;null;new JServer();"jasperadmin");"jasperadmin");"http://localhost:8080/jasperserver/services/repository");new ResourceDescriptor();TYPE_FOLDER);"/FolderA");"/FolderA");new ResourceDescriptor();TYPE_FOLDER );"/FolderA/FolderAa");new ResourceDescriptor();TYPE_FOLDER );"/FolderA/FolderAa/FolderAx");new ResourceDescriptor();TYPE_FOLDER );"/FolderA/FolderAa/FolderAy");new ResourceDescriptor();TYPE_FOLDER );"/FolderAb");return reports =ListList children =JServer jServer =jServer.setUsername(jServer.setPassword(jServer.setUrl(ResourceDescriptor rd =rd.setWsType(ResourceDescriptor.rd.setParentFolder(rd.setUriString(ResourceDescriptor child1 =child1.setWsType( ResourceDescriptor.child1.setUriString(children.add(child1);ResourceDescriptor child2 =child1.setWsType( ResourceDescriptor.child1.setUriString(children.add(child2);ResourceDescriptor child3 =child1.setWsType( ResourceDescriptor.child1.setUriString(children.add(child2);ResourceDescriptor child4 =child1.setWsType( ResourceDescriptor.child1.setUriString(children.add(child4);rd.setChildren(children);reports = jServer.getWSClient().list(rd); reports;Can you please tell me if this way works ....ThanksChinna 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