Also there is no servlet mapping for swf or mxml . what you type in the address 
bar of the browser?
 Thanks,

with Regards,
Jitendra Jain




----- Original Message ----
From: jitendra jain <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, 25 September, 2008 11:40:07 AM
Subject: Re: [flexcoders] BlazeDS Integration


Where you have put the services-config. xml,remoting- config.xml etc files?
 Thanks,

with Regards,
Jitendra Jain




----- Original Message ----
From: Patrick McDaniel <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, 25 September, 2008 4:16:56 AM
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>
    
    <!--applicationConte xt.xml setup -->
    <context-param>
        <param-name>contextConfigLocati on</param-name>
        <param-value>/WEB-INF/applicatio nContext. 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>CharacterEncodingFi lter</filter-name>
        <filter-class>
            org.springframework .web.filter. CharacterEncodin 
gFilter</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>CharacterEncodingFi lter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>CharacterEncodingFi lter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    
    <listener>
        <listener-class>
            org.springframework .web.util. Log4jConfigListe ner</listener-class>
    </listener>
    
    <listener>
        <listener-class>
            org..springframewor k .web.context. ContextLoaderLis 
tener</listener-class>
    </listener>
    
    <!-- MessageBroker Servlet(BlazeDS) -->
    <servlet>
        <servlet-name>MessageBrokerServle t</servlet-name>
        <display-name>MessageBrokerServle t</display-name>
        <servlet-class>flex.messaging. MessageBrokerSer vlet</servlet-class>
        <init-param>
            <param-name>services.configurat ion.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. DispatcherServle t</servlet-class>
        <init-param>
            <param-name>contextConfigLocati on</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>MessageBrokerServle t</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}/messagebro ker/amf" class="flex. messaging. endpoints. AMFEndpoint" />
            <properties>
               <polling-enabled>false</polling-enabled>
            </properties>
        </channel-definition>
    </channels>

    <logging>
        <target class="flex. messaging. log.ConsoleTarge t" 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.getProduct BuildResults. lastResult} " 
width="100%" height="100% "/>
    
    <mx:Button label="Get Data" click="srv.getProdu ctBuildResults( '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.


________________________________
Unlimited freedom, unlimited storage. Get it now  


      Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Reply via email to