Ok. So I'm trying to return an array of CFCs.  It works if I call it
locally but not if I call it as a web service (from CFMX). The method
is:

<cffunction name="getUsers3" access="remote" returntype="array"
output="false" hint="returns query of users">
                <cfargument name="dsn" type="string" required="true" />
                <cfargument name="orgID" type="numeric" required="true" />
                <cfargument name="username" type="string" required="false" default="" 
/>
                <cfargument name="email" type="string" required="false" default="" />
                <cfscript>
                        var userGateway =
createObject("component","ttools.model.user.userGateway").init(trim(arguments.dsn));
                        return 
this.toArrayOfObjects(userGateway.getUsers(username=arguments.username,email=arguments.email,orgid=arguments.orgid));
                </cfscript>
        </cffunction>

and the toArrayOfObjects is 

<cffunction name="toArrayOfObjects" access="public"
displayName="toArray" hint="Use to convert a query to an array of
objects" returnType="Array">
                <cfargument name="inputQuery" type="query" required="yes"
hint="Query to convert" />
                <cfscript>
                        var aReturnData = arrayNew(1);
                        var tmpObject = "";
                        var columnList = lcase(inputQuery.columnList);
                        var columnName = "";
                        var i = 0;
                        var j = 0;                                                     
         
                        //loop over the query 
                        for(i=1; i LTE inputQuery.recordCount; i=i+1 ){
                                tmpObject = createObject("component", 
"ttools.model.user.userData");
                                // loop over the columns
                                for(j=1; j LTE listLen(columnList); j=j+1 ){
                                        columnName = listGetAt(columnList,  j); 
                                        tmpObject[columnName] = 
inputQuery[columnName][i];
                                }                               
                                arrayAppend(aReturnData, tmpObject);
                        }               
                        return aReturnData;
                </cfscript>
        </cffunction>

The error I get is 

 Could not perform web service invocation "getUsers3" because
AxisFault faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: faultString: org.xml.sax.SAXException: No deserializer
for {http://user.model.ttools}userData faultActor: faultNode:
faultDetail: {http://xml.apache.org/axis/}stackTrace:
org.xml.sax.SAXException: No deserializer for
{http://user.model.ttools}userData at
org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:485)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:428)
at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:404)
at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
at org.a...

Any ideas?

-Phil


On Thu, 7 Oct 2004 16:33:36 -0400, Roland Collins <[EMAIL PROTECTED]> wrote:
> I doubt you'll get away with it - structs are known to be problems in WS
> returns.  If you don't want to change the original service, you can just
> create a Fa�ade for it.  Just wrap the CFC in another CFC that returns the
> data sans structs!
> 
> http://www.corfield.org/blog/index.cfm?do=blog.entry&entry=3C43DE71-CDC6-6D0
> 4-BECCE2618B397E8B
> 
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to