【发布时间】:2009-11-12 12:34:13
【问题描述】:
上下文:我正在开发一个使用 FDT 开发并使用 Flash CS4 编译的 Flash 应用程序(我需要一个庞大的库)。它应该连接到各种 Weborb 服务。
Weborb 已正确配置。我的服务通过管理控制台正确执行并返回值。 Weborb 示例以及使用 Flex 编译的各种测试功能齐全。
问题: 当我尝试调整代码以使用 Flash 编译并像这样设置远程对象时:
var remoteObject = new RemoteObject();
remoteObject.destination = "GenericDestination";
remoteObject.source = "MyServices.MyService";
remoteObject.addEventListener("fault", onFault);
remoteObject.getFoo.addEventListener("result", onResult);
我得到以下错误:
faultCode: InvokeFailed
faultString: '[MessagingError]'
faultDetail: 'null'
如果我尝试以这种方式设置频道:
var channelSet:ChannelSet = new ChannelSet();
var amfChannel:AMFChannel = new AMFChannel("my-amf",
"http://localhost/weborb/weborb.php");
channelSet.addChannel(amfChannel);
var remoteObject = new RemoteObject();
remoteObject.channelSet = channelSet;
remoteObject.destination = "MyServices/MyService";
然后我得到了这个错误:
faultCode: Client.Error.MessageSend
faultDetail: Channel.Connect.Failed
url: 'null'
问题:如何正确设置 RemoteObject 以从使用 Flash 编译的 Flash 应用程序连接到 Weborb 远程服务?
这让我发疯了。
【问题讨论】:
标签: flash actionscript rpc weborb remoteobject