2 Replies Latest reply on Sep 3, 2013 11:16 PM by FlexCoderCali123

    messagebroker/amf Throwing 404 error on domain Server

    FlexCoderCali123

      I am Working with blazeDs and Java using Remote object using 4.5 Flex SDK , My application is running perfect locally like when applications hits http://localhost:8400/GerenciaUsuario/messagebroker/amf it is working fine but when i deploy my application on Domain Server http://HostName/GerenciaUsuario/messagebroker/amf is throwing 404 Exception can some one please help me ....

        • 1. Re: messagebroker/amf Throwing 404 error on domain Server
          吃牛排的羊

          looks like the cofiguration is not right. check you web.xml, services-config.xml.

          can you remote debug on your servlet which url-pattern is /messageborker/amf/ ?

          • 2. Re: messagebroker/amf Throwing 404 error on domain Server
            FlexCoderCali123 Level 1

            Thanks for your reply the Web.xml File i am using is

             

            <?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>BlazeDS</display-name>

                <description>BlazeDS Application</description>

             

                <!-- Http Flex Session attribute and binding listener support -->

                <listener>

                    <listener-class>flex.messaging.HttpFlexSession</listener-class>

                </listener>

             

                <!-- MessageBroker Servlet -->

                <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>

                    <load-on-startup>1</load-on-startup>

                </servlet>

             

            <!-- begin rds

            end rds -->

                <servlet>

                    <servlet-name>RDSDispatchServlet</servlet-name>

                                <display-name>RDSDispatchServlet</display-name>

                    <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>

                                <init-param>

                                          <param-name>useAppserverSecurity</param-name>

                                          <param-value>false</param-value>

                                </init-param>       

                    <load-on-startup>10</load-on-startup>

                </servlet>

             

                <servlet-mapping id="RDS_DISPATCH_MAPPING">

                    <servlet-name>RDSDispatchServlet</servlet-name>

                    <url-pattern>/CFIDE/main/ide.cfm</url-pattern>

                </servlet-mapping>

             

                <servlet-mapping>

                    <servlet-name>MessageBrokerServlet</servlet-name>

                    <url-pattern>/messagebroker/*</url-pattern>

                </servlet-mapping>

             

                <welcome-file-list>

                    <welcome-file>index.html</welcome-file>

                    <welcome-file>index.htm</welcome-file>

                </welcome-file-list>

             

                <!-- for WebSphere deployment, please uncomment -->

                <resource-ref>

                    <description>Flex Messaging WorkManager</description>

                    <res-ref-name>wm/MessagingWorkManager</res-ref-name>

                    <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>

                    <res-auth>Container</res-auth>

                    <res-sharing-scope>Shareable</res-sharing-scope>

                </resource-ref>

             

            </web-app>

             

             

            and Services-config.xml iam using is

             

             

            <?xml version="1.0" encoding="UTF-8"?>

            <services-config>

             

             

                <services>

                    <service-include file-path="remoting-config.xml" />

                     

                </services>

             

             

                <security>

                    <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>

                </security>

             

             

                <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"/>

                    </channel-definition>

             

             

                    <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">

                        <endpoint url="https://localhost:8400/GerenciaUsuario/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>

                        <properties>

                            <add-no-cache-headers>false</add-no-cache-headers>

                        </properties>

                    </channel-definition>

                                <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">

                                            <endpoint url="https://localhost:8400/GerenciaUsuario/messagebroker/amfsecure/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint" />

                                           <properties>

                                                      <idle-timeout-minutes>0</idle-timeout-minutes>

                                                      <max-streaming-clients>10</max-streaming-clients>

                                                      <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-m illis>

                                                     <user-agent-settings>

                                                                <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="3" />

                                                                <user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="3" />

                                                      </user-agent-settings>

                                          </properties>

                                  </channel-definition>

                    <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">

                        <endpoint url="http://localhost:8400/GerenciaUsuario/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>

                        <properties>

                            <polling-enabled>true</polling-enabled>

                            <polling-interval-seconds>4</polling-interval-seconds>

                        </properties>

                    </channel-definition>

             

             

                  

                    <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">

                        <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>

                    </channel-definition>

             

             

                    <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">

                        <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>

                        <properties>

                            <add-no-cache-headers>false</add-no-cache-headers>

                        </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>

                        <!--

                        <watch-interval>20</watch-interval>

                        <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>

                        <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>

                        <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>

                        <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>

                        <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>

                        <touch-file>{context.root}/WEB-INF/web.xml</touch-file>

                         -->

                    </redeploy>

                </system>

             

             

            </services-config>