6 Replies Latest reply: Feb 27, 2012 10:03 PM by jpwrunyan RSS

    NetConnection.Call.BadVersion amfsecure timeout??

    Community Member
      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()[E:\dev \3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:216]<br />     at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]<br />     at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]<br />     at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\ChannelSet.as:1399]<br />     at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\m x\messaging\ChannelSet.as:935]<br />     at flash.events::EventDispatcher/dispatchEventFunction()<br />     at flash.events::EventDispatcher/dispatchEvent()<br />     at mx.messaging::Channel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\Channel.as:997]<br />     at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rp c\src\mx\messaging\channels\PollingChannel.as:354]<br />     at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\AMFChannel.as:369]<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.
        • 1. Re: NetConnection.Call.BadVersion amfsecure timeout??
          <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()[E:\d ev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:216] <br /><BR>at <br />mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as: 49] <br /><BR>at <br />mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncReque st.as:103] <br /><BR>at <br />mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.0.x\frameworks\projects\rpc\src\m x\messaging\ChannelSet.as:1399] <br /><BR>at <br />mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src \mx\messaging\ChannelSet.as:935] <br /><BR>at flash.events::EventDispatcher/dispatchEventFunction() <BR>at <br />flash.events::EventDispatcher/dispatchEvent() <BR>at <br />mx.messaging::Channel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messa ging\Channel.as:997] <br /><BR>at <br />mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.0.x\frameworks\projects\ rpc\src\mx\messaging\channels\PollingChannel.as:354] <br /><BR>at <br />mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\ src\mx\messaging\channels\AMFChannel.as:369] <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>
          • 2. Re: NetConnection.Call.BadVersion amfsecure timeout??
            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" ...
            • 3. Re: NetConnection.Call.BadVersion amfsecure timeout??
              Community Member
              Oooopsss.

              Thanks a lot Cathy. ;-)
              • 4. Re: NetConnection.Call.BadVersion amfsecure timeout??
                (Neil_Uehara)
                Paco

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

                Neil
                • 5. Re: NetConnection.Call.BadVersion amfsecure timeout??
                  Community Member
                  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. ;-)
                  • 6. Re: NetConnection.Call.BadVersion amfsecure timeout??
                    jpwrunyan Community Member

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