You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/02/15 23:21:04 UTC
[GitHub] coxfrederic opened a new issue #119: Request to AMFPHP fails to return any fault or result event
coxfrederic opened a new issue #119: Request to AMFPHP fails to return any fault or result event
URL: https://github.com/apache/royale-asjs/issues/119
I'm not getting any fault or result event triggered for my simple example....
```
<?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" 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;
private function applicationCompleteHandler(evt:Event):void{
testLabel.text = "Requesting from AMF";
service.send("getPackages", null);
}
private function amfFaultHandler(evt:FaultEvent):void{
testLabel.text = "Fault in calling AMF";
}
private function amfResultHandler(evt:ResultEvent):void{
testLabel.text = "Result received from AMF";
}
]]>
</fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:beads>
<js:ClassAliasBead />
<js:RemoteObject id="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:Label id="testLabel" />
</js:View>
</js:initialView>
</js:Application>
```
The endPoint set is to
https://clients.cityfashion.dev.exuvis.com/amfphp/gateway.php
This is correct, right? (I use this endpoint in Flex and that works fine)
From the Chrome Developer Tools Network Monitor I get the following output:
```
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 there 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>
```
Should I target a specific file with the JS version? Should the endPoint be different?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services