Skip to main content
Participant
March 8, 2010
Question

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

  • March 8, 2010
  • 3 replies
  • 23621 views

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()
    at mx.rpc::Responder/fault()
    at mx.rpc::AsyncRequest/fault()
    at mx.messaging::ChannelSet/faultPendingSends()
    at mx.messaging::ChannelSet/channelFaultHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.messaging::Channel/connectFailed()
    at mx.messaging.channels::PollingChannel/connectFailed()
    at mx.messaging.channels::AMFChannel/statusHandler()
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>
    This topic has been closed for replies.

    3 replies

    priyankap250191
    Participant
    February 11, 2015

    try referring this link

    this is what i get when i try to download - Small Business Community

    It helped me a lot i disabled that button and it worked for me.

    Participant
    January 19, 2011

    I'm having the same issue. Is there a resolution?  Pls help! thx

    Adobe Employee
    January 19, 2011

    You need to make sure you are running the SWF file that is served up from the application server via HTTP.  Often times the connect will fail because the channel defined in the services-config.xml (in the case "my-amf") has the {server.name} and {server.port} tokens in it and when you run the SWF from the file system the Flash player does not have a server name (or port) to fill in to the channel URL.  so the connection fails.

    Hope that helps.

    Participant
    January 19, 2011

    Thank you for replying!

    I believe I am running the correct SWF file because in the fault detail the tokens are replaced with what seems like correct values. This is what I see in the debugger:

    Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/web/messagebroker/amf'

    Or perhaps this isn't the best way to test/confirm your suggestion?

    Participant
    July 21, 2010

    i have problem same to you.

    Did you fix that?

    Could you explain to me how to resolve that problem?

    Thanks!

    hiephn@yahoo.com

    Participant
    October 25, 2010

    Same problem here...anyone get to the bottom of it?