8 Replies Latest reply: Feb 11, 2015 4:46 AM by priyankap250191 RSS

    faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed

    ee88 Community Member

      I've installed the turnkey installation of blazeds.

      I've started the sampledb, started the tomcat server, chosen the correct configs in my flex client application.

      I made a simple javaclass "MyTestClass" with a getString method and put it in [turnkeyinstallationfolder]/tomcat/webapps/samples/WEB-INF/classes/flex/samples

      I configured a destination in the remoting-config.xml of the samples with source flex.samples.MyTestClass.

      When I run my flex client application I always get this error message: (below is the code of my java class, flex air client app and the remoting-config.xml)

       

      error message
      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://lazeTestRemoting.swf/samples/messagebroker/amf'"]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\gumbo_beta2\frameworks\p rojects\rpc\src\mx\rpc\AbstractInvoker.as:345]
          at mx.rpc::Responder/fault()[E:\dev\gumbo_beta2\frameworks\projects\rpc\src\mx\rpc\Responder .as:68]
          at mx.rpc::AsyncRequest/fault()[E:\dev\gumbo_beta2\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:113]
          at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\gumbo_beta2\frameworks\projects\rpc\s rc\mx\messaging\ChannelSet.as:1614]
          at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\gumbo_beta2\frameworks\projects\rpc \src\mx\messaging\ChannelSet.as:1206]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.messaging::Channel/connectFailed()[E:\dev\gumbo_beta2\frameworks\projects\rpc\src\mx\m essaging\Channel.as:1128]
          at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\gumbo_beta2\frameworks\proje cts\rpc\src\mx\messaging\channels\PollingChannel.as:406]
          at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\gumbo_beta2\frameworks\projects\ rpc\src\mx\messaging\channels\AMFChannel.as:444]
      java class
      public class MyTestClass {
          public MyTestClass(){}

          public String getString()
          {
              return "test";
          }

      }
      flex app
      <?xml version="1.0" encoding="utf-8"?>
      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                             xmlns:s="library://ns.adobe.com/flex/spark"
                             xmlns:mx="library://ns.adobe.com/flex/halo">
          <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
              <s:RemoteObject id="myService" destination="testbestemming"/>
          </fx:Declarations>
         
          <s:Label text="{myService.getString()}"/>
         
      </s:WindowedApplication>

      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="product">
              <properties>
                  <source>flex.samples.product.ProductService</source>
              </properties>
          </destination>

          <destination id="chat-room-service">
              <properties>
                  <source>flex.samples.runtimeconfig.ChatRoomService</source>
                  <scope>application</scope>
              </properties>
          </destination>

          <destination id="census">
              <properties>
                  <source>flex.samples.census.CensusService</source>
              </properties>
          </destination>

          <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
              <properties>
                  <source>flex.samples.qos.FlexClientConfigService</source>
              </properties>
          </destination>
         
          <destination id="testbestemming">
              <properties>
                  <source>flex.samples.MyTestClass</source>
                 </properties>
         </destination>

         
        </service>