使用 AIR 和 Weborb for Java 进行远程处理
我正在尝试在服务器端使用 AIR 和 weborb for Java 进行远程处理。
我看到有人使用 blazeds 端点 http://IP:PORT/blazeds/messagebroker/amf
谁能告诉我我应该给出什么作为 java 的 weborb 的终点。
我尝试跟随,但它不起作用。任何帮助将不胜感激。
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.mxml.RemoteObject;
public function init():void
{
var remote:RemoteObject =new RemoteObject();
remote.destination = "Test";
**remote.endpoint = "https://localhost:5480/foo/weborb.wo"**
remote.addEventListener("result", onResult);
remote.addEventListener("fault", onFault);
remote.sayHello();
}
public function onResult(event:ResultEvent):void {
var result:Object = (event as ResultEvent).result as Object ;
Alert.show(result.toString());
}
public function onFault(event:FaultEvent):void {
Alert.show(event.fault.faultDetail);
//Alert.show("Failed");
}
]]>
</mx:Script>
I am trying to do remoting with AIR with weborb for Java in Server-side.
I saw people using endpoint for blazeds http://IP:PORT/blazeds/messagebroker/amf
Can any one please tell me what i should give as end point for weborb for java.
I tried following, But its not working. Any help would be of greatly appreciated.
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.mxml.RemoteObject;
public function init():void
{
var remote:RemoteObject =new RemoteObject();
remote.destination = "Test";
**remote.endpoint = "https://localhost:5480/foo/weborb.wo"**
remote.addEventListener("result", onResult);
remote.addEventListener("fault", onFault);
remote.sayHello();
}
public function onResult(event:ResultEvent):void {
var result:Object = (event as ResultEvent).result as Object ;
Alert.show(result.toString());
}
public function onFault(event:FaultEvent):void {
Alert.show(event.fault.faultDetail);
//Alert.show("Failed");
}
]]>
</mx:Script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该代码将正常工作。我唯一忘记添加的是 FlexBUilder 中的 service-config.xml。
The code will be working fine as such. Only thing I forgot to add is service-config.xml in FlexBUilder.