Hi Carlos,

Sure I’ll see what I can do. Feel I have lots to leatn about Royale and AMF (it 
just works with Flash/AIR so not up to date about the inner workings).

I’ll try to test the examples over the weekend. Do you think the AMFPHP version 
could be an issue or is it assumed to work in Royale if it works in Flex? 

Verstuurd vanaf mijn iPhone

> Op 16 feb. 2018 om 12:28 heeft Carlos Rovira <[email protected]> het 
> volgende geschreven:
> 
> Hi Frederic, 
> thanks for filling this and take a look into AMF!
> Hope you could help us a bit with this.
> 
> 2018-02-16 0:21 GMT+01:00 Fréderic Cox <[email protected]>:
>> Hi Alex, 
>> 
>> I created https://github.com/apache/royale-asjs/issues/119, hope that is in 
>> the correct place and with more readable mark-up.
>> 
>> Regards,
>> 
>> Fréderic
>> 
>>> On Thu, Feb 15, 2018 at 8:57 PM, Alex Harui <[email protected]> wrote:
>>> Hi Frederic,
>>> 
>>> Where is this output you posted coming from, a network monitor?  It was too 
>>> hard to read, so please create a bug report on GitHub and post it there.
>>> 
>>> You might be able to use a network monitor to compare what Flex sent vs 
>>> what Royale is sending.  What does your Flex usage of RemoteObject look 
>>> like?
>>> 
>>> HTH,
>>> -Alex
>>> 
>>> From: Fréderic Cox <[email protected]>
>>> Reply-To: "[email protected]" <[email protected]>
>>> Date: Thursday, February 15, 2018 at 5:09 AM
>>> To: "[email protected]" <[email protected]>
>>> Subject: Re: RemoteObject
>>> 
>>> Hi Piotr,
>>> 
>>> Thanks, I installed the extension and now I'm not getting the CORS error 
>>> anymore.
>>> I'm not getting any fault or result event triggered either....
>>> 
>>> The endPoint set is
>>> 
>>> https://clients.cityfashion.dev.exuvis.com/amfphp/gateway.php
>>> 
>>> 
>>> This is correct, right? (I use this endpoint in Flex and that works fine)
>>> 
>>> 
>>> Request URL: 
>>> https://clients.cityfashion.dev.exuvis.com/amfphp/gateway.php
>>> 
>>> Request Method: 
>>> OPTIONS
>>> 
>>> Status Code:  
>>> 200 OK
>>> 
>>> Remote Address: 
>>> 188.93.153.101:443
>>> 
>>> Referrer Policy: 
>>> no-referrer-when-downgrade
>>> Response Headers
>>> view source
>>> 
>>> Connection: 
>>> keep-alive
>>> 
>>> Content-Encoding: 
>>> gzip
>>> 
>>> Content-Length: 
>>> 286
>>> 
>>> Content-Type: 
>>> text/html; charset=UTF-8
>>> 
>>> Date: 
>>> Thu, 15 Feb 2018 13:08:17 GMT
>>> 
>>> Server: 
>>> nginx
>>> 
>>> Vary: 
>>> Accept-Encoding
>>> Request Headers
>>> view source
>>> 
>>> Accept: 
>>> */*
>>> 
>>> Accept-Encoding: 
>>> gzip, deflate, br
>>> 
>>> Accept-Language: 
>>> en-GB,en-US;q=0.9,en;q=0.8
>>> 
>>> Access-Control-Request-Headers: 
>>> content-type
>>> 
>>> Access-Control-Request-Method: 
>>> POST
>>> 
>>> Connection: 
>>> keep-alive
>>> 
>>> Host: 
>>> clients.cityfashion.dev.exuvis.com
>>> 
>>> Origin: 
>>> null
>>> 
>>> User-Agent: 
>>> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, 
>>> like Gecko) Chrome/64.0.3282.167 Safari/537.36
>>> Response is:
>>> 
>>> <p>amfphp and this gateway are installed correctly. You may now connect to 
>>> this gateway from Flash.</p><p>Note: If you're reading an old tutorial, it 
>>> will tell you that you should see a download window instead of this 
>>> message. This confused people so this is the new behaviour starting from 
>>> amfphp 1.2.</p><p><a href='http://www.amfphp.org/docs'>View the amfphp 
>>> documentation</p><p><a href='browser'>Load the service browser</a></p><pre>
>>> 
>>> Should I target a specific file with the JS version? Should the endPoint be 
>>> different?
>>> 
>>>> On Thu, Feb 15, 2018 at 12:07 PM, Piotr Zarzycki 
>>>> <[email protected]> wrote:
>>>> Frederic,
>>>> 
>>>> It looks like it is not problem with framework, but rather CORS issue. 
>>>> Maybe try to install this plugin [1] and add to the list your url.
>>>> 
>>>> [1] 
>>>> https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en
>>>> 
>>>> Piotr
>>>> 
>>>> 2018-02-15 12:04 GMT+01:00 Fréderic Cox <[email protected]>:
>>>>> For me it is still not working in latest release 0.9.1. I based my 
>>>>> example on the example in the SDK.
>>>>> 
>>>>> 
>>>>> 
>>>>> <?xml version="1.0"
>>>>>  encoding="utf-8"?>
>>>>> 
>>>>> <js:Applicationxmlns:fx="http://ns.adobe.com/mxml/2009";
>>>>> 
>>>>> 
>>>>> xmlns:js="library://ns.apache.org/royale/basic"applicationComplete="applicationCompleteHandler(event);">
>>>>> 
>>>>> 
>>>>> 
>>>>>     <fx:Script>
>>>>> 
>>>>>         <![CDATA[
>>>>> 
>>>>>             import
>>>>>  org.apache.royale.net.RemoteObject;
>>>>> 
>>>>>             import org.apache.royale.net.events.FaultEvent;
>>>>> 
>>>>>             import org.apache.royale.net.events.ResultEvent;
>>>>> 
>>>>> 
>>>>> 
>>>>>             privatefunctionapplicationCompleteHandler(evt:Event):void{
>>>>> 
>>>>>                 testLabel.text = "Requesting from AMF";
>>>>> 
>>>>>                 service.send("getPackages",
>>>>> null);
>>>>> 
>>>>>             }
>>>>> 
>>>>> 
>>>>> 
>>>>>             privatefunctionamfFaultHandler(evt:FaultEvent):void{
>>>>> 
>>>>>                 testLabel.text = "Fault in calling AMF";
>>>>> 
>>>>>             }
>>>>> 
>>>>> 
>>>>> 
>>>>>             privatefunctionamfResultHandler(evt:ResultEvent):void{
>>>>> 
>>>>>                 testLabel.text = "Result received from AMF";
>>>>> 
>>>>>             }
>>>>> 
>>>>>         ]]>
>>>>> 
>>>>> 
>>>>>     </fx:Script>
>>>>> 
>>>>> 
>>>>> 
>>>>> <js:valuesImpl>
>>>>> 
>>>>> <js:SimpleCSSValuesImpl />
>>>>> 
>>>>> </js:valuesImpl>
>>>>> 
>>>>> 
>>>>> 
>>>>>    <js:beads>
>>>>> 
>>>>> <js:ClassAliasBead />
>>>>> 
>>>>> 
>>>>> <js:RemoteObjectid="service"result="amfResultHandler(event)"fault="amfFaultHandler(event)"
>>>>> 
>>>>> endPoint =
>>>>> "https://winkelbeheer.cityfashion.be/amfphp/gateway.php";
>>>>> 
>>>>> destination =
>>>>> "Meta"
>>>>> 
>>>>> source =
>>>>> "Meta"/>
>>>>> 
>>>>> 
>>>>> </js:beads>
>>>>> 
>>>>> 
>>>>> 
>>>>> <js:initialView>
>>>>> 
>>>>> <js:View>
>>>>> 
>>>>> 
>>>>> <js:Labelid="testLabel"
>>>>>  />
>>>>> 
>>>>> 
>>>>> </js:View>
>>>>> 
>>>>> </js:initialView>
>>>>> 
>>>>> </js:Application>
>>>>> 
>>>>> 
>>>>> 
>>>>> It is not working and showing the following error in the browser:
>>>>> 
>>>>>  Failed
>>>>>  to load 
>>>>> https://winkelbeheer.cityfashion.be/amfphp/gateway.php:
>>>>>  Response to preflight request doesn't pass access control check: No 
>>>>> 'Access-Control-Allow-Origin' header is present on the requested 
>>>>> resource. Origin 'http://localhost'
>>>>>  is therefore not allowed access.
>>>>> Language.js:238destination
>>>>>  fault handler
>>>>> 
>>>>> 
>>>>> {code: -1004, message: "Invalid
>>>>>  response type.", detail: "Invalid
>>>>>  XMLHttpRequest response status or type.", data: null}
>>>>> code
>>>>> :
>>>>> -1004
>>>>> data
>>>>> :
>>>>> null
>>>>> detail
>>>>> :
>>>>> "Invalid
>>>>>  XMLHttpRequest response status or type."
>>>>> message
>>>>> :
>>>>> "Invalid
>>>>>  response type."
>>>>> __proto__
>>>>> :
>>>>> Object
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> It is able to compile and run regardless of the errors in compile log:
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> println
>>>>> SEVERE: /Users/frederic/Desktop/Personal/Web 
>>>>> Projects/Workspaces/Royale/HelloRoyale/bin/js-debug/org/apache/royale/reflection/AccessorDefinition.js:12:
>>>>>  ERROR - required "org.apache.royale.reflection.TypeDefinition" namespace 
>>>>> not provided yet
>>>>> goog.require('org.apache.royale.reflection.TypeDefinition');
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> println
>>>>> SEVERE: /Users/frederic/Desktop/Personal/Web 
>>>>> Projects/Workspaces/Royale/HelloRoyale/bin/js-debug/org/apache/royale/reflection/AccessorDefinition.js:13:
>>>>>  ERROR - required "org.apache.royale.reflection.VariableDefinition" 
>>>>> namespace not provided yet
>>>>> goog.require('org.apache.royale.reflection.VariableDefinition');
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> println
>>>>> SEVERE: /Users/frederic/Desktop/Personal/Web 
>>>>> Projects/Workspaces/Royale/HelloRoyale/bin/js-debug/org/apache/royale/reflection/MethodDefinition.js:14:
>>>>>  ERROR - required "org.apache.royale.reflection.TypeDefinition" namespace 
>>>>> not provided yet
>>>>> goog.require('org.apache.royale.reflection.TypeDefinition');
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> println
>>>>> SEVERE: /Users/frederic/Desktop/Personal/Web 
>>>>> Projects/Workspaces/Royale/HelloRoyale/bin/js-debug/org/apache/royale/reflection/ParameterDefinition.js:13:
>>>>>  ERROR- required "org.apache.royale.reflection.TypeDefinition" namespace 
>>>>> not provided yet
>>>>> goog.require('org.apache.royale.reflection.TypeDefinition');
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> println
>>>>> SEVERE: /Users/frederic/Desktop/Personal/Web 
>>>>> Projects/Workspaces/Royale/HelloRoyale/bin/js-debug/org/apache/royale/reflection/TypeDefinition.js:15:
>>>>>  ERROR - required "org.apache.royale.reflection.VariableDefinition" 
>>>>> namespace not provided yet
>>>>> goog.require('org.apache.royale.reflection.VariableDefinition');
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> 
>>>>> Feb 15, 2018 11:51:04 AM com.google.javascript.jscomp.LoggerErrorManager 
>>>>> printSummary
>>>>> WARNING: 5 error(s), 0 warning(s)
>>>>> The project 'HelloRoyale' has been successfully compiled and optimized.
>>>>> 4.566387 seconds
>>>>> 
>>>>> 
>>>>>> On Mon, Jan 15, 2018 at 7:38 PM, Piotr Zarzycki 
>>>>>> <[email protected]> wrote:
>>>>>> Carlos,
>>>>>> 
>>>>>> No problem. I have also couple of huge things related to Royale to do 
>>>>>> before my hand gets dirty with AMF! :) Unless someone urgently will 
>>>>>> needed. :)
>>>>>> 
>>>>>> Thanks, Piotr
>>>>>> 
>>>>>> 2018-01-15 19:27 GMT+01:00 Carlos Rovira <[email protected]>:
>>>>>>> Hi Piotr,
>>>>>>> I'll put this on my to do list, but have to do some things first.
>>>>>>> thanks
>>>>>>> 
>>>>>>> 2018-01-15 9:26 GMT+01:00 Piotr Zarzycki <[email protected]>:
>>>>>>>> Hi Carlos,
>>>>>>>> 
>>>>>>>> Can you describe more how to setup those examples ? Could you add to 
>>>>>>>> RemoteObjectAMFTest README.md file where you describe steps. I would 
>>>>>>>> like to have AMF on my list for tests and improvements. Whenever I 
>>>>>>>> look into that I don't know how to proceed with it.
>>>>>>>> 
>>>>>>>> Thanks, Piotr
>>>>>>>> 
>>>>>>>> 2018-01-15 9:21 GMT+01:00 Carlos Rovira <[email protected]>:
>>>>>>>>> Hi, 
>>>>>>>>> 
>>>>>>>>> there's an example that we get it working nicely at:
>>>>>>>>> 
>>>>>>>>> https://github.com/apache/royale-asjs/tree/develop/examples/royale/RemoteObjectAMFTest
>>>>>>>>> 
>>>>>>>>> you can use that as a starting point for your test
>>>>>>>>> 
>>>>>>>>> As well a java web app that is used along that royale client example 
>>>>>>>>> is at:
>>>>>>>>> 
>>>>>>>>> https://github.com/apache/royale-asjs/tree/develop/examples/amf
>>>>>>>>> 
>>>>>>>>> thanks
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 2018-01-15 3:56 GMT+01:00 Carlos Cruz <[email protected]>:
>>>>>>>>>> I have a lot of experience with Flex remoting and BlazeDS with Java, 
>>>>>>>>>> but with FlexJS and Royale I have none, but extrapolating from some 
>>>>>>>>>> JS tests I've done with AMF at this line: 
>>>>>>>>>> amfTestService.send("getShippingMethods", []); you have to call a 
>>>>>>>>>> class in gateway.php and a method. Your request needs at least 3 
>>>>>>>>>> properties. 
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> I'm also assuming your JS file and gateway.php are in the same 
>>>>>>>>>> domain and same port (this gave me problems).
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Take what I said regarding my experience with FlexJS and Royale into 
>>>>>>>>>> account. 
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Carlos 
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> From: Fréderic Cox [mailto:[email protected]] 
>>>>>>>>>> Sent: Sunday, January 14, 2018 4:01 PM
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> To: [email protected]
>>>>>>>>>> Subject: Re: RemoteObject
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> Script tag was stripped from the post:
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> import org.apache.royale.events.MouseEvent;
>>>>>>>>>>                      import org.apache.royale.net.events.FaultEvent;
>>>>>>>>>>                      import org.apache.royale.net.events.ResultEvent;
>>>>>>>>>>                     
>>>>>>>>>>                      protectedfunction 
>>>>>>>>>> textbutton_clickHandler(event:org.apache.royale.events.MouseEvent):void
>>>>>>>>>>                      {
>>>>>>>>>>                            statusLabel.text = "calling.......";
>>>>>>>>>>                            amfTestService.addEventListener("fault", 
>>>>>>>>>> amfTestService_faultHandler);
>>>>>>>>>>                            amfTestService.addEventListener("result", 
>>>>>>>>>> amfTestService_resultHandler);
>>>>>>>>>>                            amfTestService.send("getShippingMethods", 
>>>>>>>>>> []);
>>>>>>>>>>                      }
>>>>>>>>>>                     
>>>>>>>>>>                      protectedfunction 
>>>>>>>>>> amfTestService_faultHandler(event:FaultEvent):void
>>>>>>>>>>                      {
>>>>>>>>>>                            statusLabel.text = "error!";
>>>>>>>>>>                      }
>>>>>>>>>>                     
>>>>>>>>>>                      protectedfunction 
>>>>>>>>>> amfTestService_resultHandler(event:ResultEvent):void
>>>>>>>>>>                      {
>>>>>>>>>>                            statusLabel.text = "result!";
>>>>>>>>>>                      }
>>>>>>>>>>  
>>>>>>>>>> none of the events are triggered ..URL is 
>>>>>>>>>> http://winkelbeheer.cityfashion.be/amfphp/gateway.php
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> On Fri, Jan 12, 2018 at 4:55 AM, Carlos Cruz 
>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>> 
>>>>>>>>>> I may be blind (and or ignorant as I'm more familiar with Flex) but 
>>>>>>>>>> where
>>>>>>>>>> are you sending an AMF request? I don't see any code that sends a 
>>>>>>>>>> request to
>>>>>>>>>> a service and invokes method.
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: coxfrederic [mailto:[email protected]]
>>>>>>>>>> Sent: Thursday, January 11, 2018 9:09 PM
>>>>>>>>>> To: [email protected]
>>>>>>>>>> Subject: Re: RemoteObject
>>>>>>>>>> 
>>>>>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>>>>> 
>>>>>>>>>> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
>>>>>>>>>>                    xmlns:js="library://ns.apache.org/royale/basic" >
>>>>>>>>>>         <fx:Script>
>>>>>>>>>> 
>>>>>>>>>>         </fx:Script>
>>>>>>>>>>     <js:valuesImpl>
>>>>>>>>>>         <js:SimpleCSSValuesImpl />
>>>>>>>>>>     </js:valuesImpl>
>>>>>>>>>> 
>>>>>>>>>>         <js:beads>
>>>>>>>>>>                 <js:ClassAliasBead />
>>>>>>>>>>                 <js:RemoteObject id="amfTestService"
>>>>>>>>>> 
>>>>>>>>>> endPoint="http://winkelbeheer.cityfashion.be/amfphp/gateway.php";
>>>>>>>>>>                                                  destination="Meta"
>>>>>>>>>> source="Meta" />
>>>>>>>>>>         </js:beads>
>>>>>>>>>> 
>>>>>>>>>>     <js:initialView>
>>>>>>>>>>         <js:View>
>>>>>>>>>>                         <js:VGroup>
>>>>>>>>>>                                 <js:Label id="statusLabel" 
>>>>>>>>>> text="Hello
>>>>>>>>>> World!" />
>>>>>>>>>>                                 <js:TextButton text="Get AMF data"
>>>>>>>>>> click="textbutton_clickHandler(event)" />
>>>>>>>>>>                         </js:VGroup>
>>>>>>>>>>         </js:View>
>>>>>>>>>>     </js:initialView>
>>>>>>>>>> </js:Application>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Any idea why I'm not getting a fault nor success event on this?
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> --
>>>>>>>>>> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -- 
>>>>>>>>> Carlos Rovira
>>>>>>>>> http://about.me/carlosrovira
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> Piotr Zarzycki 
>>>>>>>> 
>>>>>>>> Patreon: https://www.patreon.com/piotrzarzycki
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -- 
>>>>>>> Carlos Rovira
>>>>>>> http://about.me/carlosrovira
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>> Piotr Zarzycki 
>>>>>> 
>>>>>> Patreon: https://www.patreon.com/piotrzarzycki
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> Piotr Zarzycki 
>>>> 
>>>> Patreon: https://www.patreon.com/piotrzarzycki
>>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira
> 

Reply via email to