Re: Calling plain Java classes methods?

"Sean C. Sullivan" <[email protected]>
Newsgroups gmane.comp.java.openamf.user
Message-ID <[email protected]>
Enable the DEBUG log messages.  Does the log show that the 
DefaultGateway servlet received the AMF request?

-Sean

Cristiano Monteiro dos Santos wrote:

>Hi guys.
>
>Is there any way of calling plain Java classes methods using OpenAMF? I'm trying it here but it doesn't seems to work. I have a plain class called TesteAmf which contains a method called mandaOi, like bellow:
>
>-----------
>package atech.teste.amf;
>
>import java.util.Calendar;
>
>public class TesteAmf {
>    
>    public String mandaOi( String nome ) {
>        return "Oi " + nome + ". Agora sao " + Calendar.getInstance().get( Calendar.HOUR_OF_DAY ) + ":" + Calendar.getInstance().get( Calendar.MINUTE );
>    }
>}
>----------
>
>Then I have my little Flash movie that only calls that method, using that script:
>
>-------------
>#include "NetServices.as"
>#include "DataGlue.as"
>
>import mx.controls.TextInput;
>
>if ( initialized == null ) {
>    initialized = true;
>    NetServices.setDefaultGatewayUrl( "http://localhost:8080/teste_amf/gateway" );
>    conexao = NetServices.createGatewayConnection();
>}
>
>var TesteAmf = conexao.getService( "atech.teste.amf.TesteAmf", this );
>
>btn_envia.onRelease = function() {
>	TesteAmf.mandaOi( "frango" );
>}
>
>function mandaOi_Result( resultado ) {
>	resultado.text = resultado;
>}
>function mandaOi_Status( erro ) {
>	resultado.text = erro.description;
>}
>--------------
>
>Is there any error that I can't see?
>
>Thanks guys.
>
>Regards,
>Cristiano
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: InterSystems CACHE
>FREE OODBMS DOWNLOAD - A multidimensional database that combines
>robust object and relational technologies, making it a perfect match
>for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
>_______________________________________________
>Openamf-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/openamf-user
>
>  
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.