HttpService & WebService For Flex Develop
来源:互联网 发布:独木成林 未卖网前软件 编辑:程序博客网 时间:2024/04/30 00:26
① 关于httpservice的配置,flex可以通过httpservice和webservice的方式进行数据的传递,现在来配置httpservice。
下面这句话就可以进行httpservice的配置
<mx:HTTPService id="indexService" url="jindex.jsp" resultFormat="xml" result="GetDetailsInfo()" />
var xmlNodes:Array = indexService.result.childNodes;这样数组xmlNodes存的就是xml的数据了!
② 现在配置webservice,flex通过webservice可以直接调用java文件中的方法,具体写法如下:
<mx:WebService id="ws" serviceName="WaitForMomentWS">
<mx:operation name="slowMethod" result="resultHandler(event)"/>
</mx:WebService>
<mx:operation name="slowMethod" result="resultHandler(event)"/>
</mx:WebService>
配置webservice需要配置F:\eclipse\workspace\FX-Blog\WebContent\WEB-INF\目录下面的server-config.wsdd和
F:\eclipse\workspace\FX-Blog\WebContent\WEB-INF\flex\下面的flex-config.xml这2个文件,首先配置server-config.wsdd,用ue打开后,增加如下代码:
<service name="WaitForMomentWS" provider="java:RPC">
<parameter name="methodName" value="*"/>
<parameter name="className" value="FXBlog.Others.WaitForMoment"/>
</service>
<parameter name="methodName" value="*"/>
<parameter name="className" value="FXBlog.Others.WaitForMoment"/>
</service>
第三行的value的值就是这个java文件所在的package的名字加上自己的本身的名字
然后配置flex-config.xml,增加如下代码:
<service name="WaitForMomentWS">
<wsdl>{context.root}/services/WaitForMomentWS?wsdl</wsdl>
<endpoints>
<endpoint>{context.root}/services/WaitForMomentWS</endpoint>
</endpoints>
<use-custom-authentication>true</use-custom-authentication>
</service>
<wsdl>{context.root}/services/WaitForMomentWS?wsdl</wsdl>
<endpoints>
<endpoint>{context.root}/services/WaitForMomentWS</endpoint>
</endpoints>
<use-custom-authentication>true</use-custom-authentication>
</service>
0 0
- HttpService & WebService For Flex Develop
- flex 数据传输 httpservice, webservice, RemoteObject, socket
- Flex与外部数据通信URLLoader、HTTPService、 WebService
- Flex HttpService
- Flex HTTPService
- flex---->HttpService
- Flex HTTPService
- Flex HTTPService
- 使用Httpservice和Webservice来和Flex进行通讯
- Flex中使用HttpService和WebService方式通信
- Flex数据交互方法 :httpservice, webservice, RemoteObject, socket
- Flex HTTPService 提交表单
- Flex HTTPService初识
- Flex JSP with HttpService
- FLEX与HttpService通信
- flex HttpService请求
- flex HTTPService浅析
- httpservice and webservice
- 几大原型开发软件对比[转]
- Word For Application By C#
- Bug Manager Plateform Sets
- abstract class VS interface[转]
- 国外的一个flex入门教学~[转]
- HttpService & WebService For Flex Develop
- How to build a Flex development platform based on Myeclipse8.6 & Flex4
- Application called By IE on Pseudo B/S Mode
- mysql源码添加审计功能
- Compile the latest Kernel(linux-3.1-rc4) On Ubuntu Plateform
- 一种B/S模式下基于JAVA反射机制的可伸缩动态加载模块的解决方案
- 基于Pipe的PureMVC Flex框架的多核共享消息技术
- HQL略解
- Android中ListView小知识整理