FLEXÖеÄFluorineÍø¹ØÓëWebServiceµÄÇø±ð
ÒòΪÎÞÂÛÊÇFLEX£¬»¹ÊÇSilverlight¡¢AJAX£¬ËûÃǶ¼ÎÞ·¨Ö±½Ó²Ù×÷Êý¾Ý¿â£¨¾Ý×îÐÂÏûÏ¢£¬Î¢ÈíÓÐÁËMicrosoft .NET RIA Services£¬Ëü¿ÉÒÔÖ±½Ó²Ù×÷Êý¾Ý¿â£¬ÎÒÆÚ´ý×ÅËýÄÜÔÚVS2010ÖгöÏÖ£©£¬Í¨³£ÓÃWEBSERVICEµÈÖмäÈ˵ķ½Ê½À´½øÐÐSOAPÐÒéµÄµÄÎı¾´«Ê䣬ЧÂʺܵͣ¨´ó¼ÒÊÔһϾͻáÖªµÀ¼òÖ±ÎÞ·¨ÈÌÊÜ£©£¬FLEXΪÁ˼ӿ촫ÊäËٶȣ¬ÓÚÊÇÖƶ¨ÁËAMF¡£¶¨ÒåÈçÏ£º
AMFÊÇAction Message FormatÐÒéµÄ¼ò³Æ£¬AMFÐÒéÊÇAdobe¹«Ë¾×Ô¼ºµÄÐÒ飬Ö÷ÒªÓÃÓÚÊý¾Ý½»»¥ºÍÔ¶³Ì¹ý³Ìµ÷Óã¬ÔÚ¹¦ÄÜÉÏÏ൱ÓÚWebService£¬µ«ÊÇAMFÓë WebServiceÖеÄXML²»Í¬µÄÊÇAMFÊǶþ½øÖÆÊý¾Ý£¬¶øXMLÊÇÎı¾Êý¾Ý£¬AMFµÄ´«ÊäЧÂʱÈXML¸ß¡£AMFʹÓÃHTTP·½Ê½´«Ê䣬ĿǰÖ÷ÒªÊÇÓÃÓÚActionScriptÖУ¬¼´ÊµÏÖFlexºÍServerÖ®¼äµÄͨÐÅ¡££¨Òý×Ô£ºhttp://fykyx521.javaeye.com/blog/455837£©
¾Ý˵£¬AMFÊÇWEBSERVICEËٶȵÄ10±¶¡£
¿çÓòÎÊÌ⣺
AMFÔÚFLEXºÍ.NETÖмäµÄ½â¾ö·½°¸ÊÇʹÓÿªÔ´µÄFluorineFx£¬µ«ÆäȱµãÊDz»ÄÜ¿çÓò£¬¼´£¬ÄãÉú³ÉµÄSWFÎļþ±ØÐëºÍ.NET³ÌÐò·ÅÔÚÒ»¸ö·þÎñÆ÷Ï¡£½ñÌì¿´µ½ÁËÓà crossdomain.xml À´ÊµÏÖ¿çÓòµÄ·½·¨£¨Òý×Ô£ºhttp://www.mzwu.com/article.asp?id=975£©¡£¸ÃXMlÎļþÐè·ÅÔÚ.NET WEB³ÌÐòµÄ¸ùĿ¼Ï£¬XMLÄÚÈÝÐÎʽÈçÏ£º
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="www.friendOfFoo.com" />
<allow-access-from domain="*.foo.com" />
<allow-access-from domain="105.216.0.40" />
</cross-domain-policy>
ÏÂÃæÊǶþÕßÔÚFLEXÖеľßÌåÇø±ð¡£
Fluorine:
FLEXµ÷ÓÃFluorine£¬ÊÇд£º
<mx:RemoteObject id="sss" destination="fluorine" source="ÃüÃû¿Õ¼ä.Àà" >
<!-- ÏÂÃæµÄnameÊÇÔÚ.NETÖÐдµÄ·½·¨»òº¯ÊýÃû -->
<mx:method name="getL" result="showN(event)" />
</mx:RemoteObject>
¶øµ÷ÓÃWebServiceÊÇд£º
1¡¢ÔÚ <mx:Application xmlns:mx="http://adobe.com" creationComplete="WS.GetData.send();">
ÕâÆäÖеÄGetData¾ÍÊÇĬÈϵķ½·¨£¬µ÷ÓòÎÊýÔÚÆäÏ¿ÉÒÔ¼ÌÐøд¡£
2¡¢ÏÂÃæд£º
<mx:WebService id="WS" wsdl="http://localhost/ser/service.asmx?WSDL" >
<mx:operation name="GetData" resultFormat="Object" />
</mx:WebService>
µ«ÔÚͨ³£µÄWebService£¬ÊÇÕâÑùÓõģº
Ϊwebservice.slnµÄ½
Ïà¹ØÎĵµ£º
[Bindable]´ó¸ÅÓÖÊÇFlexÓõÃ×î¶àµÄÔªÊý¾ÝÁË¡£¸Õ¿ªÊ¼ÓÃÓÃȷʵºÃ¼òµ¥£¬Ð§ÂÊÕæÊÇûµÄ˵¡£²»¹ýÕ⼸ÌìÓÃ×ÅÈ´Åöµ½ÁËЩÎÊÌ⣬ÎÒ×Ô¼ºËѼ¯ÁËЩ×ÊÁÏ£¬
Ïë×ÅÓбØÒªÔÚblogÀï×ܽáһϰɡ£
ɶÊÇÔªÊý¾Ý£¨metadata£©
ÖªµÀ¾ÍÌø¹ý°É¡£½ñÌì²»ÏþµÃΪʲô
livedoc.adobe.comÕâôÂý£¬Ã»°ì·¨£¬Äò»µ½È¨ÍþµÄ½âÊÍÁË¡£ÎҾͰ´×Ô¼ºµÄÀí½âËæ±ã½âÊÍÒ»Ï ......
module ½Ó¿ÚÎļþ PictureWindowInterface.as
package
{
public interface PictureWindowInterface
{
function setSelectIndex(index:int):void
}
}
moudule Îļþ PictureWindow.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml ......
EventArgExtend.as
package myeventhelper
{
public class EventArgExtend
{
public function EventArgExtend()
{
}
public static function create(f:Function,...arg):Function //addEventListener×¢²áʼþ½øÐд«µÝ²ÎÊýµÄ·½·¨
{ //EventArgExtend.create(comB.onGetParentTotal,this)
......
Flex ¿ª·¢ÈëÃÅ
¼¶±ð£º ³õ¼¶
Áõ Çì (qlcdl@cn.ibm.com), Èí¼þ¹¤³Ìʦ, IBM Èí¼þ¿ª·¢ÖÐÐÄ
2009 Äê 1 ÔÂ 07 ÈÕ
±¾ÎĽéÉÜ Flex ¿ª·¢µÄ»ù´¡ÖªÊ¶£º°üÀ¨ÈçºÎ´î½¨¿ª·¢»·¾³£¬ÈçºÎµ÷ÊÔ£¬ÒÔ¼°ÈçºÎ½¨Á¢ºÍ²¿Êð¼òµ¥µÄ Flex ÏîÄ¿¡£Í¨¹ý±¾ÎĵÄѧϰ£¬¿ÉÒÔΪÄú½«À´ÉîÈëµØѧϰ Flex ´òÏÂÁ¼ºÃµÄ»ù´¡¡£
¿ªÊ¼Ö®Ç°
Flex ×÷Î ......
flex¶àÎļþÉÏ´«¹¤¾ß£¨×ÔÓã©
JAVAÀà
package com.shine.framework.flexUpload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet; ......