Jasper Studio (Web Service Adapter) giving null response - Rest Api

0

hi,

I created a data adapter to open weather api as shown in the example ( http://community.jaspersoft.com/wiki/webservice-datasource-documentation) using jasper studio community version 6.2.1 and the webservice datasource plugin(http://community.jaspersoft.com/project/web-service-data-source). When i try to create the webservice query it gives a request error saying Response is null. This is what error it gives me:

net.sf.jasperreports.engine.JRException: Response is null!
at com.jaspersoft.webservice.data.util.WebServiceConnector.callWS(WebServiceConnector.java:149)
at com.jaspersoft.studio.data.webservice.designer.DesignerWidget.getTreeInputFile(DesignerWidget.java:388)
at com.jaspersoft.studio.data.webservice.designer.FieldsArea.loadViewer(FieldsArea.java:175)
at com.jaspersoft.studio.data.webservice.designer.FieldsArea.access$0(FieldsArea.java:154)
at com.jaspersoft.studio.data.webservice.designer.FieldsArea$1.widgetSelected(FieldsArea.java:133)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at com.jaspersoft.studio.property.dataset.dialog.DatasetAction.run(DatasetAction.java:82)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.jaspersoft.studio.rcp.intro.Application.start(Application.java:99)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
 
I have tried same URL with postman and it seems to work. I dont know what the problem is. Does anyone have any idea?
rg1778's picture
7
Joined: Apr 26 2016 - 2:17pm
Last seen: 3 years 6 months ago

Which example and which URI?

hozawa - 3 years 6 months ago

I am using the example as shown in this link http://community.jaspersoft.com/wiki/webservice-datasource-documentation . The URI is api.openweathermap.org

rg1778 - 3 years 6 months ago

Hi, Even I am facing the same issue "Response is null!" . @rg1778, did you get any solution on this?

nattargekar - 3 years 6 months ago

3 Answers:

0

Do you have the same Headers as POSTMAN ? URL properties as well?
Did you configure the kind of request properly (POST, GET) ? 

Authentication as well?

plambert_1's picture
Joined: May 21 2013 - 10:18am
Last seen: 1 year 1 month ago
0

I had de same problem.

And after struggling a little bit I found that the problem was the connection SSL from my webservice, that was TLS 1.0. To resolve this in the file  "Jaspersoft Studio.ini" (you can find it on the path of the Jasper Studio installation) I add the line "-Dhttps.protocols=TLSv1".

yvette.anjos's picture
Joined: Apr 26 2016 - 9:28am
Last seen: 3 years 3 months ago
0

Facing the same error tried to add TLSv1 and still having the same issue

chennakrishna.pala's picture
Joined: Jun 9 2016 - 12:28am
Last seen: 1 year 3 months ago
Feedback
randomness