没有 services-config.xml 的 Flash RemoteObject Weborb 连接(无 Flex)
背景:我正在开发一个使用 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 远程处理服务?
这让我抓狂。
Context : I'm working on a Flash application developed with FDT and compiled with Flash CS4 (I need a huge library). It should connect to various Weborb services.
Weborb is properly configured. My services are properly executed, and values returned, via the management console. Weborb examples as well as various tests compiled with Flex are fully functionnal.
Problem :
when I try to adapt the code to compile with Flash, and setup the remote object like this :
var remoteObject = new RemoteObject();
remoteObject.destination = "GenericDestination";
remoteObject.source = "MyServices.MyService";
remoteObject.addEventListener("fault", onFault);
remoteObject.getFoo.addEventListener("result", onResult);
I get the following fault :
faultCode: InvokeFailed
faultString: '[MessagingError]'
faultDetail: 'null'
If I try to setup a channel this way :
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";
I then get this fault :
faultCode: Client.Error.MessageSend
faultDetail: Channel.Connect.Failed
url: 'null'
Question: how to properly setup a RemoteObject to connect to a Weborb remoting service from a Flash application compiled with Flash ?
This is driving me nuts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用此代码以编程方式配置
RemoteObject
:SomeCustomDestination 是在
WEB-INF/flex/services-config.xml
中定义的,这是服务器,但客户端需要识别它才能访问。服务器可能会为您的目的地发布访问策略(安全约束)。I am using this code to configure
RemoteObject
programatically:SomeCustomDestination is defined in
WEB-INF/flex/services-config.xml
which is needed by the server, but client needs to identify it to access. Server may issue access policy (security constraint) for your destination.这是一篇帖子。也许这会有所帮助。
This a post of mine from a while ago. Maybe this will help.