package org.my;
import org.mule.DefaultMuleEvent;
import org.mule.api.MuleEvent;
import org.mule.api.MuleException;
import org.mule.api.MuleMessage;
import org.mule.api.routing.AggregationContext;
import org.mule.routing.AggregationStrategy;
public class CustomAggregationStrategy implements AggregationStrategy {
@Override
public MuleEvent aggregate(AggregationContext context) throws MuleException {
// TODO Auto-generated method stub
MuleEvent result = null;
int count = 0;
/* MuleMessage message = null;
message.set
result.setMessage(message);
*/
String str = "";
for (MuleEvent event : context.collectEventsWithoutExceptions()) {
try {
str += event.getMessage().getPayloadAsString();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
result = DefaultMuleEvent.copy(context.collectEventsWithoutExceptions().get(0));
result.getMessage().setPayload(str);
return result;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
MULE开发实例1---并行调用多个webservice接口
共47个文件
xml:25个
grf:10个
properties:4个
4星 · 超过85%的资源 需积分: 50 163 下载量 198 浏览量
2015-10-09
16:14:28
上传
评论
收藏 55KB ZIP 举报
温馨提示
使用MuleEsb同时掉多个webservice,并返回到调用方。开发环境为AnyPoint3.7,将例子中的webservice接口修改成自己的即可运行。
资源推荐
资源详情
资源评论
收起资源包目录
test-multiws.zip (47个子文件)
test-multiws
.project 562B
src
test
resources
java
main
api
resources
app
mule-deploy.properties 125B
test-multiws.xml 6KB
mule-app.properties 0B
java
com
mycompany
utils
PurchaseOrderAggregator.java 489B
org
my
CustomAggregationStrategy.java 1KB
target
classes
mule-deploy.properties 125B
xml_getwassqinforesponse__to_csv_1.grf 4KB
map_to_xml_getriversqinfo_.grf 4KB
com
mycompany
utils
PurchaseOrderAggregator.class 620B
test-multiws.xml 6KB
mule-app.properties 0B
map_to_xml_getsksqinfo_.grf 4KB
xml_getriversqinforesponse__to_json.grf 4KB
org
my
CustomAggregationStrategy.class 2KB
map_to_xml_getwassqinfo_.grf 4KB
test-classes
.settings
org.eclipse.jdt.core.prefs 598B
mule-project.xml 343B
mappings
xml_getwassqinforesponse__to_csv_1.grf 4KB
map_to_xml_getriversqinfo_.grf 4KB
map_to_xml_getsksqinfo_.grf 4KB
xml_getriversqinforesponse__to_json.grf 4KB
map_to_xml_getwassqinfo_.grf 4KB
.classpath 879B
catalog
Xml_getRiverSqInfoResponse__To_JSON__md__io__.xml 3KB
Xml_getRiverSqInfoResponse__To_CSV__md__io__.xml 3KB
Map_To_Xml_getRiverSqInfo___md__io__.xml 4KB
Xml_getWasSqInfoResponse__To_CSV_1__md__io__.xml 3KB
Xml_getWasSqInfoResponse__To_JSON__md__io__.xml 3KB
types
custom
Map_To_Xml_getRiverSqInfo___md__type__.xml 12KB
Xml_getRiverSqInfoResponse__To_JSON_1__md__type__.xml 10KB
Map_To_Xml_getWasSqInfo___md__type__.xml 12KB
Xml_getRiverSqInfoResponse__To_JSON__md__type__.xml 10KB
Web_Service_Consumer__md__type__.xml 60KB
Map_To_Xml_getSkSqInfo___md__type__.xml 12KB
Xml_getRiverSqInfoResponse__To_CSV__md__type__.xml 10KB
Xml_getWasSqInfoResponse__To_CSV_1__md__type__.xml 10KB
Xml_getWasSqInfoResponse__To_JSON__md__type__.xml 10KB
Xml_getWasSqInfoResponse__To_CSV__md__type__.xml 10KB
Map_To_Xml_getRiverSqInfo__1__md__type__.xml 12KB
Xml_getWasSqInfoResponse__To_CSV__md__io__.xml 3KB
Map_To_Xml_getSkSqInfo___md__io__.xml 4KB
Xml_getRiverSqInfoResponse__To_JSON_1__md__io__.xml 3KB
Map_To_Xml_getRiverSqInfo__1__md__io__.xml 4KB
Web_Service_Consumer__md__io__.xml 13KB
Map_To_Xml_getWasSqInfo___md__io__.xml 4KB
bin
.project 388B
src
target
classes
共 47 条
- 1
zfqhd432
- 粉丝: 8
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页