教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 高中教育 >

Mule3.0开发图解教程

来源:网络收集 时间:2026-09-15
导读: 方便开发人员迅速上手掌握Mule 环境搭建和例子: Download mule standaloe from web site: 1. 2. Unzip to a path(such as: D:\mulesl312) Installing Mule IDE in Eclipse 3. Start Eclipse, and set up a workspace for your installation of Mule if you

方便开发人员迅速上手掌握Mule

环境搭建和例子:

Download mule standaloe from web site:

1. 2. Unzip to a path(such as: D:\mulesl312)

Installing Mule IDE in Eclipse

3. Start Eclipse, and set up a workspace for your installation of Mule if you haven't already. (Make

sure your workspace does not have a space in the directory path) 4. In the workbench view, choose Help > Install New Software. 5. Press the Add button next to the Work with text box, enter

http://doc.guandang.net/mule-ide/updates/3.4/ and press Enter. The Mule IDE

now appears in your list of available software.

6. Select the Mule IDE check box and click Next, and after Eclipse processes for a moment, click Next

again.

7. Review the Mule IDE license, select the option to accept the license, and then click Finish. 8. Click Yes to restart Eclipse. 9. Set Mule Distributions in eclipse:

方便开发人员迅速上手掌握Mule

You are now ready to configure the Mule distribution as described in the next section. Config MULE_HOME and add bin to path: 10. MULE_HOME: D:\mulesl312

11. Path:%Path%; %MULE_HOME%\bin

Create a new Mule project:

How to Import a existing project to Mule project and run it:

there is some ecamples in example folder of MULE,wecanimport

them

方便开发人员迅速上手掌握Mule

We neeed to add Mule classpath lib to the project

Then we can run the project on Mule runtime like as:

方便开发人员迅速上手掌握Mule

So server starts:

NFO 2011-06-22 11:38:01,125 [main]

org.mule.module.management.agent.JmxAgent: Registered Endpoint Service with name:

Mule.04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252:type=Endpoint,service="Hello

World",connector=connector.http.mule.default,name="endpoint.http.localhost.8888"

INFO 2011-06-22 11:38:01,125 [main]

org.mule.module.management.agent.JmxAgent: Registered Connector Service with name

Mule.04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252:type=Connector,name="connector.servlet.mule.default.1"

INFO 2011-06-22 11:38:01,125 [main]

org.mule.module.management.agent.JmxAgent: Registered Connector

Service with name

方便开发人员迅速上手掌握Mule

Mule.04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252:type=Connector,name="connector.stdio.mule.default.1"

INFO 2011-06-22 11:38:01,125 [main]

org.mule.module.management.agent.JmxAgent: Registered Connector Service with name

Mule.04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252:type=Connector,name="connector.VM.mule.default.1"

INFO 2011-06-22 11:38:01,125 [main]

org.mule.module.management.agent.JmxAgent: Registered Connector Service with name

Mule.04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252:type=Connector,name="connector.http.mule.default.1"

INFO 2011-06-22 11:38:01,140 [main] org.mule.DefaultMuleContext: **********************************************************************

* Mule ESB and Integration Platform * * Version: 3.1.2 Build: 21975 * * MuleSoft, Inc. * * For more information go to http://doc.guandang.net * * *

* Server started: 11-6-22 上午11:38 *

* Server ID: 04cd6ac8-9c81-11e0-95b7-8bd1ea0dc252 * * JDK: 1.6.0_10-rc2 (mixed mode, sharing) * * OS encoding: UTF-8, Mule encoding: UTF-8 * * OS: Windows XP - Service Pack 3 (5.1, x86) * * Host: PC-201103071221 (192.168.40.61) * * Mode: Development * * * * Agents Running: * * JMX Agent *

**********************************************************************

mule-config.xml:

<inbound-endpoint address="http://localhost:8888"

transformer-refs="HttpRequestToNameString" exchange-pattern="request-response"> <not-filter>

<wildcard-filter pattern="/favicon.ico"/> </not-filter> </inbound-endpoint>

//所有的转换器都在此,就我理解所有的转换过程其实都要自己写,可以自己定义通用的转换器重用并扩展。

方便开发人员迅速上手掌握Mule

//public class ChatStringToString extends AbstractTransformer 父类 <custom-transformer name="StringToNameString" class="org.mule.example.hello.StringToNameString"/> <custom-transformer name="NameStringToChatString" class="http://doc.guandang.netStringToChatString"/> <custom-transformer name="ChatStringToString" class="org.mule.example.hello.ChatStringToString"/> <custom-transformer name="HttpRequestToNameString" class="org.mule.example.hello.HttpRequestToNameString"/> <custom-transformer name="ExceptionToString" class="org.mule.example.hello.ExceptionToString"/> <custom-transformer name="HttpRequestToParameter"

class="org.mule.transport.servlet.transformers.HttpRequestToParameter"/>

<custom-transformer name="ObjectToString"

class="org.mule.transformer.simple.ObjectToString"/>

理论和模型:

1. 简介

Mule ESB是一个基于Java的轻量级企业服务总线和集成平台,允许开发人员快速便利地连接多个应用,并支持应用间的数据交换。Mule ESB支持集成现有系统而无论其底层采用何种 …… 此处隐藏:5329字,全部文档内容请下载后查看。喜欢就下载吧 ……

Mule3.0开发图解教程.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/1729056.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)