Hello, I'd like to create a view by calling method "createViewFromXML(String name, InputStream xml)" in the View class. How can I achieve that? It appears that each time I pass a StringInputStream object to this method, it throws an "Unable to read" exception. My test code is as follows: String xml = "<hudson.plugins.nested__view.NestedView> " + " <owner class=\"hudson\" reference=\"../../..\"/> " + " <name>nnnn1</name> " + " <filterExecutors>false</filterExecutors> " + " <filterQueue>false</filterQueue> " + " <properties class=\"hudson.model.View$PropertyList\"/> " + " <views> " + " <au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView> " + " <owner class=\"hudson.plugins.nested_view.NestedView\" reference=\"../../..\"/>" + " <name>bbbb1</name> " + " <filterExecutors>false</filterExecutors> " + " <filterQueue>false</filterQueue> " + " <properties class=\"hudson.model.View$PropertyList\"/> " + " <noOfDisplayedBuilds>1</noOfDisplayedBuilds> " + " <buildViewTitle></buildViewTitle> " + " <triggerOnlyLatestJob>false</triggerOnlyLatestJob> " + " <alwaysAllowManualTrigger>true</alwaysAllowManualTrigger> " + " <showPipelineParameters>true</showPipelineParameters> " + " <refreshFrequency>3</refreshFrequency> " + " <showPipelineDefinitionHeader>false</showPipelineDefinitionHeader> " + " <displayProgressBar>false</displayProgressBar> " + " </au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView> " + " </views> " + " <columns> " + " <columns/> " + " </columns> " + "</hudson.plugins.nested__view.NestedView> "; InputStream xx=new StringInputStream(xml, "utf-8"); try { View.createViewFromXML("aa", xx); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }
-- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.