<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Zend Amf Class Mapping</title>
	<atom:link href="http://wadearnold.com/blog/flash/zend-amf-class-mapping/feed" rel="self" type="application/rss+xml" />
	<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping</link>
	<description>The spoils of the integration of PHP and ActionScript</description>
	<lastBuildDate>Wed, 19 May 2010 07:10:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Mapping Data Types from PHP to Flex with Zend AMF and Flash Builder 4 &#124; Ryan Stewart &#8211; Rich Internet Application Mountaineer</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-9048</link>
		<dc:creator>Mapping Data Types from PHP to Flex with Zend AMF and Flash Builder 4 &#124; Ryan Stewart &#8211; Rich Internet Application Mountaineer</dc:creator>
		<pubDate>Fri, 15 Jan 2010 11:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-9048</guid>
		<description>[...] find it so hopefully this helps someone who Google&#8217;s things the same way I do. And Wade has a great tutorial for doing this when you&#8217;re just dealing with the Zend AMF code but I was looking for [...]</description>
		<content:encoded><![CDATA[<p>[...] find it so hopefully this helps someone who Google&#8217;s things the same way I do. And Wade has a great tutorial for doing this when you&#8217;re just dealing with the Zend AMF code but I was looking for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-7940</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Wed, 09 Dec 2009 00:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-7940</guid>
		<description>I just wanted to post this somewhere and this seems as good a place as any.  I just came across an issue while working with ZendAMF and PHP that is kind of odd.  I have a class that uses a constant named &quot;NAMESPACE&quot; for registering an namespace with DOMXpath.  My remote object was failing with &quot;NetConnection.Call.Failed&quot; and I track the issue down to this constant.  I changed it to NAME_SPACE and all is well.  In my opinion this is strange behavior since I am not registering a namespace with ZendAMF and this is a perfectly legitimate construct in PHP but never the less there it is.</description>
		<content:encoded><![CDATA[<p>I just wanted to post this somewhere and this seems as good a place as any.  I just came across an issue while working with ZendAMF and PHP that is kind of odd.  I have a class that uses a constant named &#8220;NAMESPACE&#8221; for registering an namespace with DOMXpath.  My remote object was failing with &#8220;NetConnection.Call.Failed&#8221; and I track the issue down to this constant.  I changed it to NAME_SPACE and all is well.  In my opinion this is strange behavior since I am not registering a namespace with ZendAMF and this is a perfectly legitimate construct in PHP but never the less there it is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krikri</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-7139</link>
		<dc:creator>krikri</dc:creator>
		<pubDate>Wed, 11 Nov 2009 22:47:35 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-7139</guid>
		<description>&lt;a href=&quot;#comment-273&quot; rel=&quot;nofollow&quot;&gt;@Lx&lt;/a&gt; 
Hi Lx ,
Have you found solution for this ?I need it now ...
Thanks to help me please.
Krikri</description>
		<content:encoded><![CDATA[<p><a href="#comment-273" rel="nofollow">@Lx</a><br />
Hi Lx ,<br />
Have you found solution for this ?I need it now &#8230;<br />
Thanks to help me please.<br />
Krikri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nkader</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-2654</link>
		<dc:creator>nkader</dc:creator>
		<pubDate>Tue, 02 Jun 2009 20:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-2654</guid>
		<description>Can anyone tell me if Zend AMF supports complex objects?  For example, in my Flex app I have an Employee class that has an Address object as one of it&#039;s public properties.  The primitive typed properties of the Employee class are working, but so far I am unable to get Flex to recognize the address object.  In the console I&#039;m seeing this error:

 TypeError: Error #1034: Type Coercion failed: cannot convert Object@62508a9 to valueObjects.Address

Any suggestions would be greatly appreciated.  Also, I&#039;m thinking ahead and wondering about how I would do something like using an ArrayCollection of custom data types (for example: create a public var inside my Employee class that is meant to hold an ArrayCollection of Address objects).

Thanks much,</description>
		<content:encoded><![CDATA[<p>Can anyone tell me if Zend AMF supports complex objects?  For example, in my Flex app I have an Employee class that has an Address object as one of it&#8217;s public properties.  The primitive typed properties of the Employee class are working, but so far I am unable to get Flex to recognize the address object.  In the console I&#8217;m seeing this error:</p>
<p> TypeError: Error #1034: Type Coercion failed: cannot convert Object@62508a9 to valueObjects.Address</p>
<p>Any suggestions would be greatly appreciated.  Also, I&#8217;m thinking ahead and wondering about how I would do something like using an ArrayCollection of custom data types (for example: create a public var inside my Employee class that is meant to hold an ArrayCollection of Address objects).</p>
<p>Thanks much,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: farid valipour</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-2564</link>
		<dc:creator>farid valipour</dc:creator>
		<pubDate>Mon, 11 May 2009 05:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-2564</guid>
		<description>Hi, thanks Dear Wade Arnol.

have you the source code of screenshot ,pls if you have pls send via email or let me download it.

BR
farid valipour</description>
		<content:encoded><![CDATA[<p>Hi, thanks Dear Wade Arnol.</p>
<p>have you the source code of screenshot ,pls if you have pls send via email or let me download it.</p>
<p>BR<br />
farid valipour</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Robinson</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-2230</link>
		<dc:creator>Chris Robinson</dc:creator>
		<pubDate>Sun, 19 Apr 2009 10:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-2230</guid>
		<description>Thanks for the screen cast hove now got this  working like a dream thanks, however i have come across one small problem and this is when trying to map nested arrays.

this is the php array which i am trying to send back to the client flex app


    [1] =&gt; Table Object
        (
            [TABLE_NAME] =&gt; COUNTRY
            [COLUMNS] =&gt; Array
                (
                    [0] =&gt; Column Object
                        (
                            [COLUMN_NAME] =&gt; CODE
                        )

                    [1] =&gt; Column Object
                        (
                            [COLUMN_NAME] =&gt; NAME
                        )

                )

        )

when i debug event.result has the Table correctly mapped to TableVO as it should be but columns are empty, please can anyone shed some light on this as its driving me nuts. 

PhP classes

class Table{
	//public $_explicitType = &#039;TableVO&#039;;
	public $TABLE_NAME = &quot;&quot;;
	public $COLUMNS = array();
	
	function Table($aa = null){
		if($aa){
			foreach ($aa as $k=&gt;$v)
				if(!is_numeric($k)){
					$this-&gt;$k = $aa[$k];
				}
		}
	}
	public function getASClassName(){
		return &#039;TableVO&#039;;
	}
}

class Column{
	//public $_explicitType = &#039;ColumnVO&#039;;
	public $COLUMN_NAME = &quot;&quot;;
	
	function Column($aa = null){
		if($aa){
			foreach ($aa as $k=&gt;$v)
				if(!is_numeric($k)){
					$this-&gt;$k = $aa[$k];
				}
		}
	}
	public function getASClassName(){
		return &#039;ColumnVO&#039;;
	}
}

My Flex Classes are 

package com.chr.vo
{
	import mx.collections.ArrayCollection;
	
	[Bindable]
	[RemoteClass(alias=&quot;TableVO&quot;)]
	public class TableVO
	{
		public var TABLE_NAME:String;
		public var COLUMNS:ArrayCollection;
		public function TableVO()
		{
		}
	}
}

package com.chr.vo
{
	[Bindable]
	[RemoteClass(alias=&quot;ColumnVO&quot;)]
	public class ColumnVO
	{
		public var COLUMN_NAME:String;
		public function ColumnVO()
		{
		}

	}
}

How do i correctly map the nested data please?

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Thanks for the screen cast hove now got this  working like a dream thanks, however i have come across one small problem and this is when trying to map nested arrays.</p>
<p>this is the php array which i am trying to send back to the client flex app</p>
<p>    [1] =&gt; Table Object<br />
        (<br />
            [TABLE_NAME] =&gt; COUNTRY<br />
            [COLUMNS] =&gt; Array<br />
                (<br />
                    [0] =&gt; Column Object<br />
                        (<br />
                            [COLUMN_NAME] =&gt; CODE<br />
                        )</p>
<p>                    [1] =&gt; Column Object<br />
                        (<br />
                            [COLUMN_NAME] =&gt; NAME<br />
                        )</p>
<p>                )</p>
<p>        )</p>
<p>when i debug event.result has the Table correctly mapped to TableVO as it should be but columns are empty, please can anyone shed some light on this as its driving me nuts. </p>
<p>PhP classes</p>
<p>class Table{<br />
	//public $_explicitType = &#8216;TableVO&#8217;;<br />
	public $TABLE_NAME = &#8220;&#8221;;<br />
	public $COLUMNS = array();</p>
<p>	function Table($aa = null){<br />
		if($aa){<br />
			foreach ($aa as $k=&gt;$v)<br />
				if(!is_numeric($k)){<br />
					$this-&gt;$k = $aa[$k];<br />
				}<br />
		}<br />
	}<br />
	public function getASClassName(){<br />
		return &#8216;TableVO&#8217;;<br />
	}<br />
}</p>
<p>class Column{<br />
	//public $_explicitType = &#8216;ColumnVO&#8217;;<br />
	public $COLUMN_NAME = &#8220;&#8221;;</p>
<p>	function Column($aa = null){<br />
		if($aa){<br />
			foreach ($aa as $k=&gt;$v)<br />
				if(!is_numeric($k)){<br />
					$this-&gt;$k = $aa[$k];<br />
				}<br />
		}<br />
	}<br />
	public function getASClassName(){<br />
		return &#8216;ColumnVO&#8217;;<br />
	}<br />
}</p>
<p>My Flex Classes are </p>
<p>package com.chr.vo<br />
{<br />
	import mx.collections.ArrayCollection;</p>
<p>	[Bindable]<br />
	[RemoteClass(alias="TableVO")]<br />
	public class TableVO<br />
	{<br />
		public var TABLE_NAME:String;<br />
		public var COLUMNS:ArrayCollection;<br />
		public function TableVO()<br />
		{<br />
		}<br />
	}<br />
}</p>
<p>package com.chr.vo<br />
{<br />
	[Bindable]<br />
	[RemoteClass(alias="ColumnVO")]<br />
	public class ColumnVO<br />
	{<br />
		public var COLUMN_NAME:String;<br />
		public function ColumnVO()<br />
		{<br />
		}</p>
<p>	}<br />
}</p>
<p>How do i correctly map the nested data please?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexis</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-1967</link>
		<dc:creator>Alexis</dc:creator>
		<pubDate>Wed, 08 Apr 2009 22:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-1967</guid>
		<description>I want to parse AMF binary content to be able to make it readable by a human, without knowing what it is inside or who created the logics.

PHP Fatal error:  Uncaught exception &#039;Zend_Amf_Exception&#039; with message &#039;Unable to parse /2/onResult body data com.mycompany.MyClass mapped class  is not defined&#039; in /home/alexist/amf/Zend/Amf/Request.php:174

The error occurs because I do not know what kind of class is &quot;com.mycompany.MyClass&quot; but I still want to know what fields are inside and the rest of the response.

Is there a way to avoid to throw this exception and continue the parsing?</description>
		<content:encoded><![CDATA[<p>I want to parse AMF binary content to be able to make it readable by a human, without knowing what it is inside or who created the logics.</p>
<p>PHP Fatal error:  Uncaught exception &#8216;Zend_Amf_Exception&#8217; with message &#8216;Unable to parse /2/onResult body data com.mycompany.MyClass mapped class  is not defined&#8217; in /home/alexist/amf/Zend/Amf/Request.php:174</p>
<p>The error occurs because I do not know what kind of class is &#8220;com.mycompany.MyClass&#8221; but I still want to know what fields are inside and the rest of the response.</p>
<p>Is there a way to avoid to throw this exception and continue the parsing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ozay</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-1485</link>
		<dc:creator>Ozay</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-1485</guid>
		<description>Sorry for the double post, I think I found my solution and perhaps might be useful for other people.

registerClassAlias(&quot;ActionscriptVOClass_RemoteClass.alias&quot;, ActionscriptVOClass);

needs to be called in order the register the class with RemoteClass.

Don&#039;t know why it doesn&#039;t need in Flex..</description>
		<content:encoded><![CDATA[<p>Sorry for the double post, I think I found my solution and perhaps might be useful for other people.</p>
<p>registerClassAlias(&#8220;ActionscriptVOClass_RemoteClass.alias&#8221;, ActionscriptVOClass);</p>
<p>needs to be called in order the register the class with RemoteClass.</p>
<p>Don&#8217;t know why it doesn&#8217;t need in Flex..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ozay</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-1484</link>
		<dc:creator>Ozay</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-1484</guid>
		<description>Hi Wade,

Do you have any example done in Flash CS3 using classmapping feature?
I tried mostly every possible combination, but onResult it always returns [object Object].. I checked the same classes in Flex and they return as they should.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Wade,</p>
<p>Do you have any example done in Flash CS3 using classmapping feature?<br />
I tried mostly every possible combination, but onResult it always returns [object Object].. I checked the same classes in Flex and they return as they should.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://wadearnold.com/blog/flash/zend-amf-class-mapping/comment-page-1#comment-441</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 10 Nov 2008 19:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://wadearnold.com/blog/?p=54#comment-441</guid>
		<description>I too am having issues with duplicate methods. If one were to use NetConnection to connect and setClass on a few different classes, how do you add and call the function with the namespace? I have a basic Service class that all my classes extend and it throws duplicate errors since they all defined the protected/public functions again.

$server-&gt;setClass(new Service_Home(), &#039;Service_Home&#039;);

how do I call methodName() method of Service_Home with that namespace?

__nc.call(&#039;Service_Home.Service_Home.methodName&#039;, __responder, params);

??

__nc.call(&#039;Service_Home.methodName&#039;, __responder, params);

works great if I don&#039;t add any other services or a namespace.</description>
		<content:encoded><![CDATA[<p>I too am having issues with duplicate methods. If one were to use NetConnection to connect and setClass on a few different classes, how do you add and call the function with the namespace? I have a basic Service class that all my classes extend and it throws duplicate errors since they all defined the protected/public functions again.</p>
<p>$server-&gt;setClass(new Service_Home(), &#8216;Service_Home&#8217;);</p>
<p>how do I call methodName() method of Service_Home with that namespace?</p>
<p>__nc.call(&#8216;Service_Home.Service_Home.methodName&#8217;, __responder, params);</p>
<p>??</p>
<p>__nc.call(&#8216;Service_Home.methodName&#8217;, __responder, params);</p>
<p>works great if I don&#8217;t add any other services or a namespace.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
