This content has been marked as final. Show 11 replies
Hi, I tried the same example and it worked for me. Are you sure you're editing the right remoting-config.xml ?
I don't know how it can work on your computer and not on mine. Yes, I am modifying the right configuration files.
My full remoting-config file looks like this :
<?xml version="1.0" encoding="UTF-8"?>
<adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
Also, my web.xml is pretty empty. Anything need to be there ?
<?xml version="1.0" encoding="ISO-8859-1"?>
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
<!-- BalancerFilter definition -->
Also, I have two web applications - Flex and rpcdataservice. Inside my rpcdataservice I have a web-inf folder, inside which I have another flex subdirectory. I am modifying the remote-config.xml file in my flex subdirectory inside my rpcdataservice web application. I am NOT modifying it in the flex web application (The Flex root).
Should I have a correponding actionscript file for my Java class ? I was under the assumption that those are required only if I am using them as data types. Here the return type is just a String.
Thanks for your help.
No, you don't need need Actionscipt files in this case. Your remoting-config.xml file is correct but maybe your application tries to pick remoting-config.xml from the Flex folder? Why don't you define PlayerDB in WEB-INF/ of Flex folder as well and see if that makes a difference?
Tried everything, doesn't work.
Even removed flex and flex-admin webapps from Tomcat. Just have rpcdataservice webapp and inside that the Flex subfolder with the right configuration files.
Also, I used the build.bat (got it from flex samples) to build the .swf file from .mxml file.
for /R . %%f in (*.mxml) do ..\..\bin\mxmlc.exe %OPTS% "%%f"
I'm sure this has nothing to do with it, but I tried everything else already
Hmm. I don't know what could be the problem but these are some things I'd try myself:
1- Can you define and use the remote object from flex or flex-admin apps?
2- Can you use other types of destinations in rpcdataservice app? (look into messaging-config.xml, proxy-config.xml and data-management.xml config for other types of destinations)
And the plot thickens.
I removed flex, flex-admin directories, and kept just the rpcdataservice (my app) as the only webapp under Tomcat. What I see is that if I launch .mxml from the browser, it works, but when I launch the .swf file it complains about 'unknown destination'.
I compiled the .mxml into .swf frm command-line using the batch file I mentioned in the earlier message.
So .mxml works, but .swf doesn't work. Again I am launching both the files from the browser.
Thanks for your patience.
What happens when you try to launch the flex-admin swf file (console.swf I think)? Do you get the same type of error?
By the way, when you compile mxml yourself, make sure you use --compiler.services <path_to_services-config.xml>. This points the compiler to your services configuration file and that way all the destination information gets compiled into the swf.
>>By the way, when you compile mxml yourself, make sure you use --compiler.services <path_to_services-config.xml>.
That works - now .the swf and mxml both work.
Thanks so much for your help, matamel.
hi arkcto ,. i also have same problem as well
i have created a Flex 2 application and compiled a some java class..
i was using remoteobj to connect those java class
but i also got this error
RPC Fault faultString="[MessagingError message='Unknown destination 'PlayerDB'.
so that , what can i do .. thank ..
Did you specify a -services command line argument for the compiler and set
its value to the path to your /WEB-INF/flex/services-config.xml file?