My advice would be to avoid the RemotingService (though I honestly haven't
used it). If you've done a good job of wrapping your business logic up into
components and services and configured them via ColdSpring then it's fairly
trivial to expose those remotely using ColdSpring.
So, for all of my applications I tend to have a service layer which provides
functions that run atomic actions within my application. For example,
addUser(), deleteUser(), listWidgets(), etc. These might be spread across
several services, depending on the application, but these would be
configured in ColdSpring. I simply use the remoting features of ColdSpring
to expose some of those functions remotely. Here's some example
configuration from a real application (not the widget :
<!--// Remote Service Configuration //-->
<bean id="ColdBooksAbstractRemoteProxy" class="" abstract="true">
<property name="beanFactoryScope">
<value>application</value>
</property>
<property name="beanFactoryName">
<value>cs</value>
</property>
<property name="relativePath">
<value>/CFIDE/administrator/ColdBooks/remote</value>
</property>
</bean>
<bean id="ColdBooksRemoteQBWC"
class="coldspring.aop.framework.RemoteFactoryBean"
parent="ColdBooksAbstractRemoteProxy" lazy-init="false">
<property name="target">
<ref bean="ColdBooksQBWC" />
</property>
<property name="serviceName">
<value>qbwc</value>
</property>
<property name="remoteMethodNames">
<value>serverVersion,clientVersion,authenticate,closeConnection,sendRequestXML,receiveResponseXML,getLastError</value>
</property>
</bean>
<bean id="ColdBooksQBWC" class="model.service.qbwc">
<property name="version">
<value>0.1-Alpha</value>
</property>
</bean>
In the example above the ColdBooksQBWC is my service.
Thanks and good luck,
Doug Hughes, President
Alagad Inc.
[email protected]
888 Alagad4 (x300)
Direct: 651 Alagad4 (651-252-4234)
Fax: 888-248-7836
On Thu, Jan 14, 2010 at 10:58 AM, Bud <[email protected]> wrote:
> Can someone give me some straight forward steps for creating web
> service to run against my Model-Glue app? The documentation I've found
> on using RemotingService.cfc (http://docs.model-glue.com/wiki/HowTos/
> HowToUseRemoting) hasn't worked for me.
>
> Error: "form is not defined" is being generated from the
> AbstractRemotingService.cfc. If I check for isDefined('form') then I
> get this error:
>
> "You have attempted to dereference a scalar variable of type class
> java.lang.String as a structure with members."
>
> That's being generated from the getModelGlue().executeEvent
> (argumentCollection=arguments) call in the same file.
>
> Ya know, I've spent 10 years with CF, all the time thinking I'm
> getting smarter, then I try to get into this MVC type development and
> I just feel like I'm back to being stupid again. :)
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en