Copy link to clipboard
Copied
Hi All,
I am using SQL Server Reporting service in my application. I tried to access the report server by using web service.
When I opened the URL in browser, it asks for user name and password. After entering the correct user name and password I can able to view the wsdl.
But when I tried to create a object of the wsdl using the user name and password. It throws an error message:
Message: "Unable to read WSDL from URL: http://192.168.9.78/reportserver/ReportExecution2005.asmx?wsdl."
Error Details: "401 Unauthorized"
Stack Strace:
________________________________________________________________________________________________________________________________________________________________
coldfusion.xml.rpc.XmlRpcServiceImpl$CantFindWSDLException: Unable to read WSDL from URL: http://192.168.9.78/reportserver/ReportExecution2005.asmx?wsdl. at coldfusion.xml.rpc.XmlRpcServiceImpl.retrieveWSDL(XmlRpcServiceImpl.java:709) at coldfusion.xml.rpc.XmlRpcServiceImpl.access$000(XmlRpcServiceImpl.java:53) at coldfusion.xml.rpc.XmlRpcServiceImpl$1.run(XmlRpcServiceImpl.java:239) at java.security.AccessController.doPrivileged(Native Method) at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:232) at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebService(XmlRpcServiceImpl.java:496) at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:450) at coldfusion.xml.rpc.WebServiceProxyFactory.getProxy(WebServiceProxyFactory.java:22) at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65) at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:5002) at coldfusion.tagext.lang.ObjectTag.doStartTag(ObjectTag.java:427) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfinc_Test2ecfm337234539.runPage(C:\inetpub\wwwroot\YMLSDP\RETSManager\Includes\inc_Test.cfm:2) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfservlet2ecfm1704189116.runPage(C:\inetpub\wwwroot\YMLSDP\Shared\Includes\servlet.cfm:33) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfApplicationSettings2ecfm1708384449$funcONREQUEST.runFunction(C:\inetpub\wwwroot\YMLSDP\CONFIG\ApplicationSettings.cfm:91) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:280) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I am using ColdFusion 9.0.1.
Thanks
Upen
Copy link to clipboard
Copied
Did you try using the username and password attributes of <cfinvoke>? Can you post some sample code of how you are instantiating and calling the web service?
Copy link to clipboard
Copied
This is my code:
<cftry>
<cfobject name="request.ssrs2" webservice="http://localhost/reportserver/ReportExecution2005.asmx?wsdl" type="webservice" username="<domain-name>\<user name>" password="**********">
<cfdump var="#request.ssrs2#">
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
<hr/><hr/>
<cftry>
<cfinvoke webservice="http://localhost/reportserver/ReportExecution2005.asmx?wsdl" username="<domain-name>\<user name>" password="**********" method="render">
</cfinvoke>
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
For both the cases, I'm getting the same error.
Copy link to clipboard
Copied
Are you sure that the format of the username variable you are using is correct? I don't see anthing obviously wrong about your code, so that is the only place that I can think of that might be incorrect. <cfinvoke> is notoriously difficult to troubleshoot when dealing with issues related to some of the more complicated web service elements. We've actually switched over to using raw SOAP XML messages, which has saved TONS of time when it comes to troubleshooting issues. CrossCheck Networks makes a product called SOAPSonar (their Personal edition is free) that inteprets a remote WSDL, autogenerates the SOAP XML and lets you send and capture debug messages. Ben Nadel has a great article on how to use SOAP XML messages in CF: http://www.bennadel.com/blog/1809-Making-SOAP-Web-Service-Requests-With-ColdFusion-And-CFHTTP.htm
Also, I saw this on another forum that might help:
Copy link to clipboard
Copied
Does the server hosting the service use basic authentication? CF cannot use Windows authentication.