2010-11-30 1 views
0

나는 bladeds amf url을 가지고 있는데, 이는 https://..../afm/MessageBrok입니다. 사실 amf 게이트웨이 또는 무엇이라고 불리는 지 확실하지 않습니다. 하지만 기본적으로 blizeds 위치에 대한 원격 객체 호출을 서비스/대상에 대해 수행 한 다음 XML 파일이나 플렉스 측면에 설정하지 않고 웹 서비스처럼 사용합니다. BlazeDS 측은 정상적으로 작동하지만 기본적으로, 나는 그걸 얻기 위해 사용해야하는 mxml 파일의 코드를 알아야합니다 ...Flex에서 BlazeDS로 RemoteObjecting

답변

1

a) mxml에서 또는) :

<mx:RemoteObject id="remoteObject" destination="campaignRemoteServices"> 
    <mx:method name="method1" result="createResult1(event)" fault="createFault1(event)"/>  
    <mx:method name="method2" result="createResult2(event)" fault="createFault2(event)"/> 
    <mx:....... 
</mx:RemoteObject> 

이렇게하기 전에 대상 이름과 노출 된 방법을 알아야합니다.

b) 원격 객체에 대한 채널 구성 :

var channelSet:ChannelSet = new ChannelSet(); 
var channel:AMFChannel = new AMFChannel("amf", "blazeds amf endpoint , for example http://localhost:8080/myapp/messagebroker/amf"); 
channelSet.addChannel(channel);    
remoteObject.channelSet = channelSet;    

C)를 호출하는 방법 :

remoteObject.method1("test");