Jasper : How to keep HTTP header in datasource from Jaspersoft Studio to server? - jasper-reports

Consider the following :
I have a PHP web application. This application is protected from any intrusion via a middleware that looks for the correct credentials everytime a call to a route is done. If your are logged in correctly, the page is displayed. If not, you are kicked out. Simple and easy.
Now, this application provides me with links that return JSON. This JSON is generated for the sole purpose of reporting. In Jaspersoft Studio, I created a JSON data adapter and used the provided links as the URL.
But that was not it yet. Since a middleware is checking every link calls in the application, I needed to add an exception for my reports. I decided that passing an encrypted token in the HTTP header was the solution. I then added the option into our data adapter.
It worked like a charm!
Now, to the problem :
Using the information provided on the Jaspersoft website, I exported my Data Adapter to the server. The thing is, the HTTP Header is not considered anymore when calling the data source from the server. Of course, my report does not work anymore. I then tested with a link hosted on another platform and it worked, even without the HTTP header.
So, my question is how do I keep the HTTP header in my datasource from Jaspersoft Studio to the server?
Edit 1: Jaspersoft Studio Version : 6.4.0, JasperSoft Server Version: 6.3.0

Those HTTP options were added in JasperReports 6.3.1. The closest Server version to support those features should be 6.4.0.

Related

Jasper Server "fusion component not supported" rendering a PDF

I have several reports which have been integrated into a dashboard web app. On several of the reports we use the "Widgets Pro" angular gauge component. This renders and displays fine with visualize.js. The user would like to be able to export some of these as PDF documents. It renders fine if I export to PDF from within TIBCO jasper studio, but when I deploy it jaspersoft-pro and attempt to export it as a PDF or a DOCX file from the server the component does not render and the error message "[Fusion Component Not Supported]" is left in its place.
I'm not really sure where to start with this. I assume some components or libraries need to be added to our server.
A couple other details to mention: The workstation on which I develop is Windows. The server is Linux based. We are running TIBCO jasperserver 7.5.0
Well the local crew ended up figuring this out.
Turns out that PhantomJS needed to be updated and configured on the jaspersoft-pro server, to 2.1.1 in our case.
More specific steps:
Download PhantomJS 2.1.1 from official website and extract to an appropriate spot on your system (like /usr/local/phantomjs).
Edit $CATALINA_BASE/webapps/jasperserver-pro/WEB-INF/js.config.properties and set "phantomjs.binary=/usr/local/phantomjs/bin/phantomjs"
Edit $CATALINA_BASE/webapps/jasperserver-pro/WEB-INF/classes/jasperreports.properties and set "net.sf.jasperreports.phantomjs.executable.path=/usr/local/phantomjs/bin/phantomjs"

MS Project server 2016 update custom fields on tasks

