LDAP webservice

LDAP webservice

Post by MintyDyn » Sun, 13 Feb 2005 03:29:20



Hello. I'm trying to invoke a webservice but am getting the error: Web service
operation 'qryWS' with parameters {} could not be found.  The <cfldap > works
in a stand alone page, but when it is in the .cfc it  gives the above error. Is
the return type correct? Or am I missing something else? Thanks in advance.  
Wtest.cfc: <cfcomponent> <cffunction name='qryWS' access='remote'
returntype='query' >    <cfset rs1 = '' />   <cfldap  .....(redacted stuff >
<cfreturn rs1 /> </cffunction> </cfcomponent>  Consuming page:  <cfinvoke  
webservice='http://localhost/Wtest.cfc?wsdl'  method='qryWS'  
returnvariable='rs1'> </cfinvoke>      <cfdump var='#rs1#' />
 
 
 

LDAP webservice

Post by MintyDyn » Wed, 16 Feb 2005 00:47:51


Tom,  Hello. The following is contained in the wsdl.  If I put a query or a
simple return string as the function (keeping the tag attributes the same), and
regenerate the webservice in Dreamweaver, everything works.     <wsdl:operation
name='qryWS'>   <wsdlsoap:operation soapAction='' />  - <wsdl:input
name='qryWSRequest'>   <wsdlsoap:body
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
namespace='http://wsAD.cfmx' use='encoded' />    </wsdl:input> - <wsdl:output
name='qryWSResponse'>   <wsdlsoap:body
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
namespace='http://wsAD.cfmx' use='encoded' />    </wsdl:output> - <wsdl:fault
name='CFCInvocationException'>   <wsdlsoap:fault
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
name='CFCInvocationException' namespace='http://wsAD.cfmx' use='encoded' />    
</wsdl:fault>   </wsdl:operation>

 
 
 

LDAP webservice

Post by Tom Jordah » Wed, 16 Feb 2005 00:20:27


Verify that the WSDL generated from the CFC actually has your operation in
it with that name.

The error you are getting is that the cfinvoke is not finding the function,
not that the CFC is having a problem.

--
Tom Jordahl
Macromedia

 
 
 

LDAP webservice

Post by Tom Jordah » Wed, 16 Feb 2005 21:43:35


Make sure you put XML in the "attach code" section of the posting, otherwise
it comes out with smiley faces and badly formatted.

Anyway, without the full WSDL it is hard to tell, but it sure looks like
there is a least one argument to that function...
--
Tom Jordahl
Macromedia

 
 
 

LDAP webservice

Post by MintyDyn » Wed, 16 Feb 2005 22:35:25


Tom,  Hello. In one of the other threads, 'Using Web Services for Stored
Procedures?', there is the suggestion to make sure that the webservice is not  
registered in the Coldfusion Administration pages.  Once I removed the web
service, I got a different error (hooray, of sorts).  It says that return type
is not query. So, I'm not sure what to use. When I use CFLDAP by itself, I
treat the results like a query and everything works. But here it does not.
String also does not work.  So, what should I set the return type to in the
cffunction tag?
 
 
 

LDAP webservice

Post by Tom Jordah » Thu, 17 Feb 2005 23:17:46


Minty,
Good question.  It should be a query type, in fact the code says it is...

Can you post the exact stack trace the comes with the "not a query" error?
--
Tom Jordahl
Macromedia

 
 
 

LDAP webservice

Post by MintyDyn » Thu, 17 Feb 2005 23:44:57


Tom,   Sure, error message with trace is below:   Could not perform web service
invocation 'qryWS'.   Here is the fault returned when invoking the web service
operation:  AxisFault  faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException  faultSubcode:  
 faultString: coldfusion.xml.rpc.CFCInvocationException:  
        [coldfusion.runtime.UDFMethod$InvalidReturnTypeException : The value returned
from function qryWS() is not of type query.]  faultActor:   faultNode:  
faultDetail:  
        {http://xml.apache.org/axis/}stackTrace:coldfusion.xml.rpc.CFCInvocationExcepti
on: [coldfusion.runtime.UDFMethod$InvalidReturnTypeException : The value
returned from function qryWS() is not of type query.]   at
coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponen
tSkeleton.java:608)     at
coldfusion.xml.rpc.CFComponentSkeleton.__invoke(CFComponentSkeleton.java:554)
        at cfmx.wsAD.Wtest.qryWS(D:\Projects\PortalApplication\cfmx\wsAD\Wtest.cfc)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at
java.lang.reflect.Met...  
 
 
 

LDAP webservice

Post by Tom Jordah » Fri, 18 Feb 2005 00:10:43


Not the trace I was looking for...

Can you use QueryNew and copy the LDAP query info it to that a return it?
That is lame but it appears that the UDF mechansim doesn't think the query
from cfldap is really a query.

How about if you write this UDF without the web service stuff and try to
invoke it as just a function - does that work?
--
Tom Jordahl

 
 
 

LDAP webservice

Post by MintyDyn » Fri, 18 Feb 2005 02:54:32


Yes, I promise to actually _read_ everything before responding from now on,
sorry about that. Stack trace follows.  I haven't tried it as a UDF, but I'll
try that and  the queryNew() approach today and tomorrow between meetings.    
coldfusion.xml.rpc.ServiceProxy$ServiceInvocationException: Could not perform
web service invocation 'qryWS'.         at
coldfusion.xml.rpc.ServiceProxy.invokeImpl(ServiceProxy.java:230)       at
coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:143)   at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1587)       at
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:388)   at
cfadConsume2ecfm1871531004.runPage(D:\Projects\PortalApplication\cfmx\wsAD\adCon
sume.cfm:13)    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)      at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)       at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)       at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)  at
coldfusion.filter.PathFilter.invoke(PathFilter.java:86)         at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)   at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)       at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)         at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilt
er.java:28)     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)        at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)     at
coldfusion.CfmServlet.service(CfmServlet.java:105)      at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)         at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)      at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)      at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)       at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)       at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
        at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
 
 
 

