AMF-Perl

 view release on metacpan or  search on metacpan

doc/code.html  view on Meta::CPAN


$gateway->service();
</textarea>

</td>
<td valign=top>
<textarea cols=50 rows=20>
#!/usr/bin/python

from AMF import AMF
import sys
import os

gateway = AMF.AMF()

gateway.setRelativeBaseClassPath("/basicservices")

gateway.service()
</textarea>
</td></tr></table>
<br>
<h3>Part 2.&nbsp; Sample class in the registered directory.</h3>
<table>
<tr><th>Perl</th><th>Python</th></tr>
    <tr>
<td valign=top>
   
<textarea cols=50 rows=40>
package DataEcho;

sub new
{
    my ($proto)=@_;
    my $self={};
    bless $self, $proto;
    return $self;
}

sub echoNormal
{
    my ($self, $data) = @_;
    return $data;
}
sub echoDate
{
    my ($self, $data) = @_;
    return $data;
}
sub echoXML
{
    my ($self, $data) = @_;
    return $data;
}

sub methodTable
{
    return {
        "echoNormal" =&gt; {
            "description" =&gt; "Echoes the passed argument back to Flash (no need to set the return t
ype)",
            "access" =&gt; "remote", # available values are private, public, remote
        },
        "echoDate" =&gt; {
            "description" =&gt; "Echoes a Flash Date Object (the returnType needs setting)",
            "access" =&gt; "remote", # available values are private, public, remote
            "returns" =&gt; "date"
        },
        "echoXML" =&gt; {
            "description" =&gt; "Echoes a Flash XML Object (the returnType needs setting)",
            "access" =&gt; "private", # available values are private, public, remote
            "returns" =&gt; "xml"
        }
    };
}

1;
</textarea>
</td>
<td valign=top>
<textarea cols=50 rows=40>
import sys
class DataEcho:
    
    def echoNormal(self, arg):
        return arg

    def echoDate(self, arg):
        return arg

    def echoXML(self, arg):
        return arg

    def methodTable(self):
        table = {}
        table["echoNormal"]= {
                    "description" : "Echoes the passed argument back to Flash (no need to set the return type)",
                    "access" : "remote", # available values are private, public, remote
            }
        table["echoDate"] = {
                    "description" : "Echoes a Flash Date Object (the returnType needs setting)",
                    "access" : "remote", # available values are private, public, remote
                    "returns" : "date"
            }
        table["echoXML"] = {
                    "description" : "Echoes a Flash XML Object (the returnType needs setting)",
                    "access" : "private", # available values are private, public, remote
                    "returns" : "xml"
            }
        return table
</textarea>
</td></tr></table>

      </td>
    </tr>
  </tbody>
</table>
</div>
<br>
</body>
</html>



( run in 0.972 second using v1.01-cache-2.11-cpan-39bf76dae61 )