0 Replies Latest reply on Mar 20, 2008 6:47 AM by Hi i am here

    Hi, Neeraj Winfoware  getting error while trying to create RemoteObject Connection.

    Hi i am here
      Hi ,
      I am getting error "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: ' http://localhost:8080/messagebroker/amf'" while trying to create RemoteObject Connection.
      I deployed services-config.xml and remoting-config.xml in webapps\sample\WEB-INF\flex directory.
      Files code are .
      webapps\sample\WEB-INF\flex\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>
      <channels>
      <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
      <endpoint uri=" 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="Debug">
      <properties>
      <prefix>[Flex] </prefix>
      <includeDate>false</includeDate>
      <includeTime>false</includeTime>
      <includeLevel>false</includeLevel>
      <includeCategory>false</includeCategory>
      </properties>
      </target>
      </logging>
      </services-config>

      webapps\sample\WEB-INF\flex\remoting-config.xml

      <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="Employees">
      <adapter ref="java-object"/>
      <properties>
      <source>com.trivium.SRMSequenceDAO</source>
      </properties>
      <channels>
      <channel ref="my-amf"/>
      </channels>
      </destination>
      </service>

      and web.xlm


      <display-name>Flex data</display-name>
      <description>Flex data</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>
      <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>
      <servlet-mapping>
      <servlet-name>MessageBrokerServlet</servlet-name>
      <url-pattern>/messagebroker/*</url-pattern>
      </servlet-mapping>
      <session-config>
      <session-timeout>35</session-timeout>
      </session-config>
      <mime-mapping>
      <extension>html</extension>
      <mime-type>text/html</mime-type>
      </mime-mapping>
      <mime-mapping>
      <extension>txt</extension>
      <mime-type>text/plain</mime-type>
      </mime-mapping>

      i also set Additional compiler arguments property of flex compiler by

      -compiler.context-root /WEB-INF/flex

      and i am trying to accesse remote object by

      <mx:RemoteObject id="srv" fault="faultHandler(event)" showBusyCursor="true" destination="Employees">
      </mx:RemoteObject>

      If any body know solution so please reply
      Thanks and Regards
      Neeraj