Expand my Community achievements bar.

Configuring RemoteObject Access

Avatar

Level 3
Hi All

I'm still a newbie so I'm fighting to do something on FDS



These were the steps I followed to create a simple RPC data
acess application through RemoteObject

1 - I created a java class and a method that returns an
ArrayList of data (that works fine, I tested)

2 - I started a new FDS project on Flex Builder 2 (compile at
run-time option)

3 - I declared it inside my application a RemoteObject and a
method pointing to the folder containing the java class (As I
copied the restaurant example, I specified no destination)

4 - I configured a destination inside the remoting-config.xml
(this file already existed cause Flex Builder by default places
your project along with the restaurant example, the WEB-INF folder
is set up)

5 - run the application



This error was thrown while first execution compile-time:



Error: Cannot assign operations into an RPC Service
(encoding)

at mx.rpc::AbstractService/
http://www.adobe.com/2006/actionscript/flash/proxy::setProperty()

at DataAccess/::_RemoteObject1_i()

at DataAccess$iinit()

at mx.managers::SystemManager/create()

at mx.managers::SystemManager/::initializeTopLevelWindow()

at mx.managers::SystemManager/::frameEndHandler()



Please, what am I doing wrong??
5 Replies

Avatar

Level 2
Would you please post your MXML / AS code?

Avatar

Level 3
Sure, These are all the files I created/modified



MXML:

URL:


http://webcinema.com.br/DataAccess.mxml

Path:

C:\fds2\jrun4\servers\default\flex\DataAccess\



Configuration File:

URL:


http://webcinema.com.br/remoting-config.xml

Path:

C:\fds2\jrun4\servers\default\flex\WEB-INF\flex\



Main Java File:

URL:


http://webcinema.com.br/DBAdmin.java

Path:

C:\fds2\jrun4\servers\default\flex\WEB-INF\classes\pdv\



Secondary Java File:

URL:


http://webcinema.com.br/Traducao.java

path:

C:\fds2\jrun4\servers\default\flex\WEB-INF\classes\pdv\



Thanks!

Avatar

Level 2
Your RemoteObject declaration has an 'encoding' attribute
which does not belong.

Avatar

Level 3
Yes! worked! :)

I copied this encoding attribute from some sample...

Avatar

Level 2
Encoding was in 1.x but has since been deprecated.