You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/10/02 16:07:59 UTC

[royale-asjs] branch develop updated (f97c062 -> 5f8fd40)

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from f97c062  create Jewel ButtonView so we can make the jewel version some day
     new 66e8e73  clean compile of Emulation RemoteObjectTest
     new d87539c  AMF Test using mx:RemoteObject
     new 5f8fd40  try catching securityerror

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../RemoteObjectAMFTest/build.xml                  |   0
 .../RemoteObjectAMFTest/pom.xml                    |   0
 .../src/main/config/compile-app-config.xml         |   0
 .../src/main/resources/assets/royale_logo.png      | Bin
 .../resources/jewel-example-index-template.html    |   0
 .../src/main/resources/styles.css                  |   0
 .../RemoteObjectAMFTest/src/main/royale/App.mxml   |  89 +++++++++
 .../main/royale/valueObjects/ClientValueObject.as  |   0
 .../src/main/royale/valueObjects/Product.as        |   0
 .../src/main/royale/valueObjects/Taxonomy.as       |   0
 .../src/main/royale/valueObjects/Zone.as           |   0
 .../main/royale/mx/messaging/messages/IMessage.as  | 222 +++++++++++++++++++++
 .../src/main/royale/mx/rpc/events/FaultEvent.as    |  34 ++--
 .../main/royale/mx/rpc/remoting/RemoteObject.as    |  39 ++++
 .../src/main/royale/SendFormattedResultsToLog.as   |   1 +
 15 files changed, 373 insertions(+), 12 deletions(-)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/build.xml (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/pom.xml (100%)
 copy examples/{royale/TeamPage => mxroyale/RemoteObjectAMFTest}/src/main/config/compile-app-config.xml (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/resources/assets/royale_logo.png (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/resources/jewel-example-index-template.html (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/resources/styles.css (100%)
 create mode 100644 examples/mxroyale/RemoteObjectAMFTest/src/main/royale/App.mxml
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/royale/valueObjects/ClientValueObject.as (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/royale/valueObjects/Product.as (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/royale/valueObjects/Taxonomy.as (100%)
 copy examples/{royale => mxroyale}/RemoteObjectAMFTest/src/main/royale/valueObjects/Zone.as (100%)
 create mode 100644 frameworks/projects/MXRoyale/src/main/royale/mx/messaging/messages/IMessage.as


[royale-asjs] 02/03: AMF Test using mx:RemoteObject

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit d87539c32c34f8e46dbb643b1846068f57e90f42
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Oct 2 09:05:18 2018 -0700

    AMF Test using mx:RemoteObject
---
 examples/mxroyale/RemoteObjectAMFTest/build.xml    |  73 +++++++++++
 examples/mxroyale/RemoteObjectAMFTest/pom.xml      | 140 +++++++++++++++++++++
 .../src/main/config/compile-app-config.xml         |  21 ++++
 .../src/main/resources/assets/royale_logo.png      | Bin 0 -> 181871 bytes
 .../resources/jewel-example-index-template.html    |  31 +++++
 .../src/main/resources/styles.css                  |  35 ++++++
 .../RemoteObjectAMFTest/src/main/royale/App.mxml   |  89 +++++++++++++
 .../main/royale/valueObjects/ClientValueObject.as  |  41 ++++++
 .../src/main/royale/valueObjects/Product.as        |  90 +++++++++++++
 .../src/main/royale/valueObjects/Taxonomy.as       |  52 ++++++++
 .../src/main/royale/valueObjects/Zone.as           |  52 ++++++++
 11 files changed, 624 insertions(+)

diff --git a/examples/mxroyale/RemoteObjectAMFTest/build.xml b/examples/mxroyale/RemoteObjectAMFTest/build.xml
new file mode 100644
index 0000000..64adeeb
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/build.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<project name="RemoteObjectAMFTest" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    <property name="example" value="App" />
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+    <property name="opt1_arg" value="-html-template=${basedir}/src/main/resources/mdl-js-index-template.html" />
+
+    <include file="${basedir}/../../build_example.xml" />
+    
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+        <!--
+        <mkdir dir="${basedir}/bin/js-debug/assets" />
+        <copy todir="${basedir}/bin/js-debug/assets" >
+            <fileset dir="${basedir}/src/main/resources/assets">
+                <include name="**" />
+            </fileset>
+        </copy>
+        <mkdir dir="${basedir}/bin/js-release/assets" />
+        <copy todir="${basedir}/bin/js-release/assets" >
+            <fileset dir="${basedir}/src/main/resources/assets">
+                <include name="**" />
+            </fileset>
+        </copy>
+        <replace file="${basedir}/bin/js-debug/index.html" token="${primary}" value="indigo" />
+        <replace file="${basedir}/bin/js-debug/index.html" token="${accent}" value="pink" />
+        <replace file="${basedir}/bin/js-release/index.html" token="${primary}" value="indigo" />
+        <replace file="${basedir}/bin/js-release/index.html" token="${accent}" value="pink" />
+         -->
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+   
+   <target name="examine" depends="build_example.get.browser">
+       <property name="which" value="debug" />
+       <echo message="Choose from dropdown, get quote, click on checkbox to see if TextArea appears and disappears, click on radio buttons to see if other labels change via data binding"/>
+       <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+           <arg value="${basedir}/bin-${which}/${example}.html"/>
+       </exec>
+       <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+           <arg value="${basedir}/bin/js-${which}/index.html"/>
+       </exec>
+   </target>
+   
+</project>
diff --git a/examples/mxroyale/RemoteObjectAMFTest/pom.xml b/examples/mxroyale/RemoteObjectAMFTest/pom.xml
new file mode 100644
index 0000000..8d0dbe6
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/pom.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.royale.examples</groupId>
+    <artifactId>examples-royale</artifactId>
+    <version>0.9.4-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>RemoteObjectAMFTest</artifactId>
+  <version>0.9.4-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Royale: Examples: Royale: RemoteObjectAMFTest</name>
+
+  <properties>
+    <!-- Customize MDL colors using this the tool at : https://getmdl.io/customize/index.html -->
+    <primary>indigo</primary>
+    <accent>pink</accent>
+  </properties>
+
+  <build>
+    <sourceDirectory>src/main/royale</sourceDirectory>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>App.mxml</mainClass>
+          <targets>SWF,JSRoyale</targets>
+          <!-- <debug>false</debug> -->
+          <htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html</htmlTemplate>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>${flash.version}</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+      
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Network</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Network</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.royale.framework</groupId>
+        <artifactId>Reflection</artifactId>
+        <version>0.9.4-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.royale.framework</groupId>
+        <artifactId>Reflection</artifactId>
+        <version>0.9.4-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel-Light-NoFlat-Primary-Blue-Theme</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Jewel-Light-NoFlat-Emphasized-Emerald-Theme</artifactId>
+      <version>0.9.4-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/config/compile-app-config.xml b/examples/mxroyale/RemoteObjectAMFTest/src/main/config/compile-app-config.xml
new file mode 100644
index 0000000..6427e54
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/config/compile-app-config.xml
@@ -0,0 +1,21 @@
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<royale-config>
+    <remove-circulars>true</remove-circulars>
+</royale-config>
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/assets/royale_logo.png b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/assets/royale_logo.png
new file mode 100644
index 0000000..08612eb
Binary files /dev/null and b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/assets/royale_logo.png differ
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/jewel-example-index-template.html b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/jewel-example-index-template.html
new file mode 100644
index 0000000..d98e4cf
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/jewel-example-index-template.html
@@ -0,0 +1,31 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta name="Custom Template for injecting custom style CSS">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
+    <link rel="stylesheet" type="text/css" href="${application}.css">
+    <link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet">
+${head}
+</head>
+<body>
+${body}
+</body>
+</html>
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/styles.css b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/styles.css
new file mode 100644
index 0000000..02b57dc
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/resources/styles.css
@@ -0,0 +1,35 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+*/
+
+@namespace "http://www.w3.org/1999/xhtml";
+
+.Application
+{
+    padding: 10px;
+	margin: 10px;
+}
+
+/* .container {
+    background: #efefef;
+    border-radius: 10px;
+    padding: 20px;
+} */
+	
\ No newline at end of file
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/App.mxml b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/App.mxml
new file mode 100644
index 0000000..9cb00de
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/App.mxml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+               xmlns:js="library://ns.apache.org/royale/basic"
+               xmlns:mx="library://ns.apache.org/royale/mx"
+               xmlns:local="*">
+
+    <fx:Style source="../../main/resources/styles.css"/>
+
+    <fx:Script>
+		<![CDATA[
+            import valueObjects.ClientValueObject;
+            import valueObjects.Product;
+            import valueObjects.Zone;
+            import mx.rpc.events.FaultEvent;
+            
+			private function onFault(evt:FaultEvent):void
+			{
+                trace("Fault= " + evt.message);
+				for(var key:String in evt["message"])
+				{
+					var element:Object = evt["message"][key];
+					trace(key + ", " + element);					
+				}
+				//trace("Fault = " + evt.message);
+			}
+		]]>
+	</fx:Script>
+
+    <fx:Declarations>
+        <mx:RemoteObject id="service" fault="onFault(event)"
+                         endpoint="http://localhost:8080/messagebroker/websocket-amf"
+                         destination="exampleService">
+            <mx:method name="echo">
+                <mx:arguments>
+                    <symbol>{name_txt.text}</symbol>
+                </mx:arguments>
+            </mx:method>
+            <mx:method name="getObjectArray1">
+            </mx:method>
+            <mx:method name="getSomeProduct">
+            </mx:method>
+        </mx:RemoteObject>        
+    </fx:Declarations>
+    
+    <mx:beads>
+        <js:ClassAliasBead />
+    </mx:beads>
+
+    <mx:Label text="RemoteObject AMF Test"/>
+
+    <mx:VBox width="400">
+        <mx:HBox>
+            <mx:VBox>
+                <mx:Label text="Name to send via AMF}"/>
+                <mx:TextInput id="name_txt"/>                
+            </mx:VBox>
+            <mx:Button label="Send to Name" click="service.echo.send()"/>        
+        </mx:HBox>        
+        <mx:Label text="{service.echo.lastResult.echoResult}"/>
+    </mx:VBox>
+    <mx:VBox width="400">
+        <mx:Button label="Get Array Of Objects" click="service.getObjectArray1.send()"/>
+        <mx:List id="list" labelField="id" width="100%" height="200" 
+                 dataProvider="{service.getObjectArray1.lastResult.getObjectArray1Result}" />
+        <mx:Label text="{list.selectedItem}"/>
+    </mx:VBox>
+    <mx:VBox width="400">
+        <mx:Button label="Get Some Product" click="service.getSomeProduct.send()"/>
+        <mx:Label text="{service.getSomeProduct.lastResult.getSomeProductResult.name}"/>
+    </mx:VBox>
+</mx:Application>
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/ClientValueObject.as b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/ClientValueObject.as
new file mode 100644
index 0000000..002e74b
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/ClientValueObject.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package valueObjects
+{
+    [RemoteClass(alias="org.apache.royale.amfsamples.valueobjects.ServerCustomType")]
+	public class ClientValueObject
+	{
+		public function ClientValueObject()
+		{
+		}
+
+		private var _id:String;
+
+        public function get id():String
+        {
+            return _id;
+        }
+        
+        public function set id(value:String):void
+        {
+            _id = value;
+        }
+
+	}
+}
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Product.as b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Product.as
new file mode 100644
index 0000000..ce296c2
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Product.as
@@ -0,0 +1,90 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package valueObjects
+{
+    [RemoteClass(alias="org.apache.royale.amfsamples.valueobjects.Product")]
+	public class Product
+	{
+		public function Product()
+		{
+		}
+
+		private var _name:String;
+
+        public function get name():String
+        {
+            return _name;
+        }
+        
+        public function set name(value:String):void
+        {
+            _name = value;
+        }
+
+        private var _description:String;
+
+        public function get description():String
+        {
+            return _description;
+        }
+        
+        public function set description(value:String):void
+        {
+            _description = value;
+        }
+
+        private var _taxonomy:Taxonomy;
+
+        public function get taxonomy():Taxonomy
+        {
+            return _taxonomy;
+        }
+        
+        public function set taxonomy(value:Taxonomy):void
+        {
+            _taxonomy = value;
+        }
+
+        // collection of zones (Zone), we can use Array and ArrayList
+        private var _zones:Array;
+
+        public function get zones():Array
+        {
+            return _zones;
+        }
+        
+        public function set zones(value:Array):void
+        {
+            _zones = value;
+        }
+
+        private var _flavors:Array = null;
+
+        public function get flavors():Array
+        {
+            return _flavors;
+        }
+        
+        public function set flavors(value:Array):void
+        {
+            _flavors = value;
+        }
+
+	}
+}
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Taxonomy.as b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Taxonomy.as
new file mode 100644
index 0000000..0c26bc5
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Taxonomy.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package valueObjects
+{
+    [RemoteClass(alias="org.apache.royale.amfsamples.valueobjects.Taxonomy")]
+	public class Taxonomy
+	{
+		public function Taxonomy()
+		{
+		}
+
+		private var _type:String;
+
+        public function get type():String
+        {
+            return _type;
+        }
+        
+        public function set type(value:String):void
+        {
+            _type = value;
+        }
+
+        private var _description:String;
+
+        public function get description():String
+        {
+            return _description;
+        }
+        
+        public function set description(value:String):void
+        {
+            _description = value;
+        }
+	}
+}
diff --git a/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Zone.as b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Zone.as
new file mode 100644
index 0000000..fb4f6a9
--- /dev/null
+++ b/examples/mxroyale/RemoteObjectAMFTest/src/main/royale/valueObjects/Zone.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package valueObjects
+{
+    [RemoteClass(alias="org.apache.royale.amfsamples.valueobjects.Zone")]
+	public class Zone
+	{
+		public function Zone()
+		{
+		}
+
+		private var _id:int;
+
+        public function get id():int
+        {
+            return _id;
+        }
+        
+        public function set id(value:int):void
+        {
+            _id = value;
+        }
+
+        private var _name:String;
+
+        public function get name():String
+        {
+            return _name;
+        }
+        
+        public function set name(value:String):void
+        {
+            _name = value;
+        }
+	}
+}


[royale-asjs] 01/03: clean compile of Emulation RemoteObjectTest

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 66e8e73cda8068328bfce09a2ef05a5b1efa8693
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Oct 2 09:04:40 2018 -0700

    clean compile of Emulation RemoteObjectTest
---
 .../main/royale/mx/messaging/messages/IMessage.as  | 222 +++++++++++++++++++++
 .../src/main/royale/mx/rpc/events/FaultEvent.as    |  34 ++--
 .../main/royale/mx/rpc/remoting/RemoteObject.as    |  39 ++++
 3 files changed, 283 insertions(+), 12 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/messages/IMessage.as b/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/messages/IMessage.as
new file mode 100644
index 0000000..ae1035d
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/messaging/messages/IMessage.as
@@ -0,0 +1,222 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.messaging.messages 
+{
+
+/**
+ *  This interface defines the contract for message objects.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3 
+ */
+public interface IMessage 
+{
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    // 
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  body
+	//----------------------------------
+
+    /**
+     *  The body of a message contains the specific data that needs to be 
+     *  delivered to the remote destination.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get body():Object;
+    
+    /**
+     *  @private
+     */
+    function set body(value:Object):void;
+    
+    //----------------------------------
+	//  clientId
+	//----------------------------------
+    
+    /**
+     *  The clientId indicates which client sent the message.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get clientId():String;
+    
+    /**
+	 *  @private
+	 */
+    function set clientId(value:String):void;
+    
+    //----------------------------------
+	//  destination
+	//----------------------------------
+    
+    /**
+     *  The message destination.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */ 
+    function get destination():String;
+    
+    /**
+     *  @private
+     */ 
+    function set destination(value:String):void;
+
+    //----------------------------------
+	//  headers
+	//----------------------------------
+
+    /**
+     *  Provides access to the headers of the message.
+     *  The headers of a message are an associative array where the key is the
+     *  header name.
+     *  This property provides access to specialized meta information for the 
+     *  specific message instance.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get headers():Object;
+    
+    /**
+     *  @private
+     */
+    function set headers(value:Object):void;
+    
+    //----------------------------------
+	//  messageId
+	//----------------------------------
+    
+    /**
+     *  The unique id for the message.
+     *  The message id can be used to correlate a response to the original
+     *  request message in request-response messaging scenarios.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get messageId():String;
+    
+    /**
+     *  @private
+     */
+    function set messageId(value:String):void;
+
+    //----------------------------------
+	//  timestamp
+	//----------------------------------
+
+    /**
+     *  Provides access to the time stamp for the message.
+     *  A time stamp is the date and time that the message was sent.
+     *  The time stamp is used for tracking the message through the system,
+     *  ensuring quality of service levels and providing a mechanism for
+     *  expiration.
+     *
+     *  @see #timeToLive
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get timestamp():Number;
+    
+    /**
+     *  @private
+     */
+    function set timestamp(value:Number):void;
+
+    //----------------------------------
+	//  timeToLive
+	//----------------------------------
+    
+    /**
+     *  The time to live value of a message indicates how long the message
+     *  should be considered valid and deliverable.
+     *  This value works in conjunction with the <code>timestamp</code> value.
+     *  Time to live is the number of milliseconds that this message remains
+     *  valid starting from the specified <code>timestamp</code> value.
+     *  For example, if the <code>timestamp</code> value is 04/05/05 1:30:45 PST
+     *  and the <code>timeToLive</code> value is 5000, then this message will
+     *  expire at 04/05/05 1:30:50 PST.
+     *  Once a message expires it will not be delivered to any other clients.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function get timeToLive():Number;
+    
+    /**
+     *  @private
+     */ 
+    function set timeToLive(value:Number):void;
+    
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    // 
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  This method will return a string representation of the message.
+     *
+     *  @return String representation of the message.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    function toString():String;
+    
+}
+
+}
\ No newline at end of file
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/events/FaultEvent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/events/FaultEvent.as
index ac682da..62ea010 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/events/FaultEvent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/events/FaultEvent.as
@@ -22,18 +22,12 @@ package mx.rpc.events
 
 /* import flash.events.Event;
  */
- import org.apache.royale.events.Event;
-
-import mx.core.mx_internal;
-//import mx.messaging.events.MessageFaultEvent;
-/* import mx.messaging.messages.AbstractMessage;
-import mx.messaging.messages.IMessage;
-
- */
-
-//import mx.rpc.AsyncToken;
-
-import mx.rpc.Fault;
+ import mx.core.mx_internal;
+ import mx.messaging.messages.IMessage;
+ import mx.rpc.Fault;
+ 
+ import org.apache.royale.events.Event;
+
 use namespace mx_internal;
 
 /**
@@ -120,6 +114,22 @@ public class FaultEvent extends Event
         _fault = fault;
     }
 
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    // 
+    //--------------------------------------------------------------------------    
+    
+    /**
+     *  The Message associated with this event.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3 
+     */
+    public var message:IMessage;
 
     //--------------------------------------------------------------------------
     //
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/RemoteObject.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/RemoteObject.as
index 34b2d22..abc750b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/RemoteObject.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/RemoteObject.as
@@ -174,6 +174,45 @@ public dynamic class RemoteObject
     }
 	
     //----------------------------------
+    //  endpoint
+    //----------------------------------
+    
+    private var _endpoint:String;
+    
+    [Inspectable(category="General")]
+    /**
+     * This property allows the developer to quickly specify an endpoint for a RemoteObject
+     * destination without referring to a services configuration file at compile time or programmatically creating 
+     * a ChannelSet. It also overrides an existing ChannelSet if one has been set for the RemoteObject service.
+     *
+     * <p>If the endpoint url starts with "https" a SecureAMFChannel will be used, otherwise an AMFChannel will 
+     * be used. Two special tokens, {server.name} and {server.port}, can be used in the endpoint url to specify
+     * that the channel should use the server name and port that was used to load the SWF. </p>
+     *
+     * <p><b>Note:</b> This property is required when creating AIR applications.</p>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get endpoint():String
+    {
+        return _endpoint;
+    }
+    
+    public function set endpoint(url:String):void
+    {
+        // If endpoint has changed, null out channelSet to force it
+        // to be re-initialized on the next Operation send
+        if (_endpoint != url || url == null)
+        {
+            _endpoint = url;
+            channelSet = null;
+        }
+    }
+    
+    //----------------------------------
 	//  makeObjectsBindable
 	//----------------------------------
 


[royale-asjs] 03/03: try catching securityerror

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 5f8fd40e7d53ea9f873fc75ba04231ddb40a0d86
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Oct 2 09:07:38 2018 -0700

    try catching securityerror
---
 mustella/src/main/royale/SendFormattedResultsToLog.as | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mustella/src/main/royale/SendFormattedResultsToLog.as b/mustella/src/main/royale/SendFormattedResultsToLog.as
index 957d021..f8552bc 100644
--- a/mustella/src/main/royale/SendFormattedResultsToLog.as
+++ b/mustella/src/main/royale/SendFormattedResultsToLog.as
@@ -103,6 +103,7 @@ public class SendFormattedResultsToLog
 			var u:URLLoader = new URLLoader ();
 			u.addEventListener("complete", httpEvents);
 			u.addEventListener("ioError", httpEvents);
+            u.addEventListener("securityError", httpEvents);
 			u.load(new URLRequest ("http://localhost:" + UnitTester.runnerPort + "/ScriptComplete"));
 		}