关于Mule ESB和Webservice的问题,问题很急。

karl1235 2012-04-28 01:15:45
一般调用WebService是通过wsdl2java先生成客户端,然后通过这个客户端去调的(这是静态的做法,当ws很多的时候,需要生成很多客户端

我现在有个业务需求:

我在做一个基于ESB数据交换平台,在运行时会有上百个系统不断的接入进来。

每个系统在接入时都会在我们的平台上注册至少一个它本身的webservice来接收其他系统发过来的消息。

假如系统路由关系是这样的:A--->B,A--->C,A---D,即A系统的某个消息需要发送到B,C,D三个系统

如果后期有一个E系统接入进来,并配置了 A--->E的路由关系,那么E系统也会收到A系统的某个消息。

我不可能在平台运行阶段,每接入一个系统就写一个WebService客户端,所以我的想法是:

当接入系统注册webservice时,不生成客户端,而是保存这个ws的url和method名字,然后写个通用的方法:

String call( String url,String method,Object... args);
url: webservice的wsdl调用地址
method : 需要调用的webservice的方法
args:参数值

这样不管是哪个webservice都可以通过这个方法去调。

我现在是使用SAAJ的API写Java代码实现的,我现在的问题就是:

1、就上面那个call方法,大家的实现思路是什么 ?

2、mule ESB里有木有这样的现成组件可配置使用 ?

3、mule里的 <cxf:jaxws-client/>、<cxf:simple-client/>、<cxf:proxy-service/>、<cxf:proxy-client/> 按照官方教程

的步骤,均有问题。。。

大伙帮帮忙,帮我解决解决,顺便也介绍几个ESB的交流群或论坛什么的。。。谢谢。
...全文
897 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
_pepper 2014-12-15
  • 打赏
  • 举报
回复
有没有muleESB的交流群啊
tdjava8888 2014-05-04
  • 打赏
  • 举报
回复
这个我已经实现了是用的Mule3.3.1,欢迎大家关于togethermule官方微信,加我QQ935760092,一起讨论Mule 下面是客户端调用webservice服务 <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd "> <flow name="deployWebService_Client"> <http:inbound-endpoint host="localhost" port="4321" path="callWebService" keep-alive="false" exchange-pattern="request-response" doc:name="接收请求" doc:description="Process HTTP reqests or responses." /> <component doc:name="组装参数" doc:description="Invoke a Java component"> <method-entry-point-resolver> <include-entry-point method="sayHello" /> </method-entry-point-resolver> <spring-object bean="webServiceComponent" /> </component> <http:outbound-endpoint followRedirects="false" host="localhost" port="80" keep-alive="false" exchange-pattern="request-response" doc:name="调用WebService服务" doc:description="Process HTTP reqests or responses."> <cxf:jaxws-client xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" clientClass="com.yuchengtech.bizflowtestcase.demo.webservice.hello.ITestWebServiceService" port="ITestWebServicePort" wsdlLocation="classpath:wsdl/deployWebService.wsdl" operation="sayHello" doc:name="SOAP" doc:description="Make a web service available via CXF"></cxf:jaxws-client> </http:outbound-endpoint> </flow> </mule> 下面是在Mule中部署webservice服务: <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd "> <flow name="webservice1"> <http:inbound-endpoint host="localhost" port="6543" keep-alive="false" path="callWebService" exchange-pattern="request-response" doc:name="HTTP" doc:description="Process HTTP reqests or responses." /> <cxf:jaxws-service serviceClass="com.yuchengtech.bizflowtestcase.demo.service.ITestWebService" doc:name="SOAP" doc:description="Make a web service available via CXF" /> <component class="com.yuchengtech.bizflowtestcase.demo.service.impl.TestWebServiceImpl" doc:name="Java" doc:description="Invoke a Java component" /> </flow> </mule>
tony4geek 2014-04-15
  • 打赏
  • 举报
回复
老帖子了。。。
shmy110 2014-04-15
  • 打赏
  • 举报
回复
http://training.middlewareschool.com/mule/
shmy110 2014-03-03
  • 打赏
  • 举报
回复
这我现在也在搞个类似的东西,哎 我特么都不知道MULE干啥用的 怎么搞哟 捉急
soyestrellafortuna 2013-12-06
  • 打赏
  • 举报
回复
对ESB我不是很明白,虽然最近在这个项目组中是做这个相关的东西。不过是临时调过来的。 只知道CXF调用webservice的时候,是可以无需生成客户端代码的。但是需要知道wsdl的地址与方法名。就可以动态调用了。
尼坤神 2013-12-06
  • 打赏
  • 举报
回复
楼主给介绍一下客户端是怎么链接到ESB上面的么,不要说什么http请求的·····
zhaoqcnh 2013-10-15
  • 打赏
  • 举报
回复
楼主,现在应该是MULE ESB的高手了吧,有没有好一点的文件或者资料分享啊,赶紧不尽,zhaoqcnh@163.com,最近在做这个,还是初学者,在此谢了!!
dreamhyz 2012-08-06
  • 打赏
  • 举报
回复
一起交流呀,大家关于mule esb 加QQ 511248785
liuxueping1987 2012-05-18
  • 打赏
  • 举报
回复
同样遇到楼主的问题,请求大侠解决??
Jaczhao 2012-05-05
  • 打赏
  • 举报
回复
不知道楼主解决没,我现在也遇到这个问题了

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