Mule学习之路_2.与WSO2 Registry集成之查询WSDL

最近在做Mule与WSO2 注册表的集成,现有的资料中,只找到一个老外的博客

http://www.smartjava.org/content/mule-and-wso2-registry-integration

可是却没有走通,所以只有另辟蹊径。

最近项目组研究注册表的同学发现WSO2 Registry提供的一些发布,查询服务和WSDL的API

并且有了调用的例子,所以我就打算在Mule中通过对这些方法发布服务,来在Mule进行使用,再次记录一下。


下面是WSO2所提供的一些类,并且还有一些需要的JAR文件,用来通过服务名来查找服务的WSDL等

其中searchUrl(String)就是通过服务名来获得真实的WSDL地址


1、把WSO2查询服务的项目导入到Mule Studio 并引入相应的包。

2、把项目转成Mule Project

3、创建流程,发布服务



配置文件如下

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="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
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <flow name="RegistryServiceFlow1" doc:name="RegistryServiceFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8888/services/resgistryService" doc:name="HTTP"/>
        <cxf:jaxws-service serviceClass="heru.com.FindUrlImpl" doc:name="SOAP"/>
        <component class="heru.com.FindUrlImpl" doc:name="Java"/>
        
    </flow>
</mule>

SOAPUI测试结果


在运行项目的时候可能会出现一些错误,例如出现NoSuchMethod.........主要是WSO2项目中的JAR包与Mule中的JAR有版本冲突,例如项目中的axiom包是1.2.11的,而Mule中自带的是1.2.5的,那么就需要把1.2.11版本中的文件都拷贝到mule中的1.2.5然后再打成包,才能够使用。







  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值