zl程序教程

您现在的位置是:首页 >  工具

当前栏目

apache synapse使用(2)

Apache 使用
2023-09-14 08:57:57 时间
         !-- log the message using the custom log level. illustrates custom properties for log --
         !-- send message to real endpoint referenced by key "simple" endpoint definition --

客户端执行

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/

 可以看到输出的结果

 Standard :: Stock price = $80.1611906447455

过程是先进入main然后直接进入可重用序列stockqnote,最后将请求的信息发送到http://localhost:9000/services/SimpleStockQuoteService

使用http://localhost:9000/services/SimpleStockQuoteService?wsdl可以看到显示的结果

 

2,错误处理


             switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol"

 客户端执行

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT

执行查询MSFT的股价,因为没有对应的端点查找最接近的错误处理,服务端看到提示

INFO LogMediator text = An unexpected error occured, message = Couldnt find the endpoint with the key : bogus

执行查看sun的股价

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN

最后打印出信息

INFO LogMediator text = An unexpected error occured for stock SUN, message = Couldnt find the endpoint with the key : sunPort

这个是在sunSeqence这个序列里执行的。

 

3,创建错误的SOAP信息并且变化消息的方向


             switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol"

 客户端调用

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT

 返回

soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" faultcode soapenv:Client /faultcode faultstring java.net.UnknownHostException: bogus /faultstring detail / /soapenv:Fault

执行

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN

返回

soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" faultcode soapenv:Client /faultcode faultstring java.net.ConnectException: Connection refused /faultstring detail / /soapenv:Fault

 

4,操纵SOAP协议头,修改传入或传出的消息


apache synapse使用(1) 一.Synapse介绍 Synapse 是一个简单的 XML 和 Web 服务管理与集成代理,可用于构成 SOA 和企业服务总线(ESB)的基础。Synapse是 Web 服务项目中一项成熟的 Apache 活动,并且是非常成功的 Apache Axis2 项目的一个分支。
海量数据实时分析引擎 Apache Flink 当系统出现大量或者重大的错误却不被人感知,将会对业务产生影响,从而导致资产损失。当竞争对手实施了新战术,却无法及时感知,跟不上竞争对手的节奏,总是追着对方尾巴走。当要做决策的时候,海量的业务数据增长却无法实时看到聚合结果,决策总是凭借过往经验或者过时的数据分析之上。
官宣|Apache Flink 1.17 发布公告 Apache Flink PMC(项目管理委员)已宣布发布 Apache Flink 1.17.0。Apache Flink 是领先的流处理标准,流批统一的数据处理概念在越来越多的公司中得到认可。
Apache Flink 1.16 功能解读 在本次分享中,将介绍一下 Flink 1.16 的整体情况;然后我们将从三个方面(更稳定易用高性能的 Flink 批处理;持续领先的 Flink 流处理;蓬勃发展的 Flink 生态。)来深入讲解 Flink 1.16 在流批一体的大方向上所做的改进。
《Apache Flink 必知必会》电子版地址 本书不仅有PMC 及 Committer 坐阵,全方位解析 Flink 底层架构、核心功能模块、社区生态等,知其然更知其所以然,还能带你手把手实操演示,轻松掌握 Flink 应用场景与功能实现的生产开发技能!零基础上手实战,7天轻松学会 Flink~
《Apache Flink 案例集(2022版)》电子版地址 希望通过本手册,可以让大家了解到大量来自不同领域的公司在数据集成、数据分析、人工智能、云原生以及企业数字化转型等应用场景中使用 Apache Flink 解决实际生产问题的成功案例,其中既包含传统和新兴的互联网公司,也包含通信、证券、银行等传统企业。