jashcraft Posted September 15, 2006 Share Posted September 15, 2006 After I finally found where the WSDL file is generated ( http://localhost:8080/jasperserver/view-services/JasperServerService?wsdl btw.. ) I'm using PHP5's SOAP extenstion to try to access some reports we've created via the web service. When I try to use the login function with the default "jasperadmin" account, all I get back is a SOAP Fault with an internal server error from tomcat. In the catalina.out logs, I get a stacktrace that shows: Code:11:51:11,075 ERROR [AxisServlet],http-8080-Processor24:260 - Servlet.service() for servlet AxisServlet threw exceptionorg.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:329) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:244) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:104) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:136) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:181) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:195) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) is there a seperate set of credentials for accessing the WS? if so where is that stored/config'd? thanksPost edited by: jashcraft, at: 2006/09/14 18:53 Link to comment Share on other sites More sharing options...
sarahmei Posted September 15, 2006 Share Posted September 15, 2006 The web service uses the same users & pwds. iReport uses the webservices interface and lets you log in to the server with any user/pwd you've already set up. Maybe try looking at the iReport code for a working example. The error you're getting looks like you might just be missing something in the authentication filter chain. Link to comment Share on other sites More sharing options...
jashcraft Posted September 15, 2006 Author Share Posted September 15, 2006 sarahmei wrote:Maybe try looking at the iReport code for a working example. The error you're getting looks like you might just be missing something in the authentication filter chain. checked the iReport source and didn't see anything out of the ordinary in my code... the soaprequest envelope looks like:Code:<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:«»SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.jasperserver.jaspersoft.com" xmlns:«»xsd="http://www.w3.org/2001/XMLSchema" xmlns:«»xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:«»SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:login><username xsi:type="xsd:«»string">jasperadmin</username><password xsi:type="xsd:«»string">admin</password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope> any ideas as to what I should be looking for in the filter chain? Link to comment Share on other sites More sharing options...
jashcraft Posted September 16, 2006 Author Share Posted September 16, 2006 bump....hate to do this, but I don't want this to get buried.... Link to comment Share on other sites More sharing options...
rogerarmoa Posted October 26, 2006 Share Posted October 26, 2006 here is a code that works well for me try { $client = new SoapClient($mi_servidor_soap,array('login'=>$usuario,'password'=>$password)); // $client = new SoapClient($mi_servidor_soap); $mi_array = $client->__getFunctions() ; for ($i=0;$i < count($mi_array) ;$i++) { print "<br>$mi_array[$i]" ; } ; } catch (SoapFault $fault) { trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_ERROR);} for php5 + jasperintelligence 1.0.1 Link to comment Share on other sites More sharing options...
rogerarmoa Posted October 26, 2006 Share Posted October 26, 2006 and the wsdl string that works for me is $mi_servidor_soap = 'http://localhost:8081/jasperserver/view-services/JasperServerService?wsdl' ; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now