For Project Server 2013 we’ve been using the SOAP API’s QueueUpdateProjectRequest to achieve this but in 2016 we can’t even checkout the project using SOAP.
We try to POST to /PWA/_vti_bin/psi/Project.asmx:
<?xml version='1.0' encoding='UTF-8' ?><ns2:Envelope xmlns:ns3="http://schemas.microsoft.com/office/project/server/webservices/Project/" xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"><ns2:Header></ns2:Header><ns2:Body><ns3:CheckOutProject><ns3:projectUid>7475f3ef-226e-e611-80d3-0050568a983b</ns3:projectUid><ns3:sessionUid>c430ce2b-057e-4990-b5b6-9c6f28415739</ns3:sessionUid><ns3:sessionDescription></ns3:sessionDescription></ns3:CheckOutProject></ns2:Body></ns2:Envelope>
and get:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://Microsoft.Office.Project.Server">a:ProjectServerFaultCode</faultcode><faultstring>Unhandled Communication Fault occurred</faultstring><detail><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Incorrect inproc routing. No inproc host is available for Project.</string></detail></s:Fault></s:Body></s:Envelope>
We’ve also tried writing the custom field values using custom field internal names when Merge Posting to /ProjectServer/Projects('{#project}')/Draft/Tasks('{#Id}’.
The server seems to ignore the custom field values while correctly updating system field values.
There is documentation for updating custom fields on Project, but not on Task: https://github.com/OfficeDev/Project-REST-Basic-Operations/blob/master/updateprojectcustomfieldvalues.ps1
What is the proper way for updating custom fields on Tasks in Project Server 2016?
According to Microsoft, there is no Project class in the PSI anymore:
https://technet.microsoft.com/en-us/library/mt422816(v=office.16).aspx#Anchor_2
Project Server Interface (PSI) Project class removed
The Project class in the PSI is not supported in Project Server 2016. For all new development, use the Project Client Side Object Model (CSOM).
I'm getting the same error for calling PSI functions from the Project class.
I'm not 100% sure, but I guess on the server itself, the REST/SOAP operations are still using the PSI in the end, so you get the same error.
No idea whether you can still achieve what you need with the REST/SOAP.
The solution will be to use CSOM (as suggested by Microsoft), but I don't know if it fits your application.

How to test SAPUI5 apps locally in apache tomacat installed in eclipse?

I am working on SAPUI5 app which was created long back and running successfully. Now I need to do some enhancements and for that I downloaded the app and uploaded in eclipse.
Now when I am running this app locally - It is not working as the XMLHTTP Request says 404 (Not Found) when accessing the backend OData service.
URI is : /sap/opu/odata/sap/Z****SRV";
I understand that I need to add http://<host>:<port> before URI.
But I cannot change it in all the places. I found out that we can write <param-value> in web.xml file but I did and still it is not working
Can someone guide me how?

Unable to integrate CQ5.6.1 with Site Catalyst

I'm having difficulty in integrating AEM 5.6.1 with Site Catalyst. It allows me to connect in the configuration successfully, but does not work on the framework setup.
I've followed the standard procedure to connect AEM to SC and it accepts my login in the configuration, but fails on the framework set up with the browser message 'We were not able to login to SiteCatalyst. Please check your credentials and try again.'. Behind the scenes in the server log;
12.12.2014 14:10:06.967 *WARN* [0:0:0:0:0:0:0:1 [1418393406764] POST /libs/cq/analytics/sitecatalyst/service.json HTTP/1.1] com.day.cq.analytics.sitecatalyst.impl.SitecatalystHttpClientImpl Data center 'https://api3.omniture.com/admin/1.3/rest/' responded with errors {"error":{"code":500,"message":"Internal Server Error"}}
12.12.2014 14:10:06.967 *ERROR* [0:0:0:0:0:0:0:1 [1418393406764] POST /libs/cq/analytics/sitecatalyst/service.json HTTP/1.1] com.day.cq.analytics.sitecatalyst.impl.servlets.SitecatalystServlet Call to SiteCatalyst method 'Company.GetReportSuites' failed com.day.cq.analytics.sitecatalyst.SitecatalystException: not authenticated
I've tried accessing via the API Explorer and it works.
I've tried the troubleshooting guide without success.
I can log in to Site Catalyst, I'm an admin, I am in the web services access group.
I've tried using a clean install of CQ5.6.1 with geometrixx - it doesn't work either.
I've tried this from a server and from a localhost/dev machine with the same results. No proxy. I've even tried using the shared secret as the password but then it doesn't connect at all, and fails on the configuration screen.
What might cause this to fail?
If it doesn't work with a fresh install and Geometrixx, then it's probably an Adobe bug. That's typically the first thing support will ask you about.
I would also verify using Geometrixx Outdoors, or a more recent demo site, on your fresh install, just to ensure it's not an outdated ClientLib issue.
I know this isn't a direct answer to your question, but honestly, I would approach the integration differently. I've worked with the AEM-SC framework and it's buggy at best. It's very finicky, it doesn't REALLY work the way the documentation claims, and it requires that you're very specific about what Clientlibs are on the page.
Moving forward, I think using Adobe Dynamic Tag Manager is the better approach, for many reasons. My understanding is that it's Adobe's recommendation as well. I'd consider moving to that. In AEM 5.6.1, you'll have to customize your integration with DTM, but it's not very hard.
Solution: Add a property on the configuration node for sitecatalyst: (eg. /etc/cloudservices/sitecatalyst/my-sc-configuration)
server=https://api.omniture.com/admin/1.2/rest/
it also seems to work with newer API versions such as https://api3.omniture.com/admin/1.3/rest/
It would appear that for 5.6.1 it ignores the OSGi configuration, at least for the configuration screens. With this extra property, the framework page loads without error and allows selection of the RSID.

How OrientDB Studio Code Works?

I have a question regarding the way the OrientDB studio works.
When I build my own web application to access the OrientDB database, I need to enable CORS and then it works, but how comes that the OrientDB studio app works without having to enable CORS?
That's really puzzling me because I'd like to reuse the code logic of the OrientDB Studio app in my own application and it does not work like the OrientDB Studio app.
Also, it seems that the OrientDB Studio app is using the REST API of OrientDB, not the JavaScript API (orientdb-api.js). Am I right?
Is there any documentation I could read to get a full understanding of how the Studio works?
Regards,
Jeremie
You need to enable CORS because your app it is outside the domain of ODB. if you are running it in localhost is http://localhost:2480.
So if you make a request from a different domain the browser stops you if the server has CORS disabled.
Studio starts as a plugin inside ODB http (http://localhost:2480/studio/index.html) so is allowed to do request without enabling CORS.
If you do not want to enable CORS you can put your html and js under the www directory in
the $ORIENTDB_HOME distribution.
There is no documentation about Studio Code. You can browse it here https://github.com/orientechnologies/orientdb-studio if you need some further information you can ask me as i'm the main maintainer of Studio :D
I can tell you that it does not use the orientdb-api.js as it uses angular.js.
I advice you to not use orientdb-api.js but uses directly the REST api
with JQuery/Angular.