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

JasperServer WS via ColdFusion + 2 other Bugs


ktrinad

Recommended Posts

By: Jason Roberts - jroberts42

JasperServer WS via ColdFusion + 2 other Bugs

2006-05-17 22:48

Hi,

 

Today I installed JasperServer via the windows installer and then proceeded to install the web service jar within it as well. The main web protal worked fine (except for finding the bugs already posted in this forum). I then tested all the wsdl's below through IE and they all appear to work correctly.

 

http://localhost:8080/jasperserver-ws/view-services/JasperServerService?wsdl

 

http://localhost:8080/jasperserver-ws/view-services/AdminService?wsdl

 

http://localhost:8080/jasperserver-ws/view-services/Version?wsdl

 

http://localhost:8080/jasperserver-ws/services/repository?wsdl

 

So now I create a CF page (CFMX 7) that creates a webservice object pointing to:

http://localhost:8080/jasperserver-ws/view-services/JasperServerService?wsdl

 

I get a Compilation Failed Exception error from CF. I then test it with the other three WSs and get no errors, instead getting a valid object which I can call methods on. The error I got:

 

coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:

Found 3 semantic errors compiling "C:/JRun4/servers/cfusion/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS1622892587/localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI.java":

 

11. public SoapAPI.FileContent getFile(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

<--------->

*** Error: Type localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI$FileContent was not found.

 

 

15. public SoapAPI.ReportParameter[] getReportParameters(java.lang.String reportUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

<------------->

*** Error: Type localhost/jasperserver_ws/view_se....

 

(rest of error unfortunately truncated in logs)

 

==========================================

 

Another thing I found that I'm not sure is related... when I go to the following url within IE:

 

http://localhost:8080/jasperserver-ws/view-services/JasperServerService?method=login&username=tomcat&password=tomcat

 

I get the following error(s) in my tomcat command window:

 

WARN ResourceBundleMessageSource.http-8080-Processor24:184 - ResourceBundle [jasperserver_messages] not found for MessageSource: Can't find bundle for base name jasperserver_messages, locale en_US

 

ERROR SoapAPI,http-8080-Processor24:155 - error logging in with tomcat/tomcat java.lang.NullPointerException at com.jaspersoft.jasperserver.ws.SoapAPI.login(SoapAPI.java:151) ...

 

==========================================

 

Last thing I noticed was going to:

 

http://localhost:8080/jasperserver-ws/view-services

 

shows a list of services with wsdl links. The links don't work properly. For example, the first one points to:

 

http://localhost:8080/jasperserver-ws/services/JasperServerService?wsdl

 

instead of:

 

http://localhost:8080/jasperserver-ws/view-services/JasperServerService?wsdl

 

 

 

Anyways, any help on the webservice via CFMX 7 integration would be greatly appreciated. Let me know if you need more information.

 

Thanks,

Jason

 

 

By: Jason Roberts - jroberts42

RE: JasperServer WS via ColdFusion + 2 other Bugs

2006-05-17 23:20

Here is the full error I grabbed through a try/catch:

 

coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:

 

Found 3 semantic errors compiling "C:/JRun4/servers/cfusion/cfusion.ear/cfusion.war/WEB-INF/cfusion/stubs/WS1622892587/localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI.java":

 

11. public SoapAPI.FileContent getFile(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

<--------->

*** Error: Type localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI$FileContent was not found.

 

 

16. public SoapAPI.FileAttributes getFileAttributes(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

<------------>

*** Error: Type localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI$FileAttributes was not found.

 

 

22. public SoapAPI.ReportParameter[] getReportParameters(java.lang.String reportUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

<------------->

*** Error: Type localhost/jasperserver_ws/view_services/JasperServerService/SoapAPI$ReportParameter was not found.

 

 

Here is the SoapAPI.java file that CF is trying to compile:

 

(C:JRun4serverscfusioncfusion.earcfusion.warWEB-INFcfusionstubsWS1622892587localhostjasperserver_wsview_servicesJasperServerServiceSoapAPI.java)

 

/**

* SoapAPI.java

*

* This file was auto-generated from WSDL

* by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.

*/

 

package localhost.jasperserver_ws.view_services.JasperServerService;

 

public interface SoapAPI extends java.rmi.Remote {

public SoapAPI.FileContent getFile(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public java.lang.String getRoles() throws java.rmi.RemoteException;

public java.lang.String getRemoteUser() throws java.rmi.RemoteException;

public java.lang.String login(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException;

public SoapAPI.FileContent[] runReport(java.lang.String reportUri, java.util.HashMap parameters, java.lang.String outputFormat, int page) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileAttributes getFileAttributes(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileAttributes getFolderAttributes(java.lang.String fileUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileAttributes[] getFolders(java.lang.String folderUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileContent[] getFiles(java.lang.String[] fileUris) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileAttributes[] getReportList() throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.FileAttributes[] getFileList(java.lang.String folderUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

public SoapAPI.ReportParameter[] getReportParameters(java.lang.String reportUri) throws java.rmi.RemoteException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceException, localhost.jasperserver_ws.view_services.JasperServerService.WebServiceFileNotFoundException;

}

 

 

Could it be a malformed WSDL?

 

Jason

 

 

By: T Kavanagh - tkavanagh

RE: JasperServer WS via ColdFusion + 2 other

2006-05-18 10:09

I am wondering if this is a problem with the qname definition found in the server-config.wsdd file (in WEB-INF). The capitalization is used a bit inconsistantly...

 

<beanMapping qname="jaspersoft:fileContent"

--> jasperserver.ws.FileContent"/>

 

but other definition uses:

 

<beanMapping qname="jaspersoft:FileAttributes"

--> jasperserver.ws.FileAttributes"/>

 

So, perhaps hand modifying the server-config.wsdd might help.

 

Regardless, I will make these consistent for the next release (end of May).

 

 

By: Jason Roberts - jroberts42

RE: JasperServer WS via ColdFusion + 2 other Bugs

2006-05-19 07:47

I capitalized all the qnames, restarted JasperServer and still got the same errors. I then messed around with the beanMappings a little and still didn't get anywhere, except I noticed that certain things caused the error to change a little. For the heck of it I tried removing the beanMappings all together and now I don't get any errors creating the webservice object.

 

I tested the login method with tomcat/tomcat and it returned "success". I then tried tomcat/tomct and got an error insead of the method returning "failed" or whatever error responce it sends back.

 

Could not perform web service invocation "login".

Here is the fault returned when invoking the web service operation:

 

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: com.jaspersoft.jasperserver.ws.WebServiceException: error on login()

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}hostname:xxxxxx

 

 

Perhaps I'll put the beanMappings back and experiment more. Any other suggestions?

 

Jason

 

 

By: Jason Roberts - jroberts42

RE: JasperServer WS via ColdFusion + 2 other Bugs

2006-05-19 10:19

Update... I played around with the beanMappings some more based on some sample service/beanMapping configurations I found through google. Changing the xmlns values seemed get me closer... I tried the following:

 

xmlns:jaspersoft="SoapyAPI" --> xmlns:jaspersoft="urn:JasperServerService"

 

xmlns:jaspersoft="SoapAPI" --> xmlns:jaspersoft="urn:JasperServerService"

 

xmlns:jaspersoft="SoapAPI" --> xmlns:jaspersoft="ws.jasperserver.jaspersoft.com"

 

So it seems that just "SoapAPI" was causing issues. So now I can connect to the web service without the 3 not found errors having the beanMappings there, but testing the login method again still responded the same as above:

 

tomcat/tomcat returned "success"

tomcat/tomct caused same error

 

I'm not a java guy, so I'm just shooting in the air... I'd really like to see the ws part work so I can test some reports for a project I'm working on.

 

Jason

 

Jason

Link to comment
Share on other sites

  • 9 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Were you able to successfully run a report by invoking JasperServer webservice from ColdFusion.

 

I'm trying to do this from Coldfusion, and am getting an operation result with a return code of 0, but there's no report coming back.

 

Would greatly appreciate your help.

 

Thanks,

Ashish

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