Unable to read WSDL from URL

1,149 views
Skip to first unread message

Scott Thornton

unread,
Jul 9, 2014, 8:37:12 PM7/9/14
to cfau...@googlegroups.com

Hi,

 

I am working with webservices for the first time, and my knowledge is very rudimentary.

 

Scenario:

 

I need to implement NT Authentication on my intranet app. My CF6.1 server can’t process the  cfntauthenticate tag.

 

I also have a CF9 9,0,1,274733 server that I can use to process a webservice to provide authentication.

 

So, working locally at present on CF9…

 

My NTLoginService.cfc looks like :

 

<cfcomponent displayname="NT Login Service" hint="Provides NT Domain Authentication" output="false">

 

                <cffunction

                                access="remote"

                                name="loginUserNT"

                                output="no"

                                returntype="struct"

                                displayname="Authenticates A User Against A Windows Domain"

                                hint="Authenticates a user against a Microsoft Windows Domain" >

               

                                <cfargument name="NTusername" type="string" required="yes" displayname="username">

                                <cfargument name="NTpassword" type="string" required="yes" displayname="password">                            

                                <cfargument name="NTdomain"   type="string" required="yes" displayname="domain">                 

                               

                                <cfntauthenticate username="#Arguments.NTusername#"

                                                password="#arguments.NTpassword#"

                                                domain="#arguments.NTdomain#"

                                                result="authUser"

                                                listgroups="false"

                                                throwonerror="false">      

                                                               

                                <cfreturn authUser>

                               

                </cffunction>

</cfcomponent>

 

I hope to return the result of the cfntauthenticate call.

 

I can browse the cfc via URL  http://localhost/login/NTLoginService.cfc and see the methods\parameters okay.

 

But if I browse to http://localhost/login/NTLoginService.cfc?wsdl

 

I receive the error:

 

AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - Error attempting to create Java skeleton for CFC web service.; nested exception is:

                    coldfusion.xml.rpc.CFCInvocationException: [java.lang.NullPointerException : null]

AxisFault

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

faultSubcode:

 faultString: Error attempting to create Java skeleton for CFC web service.; nested exception is:

                    coldfusion.xml.rpc.CFCInvocationException: [java.lang.NullPointerException : null]

faultActor:

 faultNode:

 faultDetail:

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

 

If I try to invoke the webservice with :

 

                <cfinvoke

                                webservice="http://localhost/login/NTLoginService.cfc?wsdl"

                                method="loginUserNT"

                                returnvariable="authentication"

                                refreshWSDL="yes">

                               

                                <cfinvokeargument name="NTusername"      value="#form.username#"/>

                                <cfinvokeargument name="NTpassword"       value="#form.password#"/>

                                <cfinvokeargument name="NTdomain"                          value="#form.domain#"/>

                                               

                </cfinvoke>

 

I receive the error:

 

Unable to read WSDL from URL: http://localhost/login/NTLoginService.cfc?wsdl.

 

Error: 500 Internal Server Error.

 

http://localhost/login/ is a IIS virtual directory that points to c:\websites\login\

 

I have restarted the local CF server multiple times.

 

I wouldn’t be surprised if I have missed something simple.

 

Would any one have any ideas on what to do next? Googling hasn’t been very informative.

 

Thanks for any assistance.

 

Paul Kukiel

unread,
Jul 9, 2014, 9:01:48 PM7/9/14
to cfau...@googlegroups.com
I have seen this exact thing happen before.  I never solved it.  Restarting cf fxed it but it always came back.  I moved away from wsdl and re-wrote in REST.  Sorry not that much help.


--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+u...@googlegroups.com.
To post to this group, send email to cfau...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.



--
Paul Kukiel

Charlie Arehart

unread,
Jul 9, 2014, 10:14:43 PM7/9/14
to cfau...@googlegroups.com

You may want to look at the coldfusion-out.log (in \coldfusion9\runtime\logs or jrun4\logs) to see if there’s any more detail in there about the problem.

/charlie

--

Andrew Scott

