I've always contended that sending anything over a webservice other
than simple values is going to get you in trouble. Even in CF - CF
communications I think sending anything other than text is asking for
trouble. I recomend using one of the many functions on cflib.org to
convert the complex objects to xml.
http://www.cflib.org/udf.cfm?ID=648
Antother option would be to generate a WDDX packet and return that but
you'll need something like
http://www.topxml.com/code/default.asp?p=3&id=v20020829124758&ms=20&l=dotnet&sw=categ
to deal with WDDX in .Net I think.
Adam H
On Wed, 18 Aug 2004 10:20:00 +0100, Craig Dudley <[EMAIL PROTECTED]> wrote:
> ..NET just doesn't understand the return type, it probably could if you
> wrote some sort of QueryBean handler but I'd try returning a more simple
> data type, maybe you could encode the query into an xml packet and
> return that? Or try and array?
>
> -----Original Message-----
> From: Steven Brownlee [mailto:[EMAIL PROTECTED]
> Sent: 18 August 2004 10:07
> To: CF-Talk
> Subject: Consuming CFC web methods in VB.NET
>
> This is my last stab at this problem. No other message boards have been
> able to help me.
>
> First, the code...
>
> getPlaylist.cfc
> --------------------------------------------
> <cffunction access="remote" name="getNewPlaylist" output="no"
> returntype="query">
> <cfargument name="clientID" type="string" required="yes">
>
> <cfquery ....... name="IMPlaylist">
> .... removed for space saving...
> </cfquery>
>
> <cfif IMPlaylist.recordCount gt 0>
> <cfoutput query="IMPlaylist">
> <cfquery datasource="clp_dyn_signs" dbtype="odbc" username="..."
> password="...">
> .. Removed for space saving
> </cfquery>
> </cfoutput>
> <cfreturn IMPlaylist>
> </cfif>
>
> </cffunction>
> --------------------------------------------
>
> frmMain.vb
> --------------------------------------------
> Dim MyService As getPlaylist.getPlaylistService = New
> getPlaylist.getPlaylistService
> Dim MyResult As getPlaylist.QueryBean
>
> Try
> MyResult = MyService.getNewPlaylist(xmlParser.ClientID)
> Catch ex As Exception
> Me.txtHistory.Text += "Error calling playListExists function (" &
> ex.Message & ")" + vbCrLf
> Log.AppendLog("Error calling playListExists function (" & ex.Message
> & ")")
> End Try
> --------------------------------------------
>
> Now the getPlaylist.cfc works fine from the Flash Remoting application
> that was built for this client, but when trying to get the query into
> VB.NET, the following error is returned
> --------------------------------------------
> org.apache.axis.AxisFault : ; nested exception is:
> coldfusion.xml.rpc.CFCInvocationException:
> [coldfusion.runtime.UDFMethod$InvalidReturnTypeException : The value
> returned from function getNewPlaylist() is not of type query.][]; nested
> exception is:
> coldfusion.xml.rpc.CFCInvocationException: [org.apache.axis.AxisFault :
> ; nested exception is:
> coldfusion.xml.rpc.CFCInvocationException:
> [coldfusion.runtime.UDFMethod$InvalidReturnTypeException : The value
> returned from function getNewPlaylist() is not of type query.][])
> --------------------------------------------
>
> It does return a query (or QueryBean as XML sees it) and everything is
> types correctly in the .NET code. I also put in a test function that
> just returned some dummy text to see if I was able to properly invoke
> functions of a CFC web method and it worked fine. Just seems to be
> choking on sending back a query.
>
> I know this is a convoluted question, so if anyone has had experience
> using CFC methods in .NET, I'd appreciate any help.
>
> Steven Brownlee
> [EMAIL PROTECTED]
> _____
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Consuming CFC web methods in VB.NET Steven Brownlee
- Re: Consuming CFC web methods in VB.NET Jim Rathmann
- RE: Consuming CFC web methods in VB.NET Craig Dudley
- Re: Consuming CFC web methods in VB.NET Adam Haskell
- Re: Consuming CFC web methods in VB.NET Dick Applebaum
- Re: Consuming CFC web methods in VB.NE... Alexander Sherwood
- Re: Consuming CFC web methods in ... Dick Applebaum
- Re: Consuming CFC web methods in VB.NET Steven Brownlee
- RE: Consuming CFC web methods in VB.NET Dave Watts