Flex Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed

(mx.messaging.messages::ErrorMessage)#0
  body = (Object)#1
  clientId = (null)
  correlationId = "9752798F-04E7-C3BD-9A8F-D9D98E03263E"
  destination = ""
  extendedData = (null)
  faultCode = "Client.Error.MessageSend"
  faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/WebContext/messagebroker/amf'"
  faultString = "发送失败"
  headers = (Object)#2
  messageId = "F4DB62D1-91DB-AB5D-0A4C-D9D99E4A680B"
  rootCause = (mx.messaging.events::ChannelFaultEvent)#3
    bubbles = false
    cancelable = false
    channel = (mx.messaging.channels::AMFChannel)#4
      authenticated = false
      channelSets = (Array)#5
      connected = false
      connectTimeout = -1
      enableSmallMessages = true
      endpoint = "http://localhost:8080/WebContext/messagebroker/amf"
      failoverURIs = (Array)#6
      id = "my-amf"
      mpiEnabled = false
      netConnection = (flash.net::NetConnection)#7
        client = (mx.messaging.channels::AMFChannel)#4
        connected = false
        maxPeerConnections = 8
        objectEncoding = 3
        proxyType = "none"
        uri = "http://localhost:37813/WebContext/messagebroker/amf?hostport=localhost:8080&https=N&id=-1"
      piggybackingEnabled = false
      polling = false
      pollingEnabled = true
      pollingInterval = 3000
      protocol = "http"
      reconnecting = false
      recordMessageSizes = false
      recordMessageTimes = false
      requestTimeout = -1
      uri = "http://{server.name}:{server.port}/CaptureGis/messagebroker/amf"
      url = "http://{server.name}:{server.port}/CaptureGis/messagebroker/amf"
      useSmallMessages = false
    channelId = "my-amf"
    connected = false
    currentTarget = (mx.messaging.channels::AMFChannel)#4
    eventPhase = 2
    faultCode = "Channel.Connect.Failed"
    faultDetail = "NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/WebContext/messagebroker/amf'"
    faultString = "error"
    reconnecting = false
    rejected = false
    rootCause = (Object)#8
      code = "NetConnection.Call.Failed"
      description = "HTTP: Failed"
      details = "http://localhost:37813/WebContext/messagebroker/amf?hostport=localhost:8080&https=N&id=-1"
      level = "error"
    target = (mx.messaging.channels::AMFChannel)#4
    type = "channelFault"
  timestamp = 0
  timeToLive = 0

 

 

 

 

 

 

 

Ok.. 这个是我在工作中遇到的问题, 搞了我 1.5天,为什么搞这么长时间呢 , 我也很郁闷, 因为一样的代码,原来是可以的 ,但是现在不可以了 。。 郁闷不。 查了很长时间,国内文章真是要命 ,都COPY ,看的我浪费时间, 也没有搞定问题。

下面是个解决方案,应该可以解决类似问题。

拿my-amf channel 来说 ,我的是flex4版本的哦。

在 channel-definition中加入

 

 <properties>
    <add-no-cache-headers>false</add-no-cache-headers>
    <polling-enabled>false</polling-enabled>
    <serialization>
     <instantiate-types>false</instantiate-types>
    </serialization>
   </properties>

可能有的其他的版本有个strong 节点

 

<properties>
<strong><add-no-cache-headers>false</add-no-cache-headers></strong>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>

 

over...

thx

 

 

你可能感兴趣的:(工作,object,Flex,null,url)