I'm using Tomcat 6 and I did restart tomcat.
Sherif Abdou wrote: > > you restart coldfusion server? > > > > ----- Original Message ---- > From: Gabsaga Tata <[EMAIL PROTECTED]> > To: [email protected] > Sent: Tuesday, July 15, 2008 2:09:32 PM > Subject: [flexcoders] Couldn't establish a connection to 'helloworld' > > > I'm trying to run a simple hello world flex application using RemoteObject > and I get the following error: > (mx.rpc::Fault) #0 > errorID = 0 > faultCode = "InvokeFailed" > faultDetail = "Couldn't establish a connection to 'helloworld' " > faultString = "[MessagingError message='Destinatio n 'helloworld' either > does not exist or the destination > has no channels defined (and the application does not define any > default channels.)'] " > HelloWorld Java class is as follows: > package example; > public class HelloWorld { > public HelloWorld() { > } > public String getHelloWorld( ) { > return "Hello From Java!"; > } > } > remoting-config. xml is as follows: > <?xml version="1.0" encoding="UTF- 8"?> > <service id="remoting- service" > class="flex. messaging. services. RemotingService"> > <adapters> > <adapter-definition id="java-object" class="flex. messaging. > services. remoting. adapters. JavaAdapter" default="true" /> > </adapters> > <default-channels> > <channel ref="my-amf" /> > </default-channels> > > <destination id="helloworld"> > <properties> > <source>example.HelloWorld</source> > </properties> > </destination> > </service> > > HelloWorld.mxml is as follows: > <?xml version="1.0" ?> > <mx:Application xmlns:mx="http://www.adobe. com/2006/ mxml"> > <mx:Script> > <![CDATA[ > import mx.rpc.events. ResultEvent; > import mx.rpc.events. FaultEvent; > import mx.utils.ObjectUtil ; > import mx.controls. Alert; > import mx.utils.StringUtil ; > private function resultHandler( event:ResultEven t):void > { > //used for debugging - shows details about result > //returned by the Java class method > Alert.show( ObjectUtil.toString (event.result) ); > } > private function faultHandler( event:FaultEvent ):void > { > Alert.show( ObjectUtil.toString (event.fault) ); > } > ]]> > </mx:Script> > <mx:RemoteObject id="ro" destination= "helloworld" source="example. > HelloWorld" result="resultHandl er(event) " fault="faultHandler (event)"/> > > <mx:Panel x="10" y="10" width="440" height="200" layout="vertical" > title="Test Flex 3 Using Java" borderColor= "#008040" fontFamily=" Arial" > fontWeight=" bold" fontSize="13"> > <mx:Text text="Click The Button To Test Getting Data Into Flex From A > Java Class" fontWeight=" bold" width="250"/> > <mx:Spacer height="20"/> > <mx:Button label="Get Hello World!" click="ro.getHelloW orld()"/> > > </mx:Panel> > > </mx:Application> > I'm running the application on tomcat. Am I missing something? The BlazeDS > samples work just fine but > for some reason this simple helloworld example created doesn't work. By > the way, I'm using Textpad as > my editor and Eclipse 3.2 to compile my java source. I compile the mxml > file using command line mxlmc > since I don't have Flex Builder. > mxmlc HelloWorld.mxml > Any help will be appreciated. > Thanks. > Gabsaga > > > > -- View this message in context: http://www.nabble.com/Couldn%27t-establish-a-connection-to-%27helloworld%27-tp18472731p18473137.html Sent from the FlexCoders mailing list archive at Nabble.com.

