Have you tried browsing to the endpoint URI to check it’s accessible? What URL are you using to load the SWF? Perhaps you’ve changed the configuration but not restarted the server nor forced a recompile of your SWF (i.e. doing a clean and forcing FB to recompile)?

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98
Sent: Monday, June 26, 2006 3:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remote object invocation failure

 

I'm trying to call a method on a Java object and keep getting
"Connection failed" when I try the method call. I know it must be a
configuration issue but have been plugging away at this all morning
with out making any headway. Maybe some of you can see the problem
easily. I'm using Tomcat. Thanks in advance.

Here are the relevant details (I think):
// ********** The error messages *****
[SWF] /metalsmith/metalsmith-flex/metalsmith-debug.swf - 1,196,373
bytes after decompression
'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer set destination to
'loginService'.
'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer sending message
'E164544F-F6BF-7F4E-D9C7-11B613446EE4'
'my-amf' channel endpoint set to
http://localhost:8080/metalsmith/messagebroker/amf
'my-amf' channel settings are:
<channel id="my-amf" type="mx.messaging.channels.AMFChannel">
<endpoint
uri="http://{server.name}:{server.port}/metalsmith/messagebroker/amf"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties>
</channel>
'my-amf' pinging endpoint.
'my-amf' channel got status. (Object)#0
code = "NetConnection.Call.Failed"
description = "HTTP: Failed"
details = "http://localhost:8080/metalsmith/messagebroker/amf"
level = "error"
'my-amf' channel polling stopped.
'my-amf' channel connect failed.
'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer channel faulted with
Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Failed
'B82DD8CB-1D89-50BA-17CE-11B6029AA47B' producer fault for
'E164544F-F6BF-7F4E-D9C7-11B613446EE4'.

// *********** The mxml file defining and calling the remote object
<mx:Script>
<![CDATA[
import com.othenos.metalsmith.user.User;
import com.othenos.metalsmith.model.ModelLocator;
import mx.events.ValidationResultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;

private function clickHandler():void{
if(userNameV.validate().type == ValidationResultEvent.VALID &&
passwordV.validate().type == ValidationResultEvent.VALID){
loginObject.validateUser();
// loginObject.validateUser(userName.text, password.text);
// var eventObj:Event=new Event("loginEvent");
// dispatchEvent(eventObj);
}
else{
resultLabel.text="There are errors.";
}
}
private function loginHandler(event:ResultEvent):void{
ModelLocator.currentUser = event.result as User;
}
private function failureHandler(event:FaultEvent):void{
resultLabel.text=event.fault.faultString;
}
]]>
</mx:Script>
<mx:RemoteObject id="loginObject" destination="loginService"
showBusyCursor="true"
result="loginHandler(event)"
fault="failureHandler(event)" />

// ******* The flex-remoting-service.xml ********
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">

<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="loginService">
<properties>

<source>com.othenos.metalsmith.assembler.UserAssembler</source>
<scope>application</scope>
</properties>
</destination>

</service>

//**** flex-enterprise-services (partial)
<services>
<service-include file-path="flex-data-service.xml" />
<service-include file-path="flex-remoting-service.xml" />
</services>

<channels>
<channel-definition id="my-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition>

// ******** finally, startup messages
[Flex] [INFO] Starting Adobe Flex Data Services 2.0 Express (beta
period ends Jul 31, 2006)
[Flex] [INFO] Adobe Flex Data Services Build: 138139
[Flex] [INFO] Endpoint my-amf created with security: None
at URI:
http://{server.name}:{server.port}/{context.root}/messagebroker/amf
[Flex] [INFO] Endpoint ms-rtmp created with security: None
at URI: rtmp://{server.name}:2035
[Flex] [INFO] RTMP-Server listening on port:2035

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to