<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rootelement, inc. &#187; Tide</title>
	<atom:link href="http://www.rootelement.net/tag/tide/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rootelement.net</link>
	<description>Invest in your business.</description>
	<lastBuildDate>Mon, 21 Feb 2011 20:56:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Granite SecureAMFChannel &#8211; AMF over HTTPS</title>
		<link>http://www.rootelement.net/2009/03/granite-secureamfchannel-amf-over-https/</link>
		<comments>http://www.rootelement.net/2009/03/granite-secureamfchannel-amf-over-https/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 15:36:52 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[GraniteDS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Seam]]></category>
		<category><![CDATA[SecureAMFChannel]]></category>
		<category><![CDATA[Tide]]></category>

		<guid isPermaLink="false">http://sproif.com/?p=88</guid>
		<description><![CDATA[How to test a flex/seam project locally with HTTP and post to HTTPS]]></description>
			<content:encoded><![CDATA[<p>At work we&#8217;ve started to use JBoss, writing an application in Java and AS 3.0.  We&#8217;re using Seam and Tide to sandwich it all together, and we came upon a slight problem.  Everything worked out great in the test environment, but when we went live, on an HTTPS connection, firebug was reporting that the AMF request out of flex was failing.  That&#8217;s due to the services-config.xml in the application pointing to a non-secure connection.  After much digging, we found this to be the solution.<br />
<span id="more-88"></span><br />
WEB-INF/flex/services-config.xml<br />
in the channels definition at the top:</p>
<pre class="brush: xml;">
&lt;channels&gt;
    &lt;!--USED IN THE LIVE ENVIRONMENT--&gt;
    &lt;!--channel ref=&quot;my-graniteamf-secure&quot;/--&gt;
    &lt;!--USED IN THE LOCAL/DEV ENVIRONMENT--&gt;
    &lt;channel ref=&quot;my-graniteamf&quot;/&gt;
&lt;/channels&gt;
</pre>
<p>Then in the channel definition below we have both definitions:</p>
<pre class="brush: xml;">
&lt;channel-definition id=&quot;my-graniteamf&quot;
    class=&quot;mx.messaging.channels.AMFChannel&quot;&gt;
    &lt;endpoint
        uri=&quot;http://{server.name}:{server.port}/{context.root}/graniteamf/amf&quot;
        class=&quot;flex.messaging.endpoints.AMFEndpoint&quot; /&gt;
&lt;/channel-definition&gt;
&lt;channel-definition id=&quot;my-graniteamf-secure&quot;
    class=&quot;mx.messaging.channels.SecureAMFChannel&quot;&gt;
    &lt;endpoint
        uri=&quot;https://{server.name}:443/{context.root}/graniteamf/amf&quot;
        class=&quot;flex.messaging.endpoints.SecureAMFEndpoint&quot; /&gt;
&lt;/channel-definition&gt;
</pre>
<p>We couldn&#8217;t get {server.port} to work correctly, so we&#8217;re forcing the port in the address for now.</p>
<p>The only problem with this is you have to remember to switch the AMF channel before deploying.  It&#8217;s on our checklist before doing the full deploy, but we&#8217;re most likely going to add it to the ant task list to deploy dev, deploy live.  Something like that.</p>
<p>The <strong>KEY THING TO REMEMBER</strong> is this: although this file is deployed with the war/ear, it is <strong><em>ALSO COMPILED INTO THE APPLICATION SWF</em></strong> when it is built.  Make sure to change it locally and rebuild your swf before posting, or you will see no change in your app. (found this out after a significant amount of time changing the file on the server to no avail&#8230;)</p>
<pre>(Ref: <a href="http://www.mail-archive.com/discussion@affug.com/msg00605.html" target="_blank">http://www.mail-archive.com/discussion@affug.com/msg00605.html</a>)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.rootelement.net/2009/03/granite-secureamfchannel-amf-over-https/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

