2 Replies Latest reply on Feb 23, 2012 11:40 AM by oldMster

    Problems to deploy HTTPS

    PoliDiaz

      Hi,

       

      I have problems to deploy a web application using SSL. i don´t have problems when i deploy in localhost, but when i deploy (https://www.XXXX.com/nameapllication) in production, the remote objects doesn´t work. I have the the next one crossdomail.xml file (path: https://www.XXXX.com/crossdomail.xml):

       

      <?xml version="1.0"?>

      <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

      <cross-domain-policy>

        <allow-access-from domain="*" to-ports="*" secure="true" /> 

        <!-- 

      This domain can accept any header from a SWF file on any subdomain of example.com and supports https requests 

        --> 

        <allow-http-request-headers-from domain="*" headers="*" secure="true" /> 

      </cross-domain-policy>

       

      Services-config.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <services-config>

       

          <services>

              <service-include file-path="remoting-config.xml" />

              <service-include file-path="proxy-config.xml" />

              <service-include file-path="messaging-config.xml" />       

          </services>

          <!-- factory para utilizar beans de spring -->

          <factories>

             ...

          </factories>

          <security>

              <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>

              <!--

              <security-constraint id="basic-read-access">

                  <auth-method>Basic</auth-method>

                  <roles>

                      <role>guests</role>

                      <role>accountants</role>

                      <role>employees</role>

                      <role>managers</role>

                  </roles>

              </security-constraint>

               -->

          </security>

       

          <channels>

              <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">

                  <endpoint url="https://www.XXXX.com/nameapllication/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>

                  <properties>

                      <add-no-cache-headers>false</add-no-cache-headers>

                  </properties>

              </channel-definition>

       

            

          </channels>

       

          <logging>

              <target class="flex.messaging.log.ConsoleTarget" level="Error">

                  <properties>

                      <prefix>[BlazeDS] </prefix>

                      <includeDate>false</includeDate>

                      <includeTime>false</includeTime>

                      <includeLevel>false</includeLevel>

                      <includeCategory>false</includeCategory>

                  </properties>

                  <filters>

                      <pattern>Endpoint.*</pattern>

                      <pattern>Service.*</pattern>

                      <pattern>Configuration</pattern>

                  </filters>

              </target>

          </logging>

       

          <system>

              <redeploy>

                  <enabled>false</enabled>

                  <!--

                  <watch-interval>20</watch-interval>

                  <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>

                  <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>

                  <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>

                  <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>

                  <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>

                  <touch-file>{context.root}/WEB-INF/web.xml</touch-file>

                   -->

              </redeploy>

          </system>

       

      </services-config>

       

       

      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-secure-amf"/>

          </default-channels>

      <destination id="getUsers">  

      ....

       

      I don´t know what to do in this case, please help me. The application starts, but when i do something that use the remote objects, nothing is return.

        • 1. Re: Problems to deploy HTTPS
          drkstr_1 Level 4

          Do you have an appropriate SSL cert installed on the server? Does it work if you view the page using https (shouldnt be needed if you have an SSL cert)? Does it work in other browsers like FireFox? What does your crossdomain.xml look like?

           

           

          I had a similar issue once with IE, but not FireFox. Viewing the page as https solved it, and then later installing an SSL cert on the server eliminated that requirement.

           

          Note: I didn't read your services config, but I assume it's good since it works on localhost.

          • 2. Re: Problems to deploy HTTPS
            oldMster Level 3

            If you view the page using https in the browser, and the browser reports any issues with the certificate, the https calls to that URL will not work from flex.

            Mark