unread,
Jul 9, 2014, 11:40:52 PM7/9/14
to cfau...@googlegroups.com
Also on top of what Charlie has said, you might want to turn on robust exceptions for local development. I think you will need to turn off or on the HTTP status codes as well.

What that does is send the error back to IIS so the browser can display it, this may help see the error on the screen rather than searching through the logs for it.

But as Paul stated, you would be far better using Restful services rather than web services.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/

Scott Thornton

unread,
Jul 10, 2014, 12:31:16 AM7/10/14
to cfau...@googlegroups.com

Hi

 

@Charlie,

 

From coldfusion-out.log:

 

07/10 14:15:29 Information [jrpp-0] - Starting Web service request.

07/10 14:15:29 Information [jrpp-0] - Creating Web service proxy {url='http://localhost/login/NTLoginService.cfc?wsdl'}

07/10 14:15:31 Error [jrpp-0] - coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:  Found 5 semantic errors compiling ""C:/ColdFusion9/stubs/WS854518475/login/NTLoginServiceLocator.java"":      10. public class NTLoginServiceLocator extends org.apache.axis.client.Service implements login.NTLoginService {                      ^------------------------------------------------------------------------------------------^ *** Semantic Error: The checked exception ""RemoteException"" is not assignable to any exception in the throws clause of the accessible method ""javax.xml.rpc.Call createCall() throws javax.xml.rpc.ServiceException;"" declared in type ""javax.xml.rpc.Service"".       10. public class NTLoginServiceLocator extends org.apache.axis.client.Service implements login.NTLoginService {                      ^------------------------------------------------------------------------------------------^ *** Semantic Error: The method ""org.apache.axis.client.Call createCall() throws java.rmi.RemoteException;"" with protected ac... The specific sequence of files included or processed is: C:\websites\login\login_act.cfm, line: 17

 

Which refers to:

 

<cfif isdefined("form.btnLogin")>

 

 

                User Submitted Username <cfoutput>#form.username#, password #form.password#</cfoutput>

               

                <cfinvoke

                                webservice="http://localhost/login/NTLoginService.cfc?wsdl"

                                method="loginUserNT"

                                returnvariable="authUser"

                                refreshWSDL="yes">

                               

                                <cfinvokeargument name="NTusername"          value="#form.username#"/>

                                <cfinvokeargument name="NTpassword"           value="#form.password#"/>

                                <cfinvokeargument name="NTdomainz"                            value="#form.domain#"/>

                                               

                </cfinvoke>

 

Where line 17 is <cfinvokeargument name="NTdomainz"                           value="#form.domain#"/>

 

Please note that I changed the name of the 3rd param to NTdomainz since I first posted, as I was thinking that NTDomain may have been a reserved word.

 

@Andrew

 

Enable Robust Exception Information is selected in CF Admin, and within IE Show friendly HTTP error messages is unticked. ( I assume this is what you are referring too).

 

Thanks,

Andrew Scott

unread,
Jul 10, 2014, 12:45:05 AM7/10/14
to cfau...@googlegroups.com
Yes, but you also need to look at this setting in ColdFusion. If this is not ticked it will only send a 404 or 500 status code, during development this really should be a setting that you switch on.


Enables ColdFusion to set HTTP error status codes when ColdFusion errors are returned to the browser. ColdFusion sets an error status code of 404 if the template is not found and an error status code of 500 for server errors. 

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



Andrew Scott

unread,
Jul 10, 2014, 12:46:58 AM7/10/14
to cfau...@googlegroups.com
One thing that you haven't mentioned, is this a 32bit or 64bit installation of ColdFusion. From memory the ntAuthentication tags are using com objects to talk to Windows Authentication servers, if your running on a 64bit OS you may find that this is going to be a major issue with what your trying to do. Not saying that is the problem, but it maybe a head in the right direction.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



Andrew Scott

unread,
Jul 10, 2014, 12:57:46 AM7/10/14
to cfau...@googlegroups.com
Actually come to think of it.. Have you also tried this, during development if the component is being changed, you also need to clear the stubs. I don't recall it being that exact error, but a quick Google has made the exact same suggestions.

Reference:




Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



Scott Thornton

unread,
Jul 10, 2014, 12:59:00 AM7/10/14
to cfau...@googlegroups.com

Hi,

 

Sorry, yes this option is already selected.

 

The server is running on 32-bit.

Scott Thornton

unread,
Jul 10, 2014, 1:03:52 AM7/10/14
to cfau...@googlegroups.com

Hi,

 

After deleting the stubs in C:\ColdFusion9\stubs\WS854518475\login

 

I was able to get the wsdl to generate ( see below )

 

The CFinvoke statement returns an error however:

 

                <cfinvoke

                                webservice="http://localhost/login/NTLoginService.cfc?wsdl"

                                method="loginUserNT"

                                returnvariable="authUser"

                                refreshWSDL="yes">

                               

                                <cfinvokeargument name="NTusername"          value="test"/>

                                <cfinvokeargument name="NTpassword"           value="testpassword"/>

                                <cfinvokeargument name="NTdomainz"                              value="testdomain"/>

                                               

                </cfinvoke>

 

 

coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler: Found 5 semantic errors compiling "C:/ColdFusion9/stubs/WS854518475/login/NTLoginServiceLocator.java": 10. public class NTLoginServiceLocator extends org.apache.axis.client.Service implements login.NTLoginService { ^------------------------------------------------------------------------------------------^ *** Semantic Error: The checked exception "RemoteException" is not assignable to any exception in the throws clause of the accessible method "javax.xml.rpc.Call createCall() throws javax.xml.rpc.ServiceException;" declared in type "javax.xml.rpc.Service". 10. public class NTLoginServiceLocator extends org.apache.axis.client.Service implements login.NTLoginService { ^------------------------------------------------------------------------------------------^ *** Semantic Error: The method "org.apache.axis.client.Call createCall() throws java.rmi.RemoteException;" with protected access cannot replace the accessible method "javax.xml.rpc.Call createCall() th....

 

 

 

 

 

 

WSDL:

 

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="http://login" xmlns:impl="http://login" xmlns:apachesoap="http://xml.apache.org/xml-soap" targetNamespace="http://login">

<!--WSDL created by ColdFusion version 9,0,1,274733-->

<wsdl:types><schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://rpc.xml.coldfusion"/><import namespace="http://login"/><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="mapItem"><sequence><element name="key" type="xsd:anyType" nillable="true"/><element name="value" type="xsd:anyType" nillable="true"/></sequence></complexType><complexType name="Map"><sequence><element name="item" type="apachesoap:mapItem" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType></schema><schema targetNamespace="http://rpc.xml.coldfusion" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://xml.apache.org/xml-soap"/><import namespace="http://login"/><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="CFCInvocationException"><sequence/></complexType><complexType name="QueryBean"><sequence><element name="columnList" type="impl:ArrayOf_xsd_string" nillable="true"/><element name="data" type="impl:ArrayOfArrayOf_xsd_anyType" nillable="true"/></sequence></complexType></schema><schema targetNamespace="http://login" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://xml.apache.org/xml-soap"/><import namespace="http://rpc.xml.coldfusion"/><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="ArrayOf_xsd_string"><complexContent><restriction base="soapenc:Array"><attribute wsdl:arrayType="xsd:string[]" ref="soapenc:arrayType"/></restriction></complexContent></complexType><complexType name="ArrayOfArrayOf_xsd_anyType"><complexContent><restriction base="soapenc:Array"><attribute wsdl:arrayType="xsd:anyType[][]" ref="soapenc:arrayType"/></restriction></complexContent></complexType></schema></wsdl:types><wsdl:message name="loginUserNTRequest"><wsdl:part name="NTusername" type="xsd:string"/><wsdl:part name="NTpassword" type="xsd:string"/><wsdl:part name="NTdomainz" type="xsd:string"/></wsdl:message><wsdl:message name="CFCInvocationException"><wsdl:part name="fault" type="tns1:CFCInvocationException"/></wsdl:message><wsdl:message name="loginUserNTResponse"><wsdl:part name="loginUserNTReturn" type="apachesoap:Map"/></wsdl:message><wsdl:portType name="NTLoginService"><wsdl:operation name="loginUserNT" parameterOrder="NTusername NTpassword NTdomainz"><wsdl:input name="loginUserNTRequest" message="impl:loginUserNTRequest"/><wsdl:output name="loginUserNTResponse" message="impl:loginUserNTResponse"/><wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException"/></wsdl:operation></wsdl:portType><wsdl:binding name="NTLoginService.cfcSoapBinding" type="impl:NTLoginService"><wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/><wsdl:operation name="loginUserNT"><wsdlsoap:operation soapAction=""/><wsdl:input name="loginUserNTRequest"><wsdlsoap:body namespace="http://login" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></wsdl:input><wsdl:output name="loginUserNTResponse"><wsdlsoap:body namespace="http://login" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></wsdl:output><wsdl:fault name="CFCInvocationException"><wsdlsoap:fault namespace="http://login" name="CFCInvocationException" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:service name="NT Login Service"><wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Provides NT Domain Authentication </wsdl:documentation><wsdl:port name="NTLoginService.cfc" binding="impl:NTLoginService.cfcSoapBinding"><wsdlsoap:address location="http://localhost/login/NTLoginService.cfc"/></wsdl:port></wsdl:service></wsdl:definitions>

 

From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Andrew Scott


Sent: Thursday, 10 July 2014 2:57 PM
To: cfau...@googlegroups.com

Subject: Re: [cfaussie] Unable to read WSDL from URL

Andrew Scott

unread,
Jul 10, 2014, 1:15:51 AM7/10/14
to cfau...@googlegroups.com
What happens if you try to invoke the CFC via the URL and not as a webservice?

For example what does this do in the browser?

http://localhost/login/NTLoginService.cfc?method=loginUserNT&NTusername=test&NTpassword=testpassword&NTdomainz=testdomain

Could that be throwing an error that the invoke is masking?

But seriously, move away from webservices they actually suck in ColdFusion and is why people prefer RestFul.


Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



--

Scott Thornton

unread,
Jul 10, 2014, 1:29:08 AM7/10/14
to cfau...@googlegroups.com

Hi,

 

Your suggestion works, passing it in via URL.

 

If I use my domain credentials it returns:

 

usernamesuccess

 

I guess it might have something to do with the cffunction returning a struct ( the cfauthenticate result ). I may have to simplify that.

 

Do coldfusion RESTful webservices work in CF 9? ( and can be used from CF6 ? )

 

This example mentions support for it was added in cf10.

 

http://www.adobe.com/devnet/coldfusion/articles/restful-web-services.html

 

Thanks very much for your assistance Andrew.

 

 

PS: I am still stuck on CF6.1 since the server it is on still runs Windows Server 2000 which was about the last version of windows my Crystal reports .asp   SDK runs on. Which is a different issue all together.

 

 

 

From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Andrew Scott
Sent: Thursday, 10 July 2014 3:15 PM
To: cfau...@googlegroups.com
Subject: Re: [cfaussie] Unable to read WSDL from URL

 

What happens if you try to invoke the CFC via the URL and not as a webservice?

Andrew Scott

unread,
Jul 10, 2014, 1:35:32 AM7/10/14
to cfau...@googlegroups.com
Restful is not a web service but a normal RPC that uses get/post/delete etc. So any language than can have an entry point can do RPC or restful calls.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



--

Andrew Scott

unread,
Jul 10, 2014, 1:40:01 AM7/10/14
to cfau...@googlegroups.com
Just out of curiosity if you switch from cfinvoke to create object does it suffer the same thing?

like

test = createObject("webservice","http://localhost/login/NTLoginService").loginUserNT(NTusername=test, NTpassword=testpassword, NTdomainz=testdomain);

Does that work or has the same problem?


Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



Scott Thornton

unread,
Jul 10, 2014, 2:00:16 AM7/10/14
to cfau...@googlegroups.com

 

HI,

 

<cfscript>

test = createObject("webservice","http://localhost/login/NTLoginService").loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');

</cfscript>

 

Returns

Unable to read WSDL from URL: http://localhost/login/NTLoginService.

<cfscript>

test = createObject("webservice","http://localhost/login/NTLoginService?wsdl").loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');

</cfscript>

 

Returns:

 

 

Unable to read WSDL from URL: http://localhost/login/NTLoginService?wsdl.

 

Error: 404 Not Found.

 

 

When I try without the parameters being within text quotes, I get a different error again.

 

So I would say no, at this point in time.

Andrew Scott

unread,
Jul 10, 2014, 2:57:08 AM7/10/14
to cfau...@googlegroups.com
lol...

Sorry I dont use Webservices so I lead you down the wrong path.


CreateObject(type, urltowsdl[, portname, wsdl2JavaArgs])
Is the correct way.


Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/



Dmitry Yakhnov

unread,
Jul 10, 2014, 4:26:01 AM7/10/14
to cfau...@googlegroups.com
--

Charlie Arehart

unread,
Jul 11, 2014, 11:52:05 AM7/11/14
to cfau...@googlegroups.com

That sounds like the good call, Dmitry.

Scott, you had opened saying that you were using a virtual directory in IIS. Can you change it to not be one and see if it helps? (Even though the bug report he refers to is for CF10, I would not be surprised if the problem went back to your CF 6.1.)

Also, Scott, your last message showing use of createobject indicated that you had gotten a 404 on the wsdl URL. The problem was that you left off the .cfc in the URL. So:



test = createObject("webservice","http://localhost/login/NTLoginService?wsdl").loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');


should have been instead:

test = createObject("webservice","http://localhost/login/NTLoginService.cfc?wsdl").loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');


(When you’re calling a component, you don’t put the .cfc, so it’s easy to get tripped up on that.)

Finally, while you can chain methods on the createobject, note that you don’t need to do that. And there can be advantages to NOT doing it, especially if you would need to call more than one method. You may already know that. Just wanted to point it out in case you go with that alternative approach. So you could do it this way, for instance:

ntlogin= createObject("webservice","http://localhost/login/NTLoginService.cfc?wsdl").loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');
test = ntlogin.loginUserNT(NTusername='username', NTpassword='pwd', NTdomainz='domain');

test2 = ntlogin.callsomeothermethod;

Hope that helps.

/charlie

 

From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Dmitry Yakhnov


Sent: Thursday, July 10, 2014 4:26 AM
To: cfau...@googlegroups.com

Subject: Re: [cfaussie] Unable to read WSDL from URL

 

Hi Scott,

This seems to be a well known bug:

https://bugbase.adobe.com/index.cfm?event=bug&id=3531653
https://forums.adobe.com/message/5207697

Cheers,
Dmitry,

On 10/07/2014 10:37 AM, Scott Thornton wrote:

Hi,

 

I am working with webservices for the first time, and my knowledge is very rudimentary.

 

Scenario:

 

<sjip>

Scott Thornton

unread,
Jul 13, 2014, 10:42:28 PM7/13/14
to cfau...@googlegroups.com

HI All,

 

I removed the use of the virtual directory and my example now works. The reported bug using CFC’s and virtual directory exists as far back as version 9 (which I am working on locally, not tested cfinvoke on cf6.1 as yet).

 

I had seen the bug report prior to Dmitry posting, but wasn’t sure if it was an avenue I had to explore.

 

Thank you very much for all replies!

--

Gavin Baumanis

unread,
Aug 27, 2014, 2:01:54 AM8/27/14
to cfau...@googlegroups.com
Make sure you're using wsversion="1" in your remote CFC.
I am pretty sure it is v9 that upgraded the AXIS version.

You can set it to be version 1 by default in CFAdmin or on a case by case basis within the CFC using the wsversion attribute.

Gavin.

Paul Kukiel

unread,
Aug 27, 2014, 6:04:48 AM8/27/14
to cfau...@googlegroups.com
It was CF10 when they upgraded.
Reply all
Reply to author
Forward
0 new messages