Bilbosax edited a comment on issue #1064:
URL: https://github.com/apache/royale-asjs/issues/1064#issuecomment-767163762


   @cristallium @carlosrovira Thanks for all the feedback.  The endpoint I have 
works, I just gave a fake address for security reasons.  I should make a small 
correction, I am actually using Zend AMF, not AMFPHP. Unfortunately, I have 
still not had any success today.  I am choosing the simplest function in my API 
which just returns a list of state names as an associative array. I don't get 
much back in terms of an error response that makes a lot of sense.  This is 
what traces out:
   
   ```
   org/apache/royale/utils/Language.js
   Call was made, but failed - (mx.messaging.messages.ErrorMessage)
     {0}={1},body,[object Object]
     {0}={1},clientId,null
     {0}={1},correlationId,27C88E55-FFDF-3221-9447-600F4182A908
     {0}={1},destination,
     {0}={1},headers,[object Object]
     {0}={1},messageId,AD0825EB-4061-CD1F-3D62-600F41823E11
     {0}={1},timeToLive,0
     {0}={1},timestamp,0
    org/apache/royale/utils/Language.js
   ```
   
   I have two big concerns.  First, because of rules regarding security with 
Apple on my mobile apps, my original PHP API is on an SSL secured server and 
all messages are sent by "https".  I account for this in my old Flex config 
file which is listed here:
   
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <services-config>
       <services>
           <service id="amfphp-flashremoting-service" 
class="flex.messaging.services.RemotingService" 
messageTypes="flex.messaging.messages.RemotingMessage">
               <destination id="zend">
                   <channels>
                       <channel ref="my-zend"/>
                   </channels>
                   <properties>
                       <source>*</source>
                   </properties>
               </destination>
           </service>
       </services>
       <channels>
           <channel-definition id="my-zend" 
class="mx.messaging.channels.SecureAMFChannel">
               <endpoint uri="https://wwwmywebsite.com/services/"; 
class="flex.messaging.endpoints.SecureAMFEndpoint"/>
           </channel-definition>
       </channels>
   </services-config>
   ```
    You can see at the bottom of this file that it specifically mentions a 
"SecureAMFChannel" and "SecureAMFEndpoint."  I had to make these changes 
specifically to be compliant with Apple.  But I don't think it is the default 
for RemoteObject, at least it didn't used to be.  Do you know if there is 
anything that I need to do special with mx RemoteObject to get it to "speak 
securely"???
   
   Secondly, the only other thing that I can think of is that it might be a 
CORS issue, but I don't know too much about CORS since I am not a native web 
designer.  My database/php server/web server that I am using is not on my local 
machine, it is an AWS server.  My mobile apps did not have any problem 
accessing it, so I just figured it would work with Royale as well.  Do I need 
to copy the whole system to my local machine to do this development running 
WAMP??
   
   Is this most likely a CORS issue, or a SSL issue?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to