JasperReports Server using REST with JSON request return PDF report - json

I want to export reports in PDF from my app (Writed in MEAN) sending data to fill the report through the request.
It is possible to call JasperReports Server REST with a JSON file as a DataSource returning PDF report as output?
I found some examples using external datasource as JSON, but not sending JSON in request.

Related

HTTP request from Jira to Logic App not working, but same json from Postman work

I`m trying to build a Logic app on Azure which will receive JSON from Jira and do some magic on the Azure side. I created a button in Jira flow, which will trigger a webhook to Azure App Logic address. In App Logic I had a step called "When HTTP trigger is received". For schema creation I used the JSON from Jira, so the schema should be okay.
The problem is working with the input. In raw file I can see whole JSON with all details and properties, but it's not divided in to variables automatically.
Step output directly from JIRA
Output from Postman
The headers are more or less the same, so that shouldn't be a problem. Without this output I can't work with variables from JSON correctly, because when I will use variables name from Dynamic Menu it will be null (or "")

SSRS: How to use XML document data source with parameters

I am trying to create an SSRS report that has an XML data source, but am stuck.
I have a URL that accepts a parameter (Below, parameter is named Id with value param1) and returns the following XML data:
https://site1/test/GetInfo/param1
or
https://site1/test/GetInfo?Id=param1
<Contract xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Dynamics.Ax.Application">
<Id>param1</Id>
<City>Los Angeles</City>
<Country>USA</Country>
<Customer>Customer1</Customer>
<State>WA</State>
<Street>150 Main Street</Street>
<Zip>99999</Zip>
</Contract>
This isn't a web service per se since it simply accepts parameter/query at the URI, so I am believing this to be an XML document.
In SSRS 2016 Report Builder, I did the following:
In my report, I created a Datasource with ConnectionType = XML, and Connection string = https://site1/test/GetInfo
Created a dataset pointing to above data source, with Query type = Text, with the following:
<Query>
<Method Namespace="http://schemas.datacontract.org/2004/07/Dynamics.Ax.Application" Name="GetInfo">
<Parameters>
<Parameter Name="Id">
<DefaultValue>DefaultValue1</DefaultValue>
</Parameter>
</Parameters>
</Method>
</Query>
Upon clicking OK button to complete the dataset, I get the following error:
Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
Failed to execute web request for the specified URL.
Method Not Allowed: The remote server returned an error: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
<Error><Message>The requested resource does not support http method 'POST'.</Message></Error>
The Method name in the query maps to the actual method name in the class, and and the operation is a GET method.
It's been a while since I played w/ the XML Data Provider, but my recollection is that the XML Data Provider will do a POST with a SOAP payload for any URL that doesn't have a file extension of xml (for example, http://www.example.com/mywebservice). Parameters in this case are included in the SOAP request payload. Since you don't have a web service, then your server likely doesn't support the POST method on the HTTP request which is likely why you're getting the 405 Method not allowed error.
If you have an extension of xml in your url, then the XML Data Provider will do a GET request and include the parameters in the query string of the URL (for example, http://www.example.com/mywebservice/myfile.xml?name=Joe).
If you don't have a way to process these parameters on the server, then it may be easier to return the entire XML data and do a table filter.
Or if you have a Power BI Pro account, then you can create a Power BI Dataset from the XML data, create a Power BI Dataset Connection in RB, then filter the data in a DAX query in Power BI Report Builder (note that Power BI Dataset connections are only supported in Power BI Report Builder and Power BI Premium Capacities, not in SSRS or PBIRS).

Export XML data as JSON in Talend

In Talend, I have a job that received XML messages (of different structures) and call a web service with those messages. The tRestClient component automatically transforms the Xml into JSON when it calls my web service.
In case of an error, I want to save my message locally in JSON. Is there a component in Talend to automatically transform the XML into JSON (like the tRestClient do)?

Raw Json data in request in liferay web service

I am using liferay 6.2 & i have invoked few web services.The thing is that when passing parameters as form data it works fine, get the json response, but the issue is when pass parameters as raw data json form it gives error "message": "No JSON web service action associated with path /login/user-login and method POST for //xxx-portlet"
This means it doesn't work with Content-Type: application/json. I was trying these things through postman the tool in chrome.I want the my json web service should accept the json raw data in request.

How to view the data from the database in json format

I am trying to pass the data from the database to the controller through a service (WCF Data Service), which is an independent application. While running the service for testing, the data is shown in XML format. I need to view the data in JSON format. Any solutions??
Thanks in Advance
For JSON support:
Download the JSONPSupportBehavior.cs from the Microsoft Code Gallery
Locate the JSONPSupportBehavior.cs file in the downloaded project and include it in your web project.
Add a reference to System.Runtime.Serialization.dll.
Mark your service with the JSONPSupportBehavior attribute.
[JSONPSupportBehavior]
public class WcfDataService : DataService<SampleDbEntities>
Please refer this link
A Beginner's Tutorial for Creating WCF Data Services
Hope this helps
WCF Data services supports JSON out of the box.
In order to receive a response in JSON format, you can include application/json in the accept header of the request. Or you can use $format=json in your request url.