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

Jasper Server Helper Classes for Web Services


ncheruku

Recommended Posts

Hi All,

I am newbie to Jasperserver.I do have a requirement where we are using  jasperserver Helper classes for client to make connection to jasperserver.Jasperserver webservice guide  suggests us to go through the doucmentation as the iReport plugin has the webservice client helper classes to built.My questions is like if we have these helper classes do we still need to built the client side stubs or can we make use of the existing class to call the jasperserver application.If anyboady  can please post a sample code for calling the jasper sever application from the helper classes I would really appreciate.

Thanks

Nithin

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can just use the helper classes, like:

 

 

Code:
import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.Argument;import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor;import com.jaspersoft.jasperserver.irplugin.JServer;import com.jaspersoft.jasperserver.irplugin.wsclient.FileContent;import com.jaspersoft.jasperserver.irplugin.wsclient.RequestAttachment;import com.jaspersoft.jasperserver.irplugin.wsclient.WSClient;import com.jaspersoft.jasperserver.war.JasperServerConstants;...private static WSClient wsclnt = null;private static JServer jserver = null;....	/*	 * setUp method	 */	public void setUp() throws Exception, AxisFault {		if (wsclnt == null) {			jserver = new JServer();			jserver.setUrl(targetUrl);			jserver.setUsername(JasperServerConstants.instance().USERNAME);			jserver.setPassword(JasperServerConstants.instance().PASSWORD);			wsclnt = new WSClient(jserver);		}	}....		ResourceDescriptor rd = new ResourceDescriptor();                rd.setWsType( ResourceDescriptor.TYPE_FOLDER );                rd.setUriString("/");		List lst = wsclnt.list(rd);		assertNotNull("Null LIST returned", lst);		assertFalse("List has no valid content", lst.isEmpty());
Link to comment
Share on other sites

I am using the SOAP web services and I am calling the services from PHP.

 

So basically I run the the report from jasperserver. This works great and it returns the report. But, now I would like to have the PDF send from the jasperserver to dissallow printing.

Is there any way to achieve this.

 

If not possible by means of the web service call, is it possible to define the "PDF_PERMISSIONS" in the jrxml as a wrokaround?

 

thank you in advance.

Link to comment
Share on other sites

loneparadox
Wrote:

So basically I run the the report from jasperserver. This works great and it returns the report. But, now I would like to have the PDF send from the jasperserver to dissallow printing.

Is there any way to achieve this.

That's not currently possible.  Log it as a feature request for consideration.

Regards,

Lucian

PS:  If you query is not directly related to the original subject of the topic, please post it as a new thread.

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