Skip to main content
Participant
April 1, 2008
Question

NetConnection.Call.BadVersion amfsecure timeout??

  • April 1, 2008
  • 6 replies
  • 12414 views
Hi.<br /><br />We are using a secure channel like this:<br /><br /> <channels><br /> <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel"><br /> <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/><br /> <properties><br /> <add-no-cache-headers>false</add-no-cache-headers><br /> </properties><br /> </channel-definition><br /> </channels><br /><br />And we expose a remote service like this:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><service id="remoting-service" class="flex.messaging.services.RemotingService"><br /> <adapters><br /> <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/><br /> </adapters><br /> <br /> <default-channels><br /> <channel ref="my-secure-amf"/><br /> </default-channels><br /><br /> <destination id="WebFlow"><br /> <properties><br /> <source>xxxxxxxxxxx.flex.FlexAdapter</source><br /> </properties><br /> </destination><br /></service><br /><br />Then, we create a RemoteObject like this:<br /><br />flowController = new RemoteObject("WebFlow");<br /><br />var channelSet: ChannelSet = new ChannelSet();<br />var channel: Channel = new AMFChannel("my-secure-amf", "https://localhost:443/example/messagebroker/amfsecure");<br /> <br />channelSet.addChannel(channel);<br />flowController.channelSet = channelSet;<br /><br />flowController.showBusyCursor = true;<br /><br />flowController.launch.addEventListener('result', onLaunch);<br /><br />It works well, but if we wait one minute (idle), when we try to invoke the method launch again it appears the following error:<br /><br />[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://localhost:443/example/messagebroker/amfsecure'"]<br /> at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()<br /> at mx.rpc::Responder/fault()<br /> at mx.rpc::AsyncRequest/fault()<br /> at mx.messaging::ChannelSet/faultPendingSends()<br /> at mx.messaging::ChannelSet/channelFaultHandler()<br /> at flash.events::EventDispatcher/dispatchEventFunction()<br /> at flash.events::EventDispatcher/dispatchEvent()<br /> at mx.messaging::Channel/connectFailed()<br /> at mx.messaging.channels::PollingChannel/connectFailed()<br /> at mx.messaging.channels::AMFChannel/statusHandler()<br /><br />Is there any one minute idle timeout?<br /><br />We have tried:<br /><br /> <flex-client><br /> <timeout-minutes>0</timeout-minutes><br /> </flex-client><br /><br />But it doesn't fix the problem.<br /><br />Any help would be appreciated.<br /><br />Thanks a lot.
    This topic has been closed for replies.

    6 replies

    Participating Frequently
    February 28, 2012

    Why are the html tags not being parsed in this thread...?

    _paco_Author
    Participant
    February 19, 2009
    Yes, it works! ;-)<br /><br />The following code works for me:<br /><br />var flowController: RemoteObject = new RemoteObject("WebFlow");<br /><br />var channelSet: ChannelSet = new ChannelSet();<br />var channel: Channel = new SecureAMFChannel("my-secure-amf", "messagebroker/amfsecure");<br /> <br />channelSet.addChannel(channel);<br />flowController.channelSet = channelSet;<br /><br />flowController.showBusyCursor = true;<br /><br />flowController.addEventListener("fault", onError);<br />flowController.launch.addEventListener('result', _onLaunchResume);<br />flowController.resume.addEventListener('result', _onLaunchResume);<br />flowController.getAttribute.addEventListener('result', _onGetAttribute);<br />flowController.setAttribute.addEventListener('result', _onSetAttribute);<br /><br />launch, resume, getAttribute & setAttribute are methods in my Java class.<br /><br />"remoting-config.xml"<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><service id="remoting-service" class="flex.messaging.services.RemotingService"><br /> <adapters><br /> <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/><br /> </adapters><br /> <br /> <default-channels><br /> <channel ref="my-secure-amf"/><br /> </default-channels><br /><br /> <destination id="WebFlow"><br /> <properties><br /> <source>com.hernandezgomez.framework.flex.FlexAdapter</source><br /> </properties><br /> </destination><br /></service><br /><br />"services-config.xml"<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><services-config><br /> <services><br /> <service-include file-path="remoting-config.xml"/><br /> </services><br /><br /> <channels><br /> <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel"><br /> <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/><br /> <properties><br /> <add-no-cache-headers>false</add-no-cache-headers><br /> </properties><br /> </channel-definition><br /> </channels><br /><br /> <logging><br /> <target class="flex.messaging.log.ConsoleTarget" level="Error"><br /> <properties><br /> <prefix>[BlazeDS] </prefix><br /> <includeDate>false</includeDate><br /> <includeTime>false</includeTime><br /> <includeLevel>false</includeLevel><br /> <includeCategory>false</includeCategory><br /> </properties><br /> <filters><br /> <pattern>Endpoint.*</pattern><br /> <pattern>Service.*</pattern><br /> <pattern>Configuration</pattern><br /> </filters><br /> </target><br /> </logging><br /></services-config><br /><br />"web.xml"<br /><br /> <!-- MessageBroker Servlet --><br /> <servlet><br /> <servlet-name>MessageBrokerServlet</servlet-name><br /> <display-name>MessageBrokerServlet</display-name><br /> <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class><br /> <init-param><br /> <param-name>services.configuration.file</param-name><br /> <param-value>/WEB-INF/flex/services-config.xml</param-value><br /> </init-param><br /> <init-param><br /> <param-name>flex.write.path</param-name><br /> <param-value>/WEB-INF/flex</param-value><br /> </init-param><br /> <load-on-startup>1</load-on-startup><br /> </servlet><br /><br /> <servlet-mapping><br /> <servlet-name>MessageBrokerServlet</servlet-name><br /> <url-pattern>/messagebroker/*</url-pattern><br /> </servlet-mapping><br /><br />I hope this helps you. ;-)
    Participant
    February 19, 2009
    Paco

    Just curios did changing to SecureAMFChannel solve your 1 minute timeout problem?

    Neil
    _paco_Author
    Participant
    April 2, 2008
    Oooopsss.

    Thanks a lot Cathy. ;-)
    Participant
    April 1, 2008
    If you're using the secure channel, you'll need

    new SecureAMFChannel instead of new AMFChannel in your Flex client.

    new AMFChannel("my-secure-amf" ... ->
    new SecureAMFChannel("my-secure-amf" ...
    Participant
    April 1, 2008
    <DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2>Hi Paco, </FONT></SPAN></DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2></FONT></SPAN> </DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2>In the error message, it says </FONT></SPAN></DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2></FONT></SPAN> </DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2><FONT face="Times New Roman" color=#000000 size=3>[RPC <br />Fault faultString="Send failed" faultCode="Client.Error.MessageSend" <br />faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: <br />'http://localhost:443/example/messagebroker/amfsecure'"] <br /></FONT><BR></FONT></SPAN></DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2>You are connecting to http destination instead of <br />https.   Could this be a configuration error?</FONT></SPAN></DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2></FONT></SPAN> </DIV><br /><DIV dir=ltr align=left><SPAN class=437043212-01042008><FONT face=Arial <br />color=#0000ff size=2>-John</DIV></FONT></SPAN><BR><br /><DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><br /><HR tabIndex=-1><br /><FONT face=Tahoma size=2><B>From:</B> paco [mailto:member@adobeforums.com] <br /><BR><B>Sent:</B> Tuesday, April 01, 2008 4:27 AM<BR><B>To:</B> <br />blazeds-general@adobeforums.com<BR><B>Subject:</B> NetConnection.Call.BadVersion <br />amfsecure timeout??<BR></FONT><BR></DIV><br /><DIV></DIV>A new discussion was started by paco in <BR><BR><B>General <br />Discussion</B> --<BR>  NetConnection.Call.BadVersion amfsecure <br />timeout??<BR><BR>Hi. <BR><BR>We are using a secure channel like this: <br /><BR><BR>&lt;channels&gt; <br /><BR>        &lt;channel-definition <br />id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel"&gt; <br /><BR>            &lt;endpoint <br />url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" <br />class="flex.messaging.endpoints.SecureAMFEndpoint"/&gt; <br /><BR>            &lt;properties&gt; <br /><BR>                &lt;add-no-cache-headers&gt;false&lt;/add-no-cache-headers&gt; <br /><BR>            &lt;/properties&gt; <br /><BR>        &lt;/channel-definition&gt; <br /><BR>    &lt;/channels&gt; <BR><BR>And we expose a remote <br />service like this: <BR><BR>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <br /><BR>&lt;service id="remoting-service" <br />class="flex.messaging.services.RemotingService"&gt; <br /><BR>    &lt;adapters&gt; <br /><BR>        &lt;adapter-definition <br />id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" <br />default="true"/&gt; <BR>    &lt;/adapters&gt; <br /><BR><BR>&lt;default-channels&gt; <br /><BR>        &lt;channel <br />ref="my-secure-amf"/&gt; <BR>    &lt;/default-channels&gt; <br /><BR><BR>&lt;destination id="WebFlow"&gt; <br /><BR>        &lt;properties&gt; <br /><BR>            &lt;source&gt;xxxxxxxxxxx.flex.FlexAdapter&lt;/source&gt; <br /><BR>        &lt;/properties&gt; <br /><BR>    &lt;/destination&gt; <BR>&lt;/service&gt; <br /><BR><BR>Then, we create a RemoteObject like this: <BR><BR>flowController = new <br />RemoteObject("WebFlow"); <BR><BR>var channelSet: ChannelSet = new ChannelSet(); <br /><BR>var channel: Channel = new AMFChannel("my-secure-amf", <br />"https://localhost:443/example/messagebroker/amfsecure"); <br /><BR><BR>channelSet.addChannel(channel); <BR>flowController.channelSet = <br />channelSet; <BR><BR>flowController.showBusyCursor = true; <br /><BR><BR>flowController.launch.addEventListener('result', onLaunch); <BR><BR>It <br />works well, but if we wait one minute (idle), when we try to invoke the method <br />launch again it appears the following error: <BR><BR>[RPC Fault <br />faultString="Send failed" faultCode="Client.Error.MessageSend" <br />faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: <br />'http://localhost:443/example/messagebroker/amfsecure'"] <BR>at <br />mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() <br /><BR>at <br />mx.rpc::Responder/fault() <br /><BR>at <br />mx.rpc::AsyncRequest/fault() <br /><BR>at <br />mx.messaging::ChannelSet/faultPendingSends() <br /><BR>at <br />mx.messaging::ChannelSet/channelFaultHandler() <br /><BR>at flash.events::EventDispatcher/dispatchEventFunction() <BR>at <br />flash.events::EventDispatcher/dispatchEvent() <BR>at <br />mx.messaging::Channel/connectFailed() <br /><BR>at <br />mx.messaging.channels::PollingChannel/connectFailed() <br /><BR>at <br />mx.messaging.channels::AMFChannel/statusHandler() <br /><BR><BR>Is there any one minute idle timeout? <BR><BR>We have tried: <br /><BR><BR>&lt;flex-client&gt; <BR>&lt;timeout-minutes&gt;0&lt;/timeout-minutes&gt; <br /><BR>&lt;/flex-client&gt; <BR><BR>But it doesn't fix the problem. <BR><BR>Any <br />help would be appreciated. <BR><BR>Thanks a lot. <BR><BR><br /><HR align=left width=200><br />View/reply at <A <br />href="http://www.adobeforums.com/webx?13@@.59b4dc44">NetConnection.Call.BadVersion <br />amfsecure timeout??</A><BR>Replies by email are OK.<BR>Use the <A <br />href="http://www.adobeforums.com/webx?280@@.59b4dc44!folder=.3c061a83">unsubscribe</A> <br />form to cancel your email subscription.<BR><BR>