LDAP webservice

Post by Tom Jordah » Fri, 18 Feb 2005 21:38:45


Minty,

No, no.  Not your fault I was just hoping to get a smoking gun with the
stack trace.  I didn't mean that you didn't provide me with the right thing.
Sorry about that, I was reading *all* of the forums last night and I was
getting a little punchy. :-)

Anyway, I think I verified that the web service code should treat the LDAP
result set as a query, so something else fishy is going on here.  I will be
traveling for the next few days, so I may not be able to respond quickly but
I will try to get back to this Monday at the office.  Any info you can post
(or even a reproducable case) would be great.

--
Tom Jordahl
Macromedia

 
 
 

LDAP webservice

Post by MintyDyn » Thu, 10 Mar 2005 00:16:07


Tom,  Hello. I thought I had replied last week, but I don't see it in the
forum. Anyway, the solution was setting the return value to the return value of
the CFLDAP tag.  It was a stupid coding error on my part. Thanks for your help.
 
 
 

1. combining results two LDAP queries or/and LDAP SQL

Hi,

 Is it possible to combine two ldap query results? Just something like the join
function in SQL?

 And another question I have if it is possible to combine an LDAP an SQL query>
(just like you can use JOIN to query in two tables, but then use something to
do the same with ldap and sql)

 Is there anybody who knows if this is possible?

 Regards

2. Problems when makin an .exe

3. LDAP Fail before it even talk to ldap server

4. How to transfer variables value from flash4 to html page?

5. LDAP (Connection to LDAP Server failed)

6. Help an OLD FART understand a Recordset...

7. Can a Webservice Call Another Webservice?

8. shockwaves own adress

9. cfselect with display having 2 attributes from a LDAP query

10. LDAP

11. cfselect with display having 2 attributes from a LDAP query

12. LDAP and UltraDev?

13. LDAP - how to do