the error message you are getting might help :) Dimitrios Gianninas RIA Developer Team Lead Optimal Payments Inc.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Patrick McDaniel Sent: Wednesday, September 24, 2008 6:47 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] BlazeDS Integration Hello All - I recently have started trying to get BlazeDS implemented in a couple of my Flex applications. I'm running into trouble getting an error that my destination doesn't exist. I have looked all around the internet and can't seem to come up with a solution to my problem. I'm hoping someone on the list will see a stupid mistake or head me off in the right direction. Currently I'm trying to use Spring, BlazeDS, and Flex to make all this work. I'm running it all in Tomcat 6. Also I'm using the spring file found on adobe exchange. I have also included my .mxml file, but it is just a simple test to see if I can actually get it to work. It is exactly the same as the remoting example provided by the turnkey download. There are no errors in any logs so I assume that the spring container and webapp itself is loading alright. I just get the error when I click the button to get the data. Here are my configuation files: WEB.XML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Build Reporting Dashboard</display-name> <!-- log4j setup --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.xml</param-value> </context-param> <!--applicationContext.xml setup --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <context-param> <param-name>flex.class.path</param-name> <param-value>/WEB-INF/flex/hotfixes</param-value> </context-param> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class> org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <listener> <listener-class> org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- MessageBroker Servlet(BlazeDS) --> <servlet> <servlet-name>MessageBrokerServlet</servlet-name> <display-name>MessageBrokerServlet</display-name> <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class> <init-param> <param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <init-param> <param-name>flex.write.path</param-name> <param-value>/WEB-INF/flex</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Servlet setup (Spring HTTP) --> <servlet> <servlet-name>ccdb</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ccdb</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>MessageBrokerServlet</servlet-name> <url-pattern>/messagebroker/*</url-pattern> </servlet-mapping> <welcome-file-list id="WelcomeFileList"> <welcome-file>index.html</welcome-file> <welcome-file>Application.html</welcome-file> <welcome-file>Dashboard.html</welcome-file> </welcome-file-list> </web-app> REMOTING-CONFIG.XML <?xml version="1.0" encoding="UTF-8"?> <service id="remoting-service" class="flex.messaging.services.RemotingService"> <adapters> <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/> </adapters> <default-channels> <channel ref="my-amf"/> </default-channels> <destination id="build"> <properties> <factory>spring</factory> <source>buildPageFacade</source> </properties> </destination> </service> SERVICES-CONFIG.XML <?xml version="1.0" encoding="UTF-8"?> <services-config> <services> <service-include file-path="remoting-config.xml" /> <default-channels> <channel ref="my-amf"/> </default-channels> </services> <factories> <factory id="spring" class="com.lexmark.workflow.ccdb.weblayer.spring.flex.SpringFactory" /> </factories> <channels> <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/> <properties> <polling-enabled>false</polling-enabled> </properties> </channel-definition> </channels> <logging> <target class="flex.messaging.log.ConsoleTarget" level="Error"> <properties> <prefix>[BlazeDS] </prefix> <includeDate>false</includeDate> <includeTime>false</includeTime> <includeLevel>false</includeLevel> <includeCategory>false</includeCategory> </properties> <filters> <pattern>Endpoint.*</pattern> <pattern>Service.*</pattern> <pattern>Configuration</pattern> </filters> </target> </logging> <system> <redeploy> <enabled>false</enabled> </redeploy> </system> </services-config> Main.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:RemoteObject id="srv" destination="build"/> <mx:DataGrid dataProvider="{srv.getProductBuildResults.lastResult}" width="100%" height="100%"/> <mx:Button label="Get Data" click="srv.getProductBuildResults('Banker')"/> </mx:Application> Thanks, Patrick PS: Sorry for the long email, I just wanted to make sure I provided enough information so that everyone got an idea of what is going on. -- WARNING ------- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -------------- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.