Mule ESB -- 引入一个中间件来发布和消费 SOAP

Mule ESB -- Introduce a Middleware to Publish and Consume SOAP

我刚刚开始使用 Mule 3.8 CE 版本。我的用例是这样的,

发布 SOAP -- 从已发布的 SOAP 中点击任何方法 -- 接收数据 -- 传递此数据以使用 SOAP -- 获取响应 -- 通过 Java 处理响应 -- Return this as来自已发布 SOAP 方法的响应。

简而言之,我想介绍一个来自 Mule 的中间件(不是代理),它将发布端点 (e1) -- 从该端点 (e1) 接收数据 -- 将此数据传递到另一个端点 (e2) --从另一个端点接收数据。(e2) -- return 对原始端点 (e1) 的响应。

目前我正在使用以下 Mule 配置来实现此目的,

 <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8085" doc:name="HTTP Listener Configuration"/>
<endpoint exchange-pattern="request-response" address="http://192.168.2.3:9080/crestelBEExport/billexport/CrestelBEExportService/CrestelBEExport" name="Generic" doc:name="Generic"/>
<flow name="webserviceproducerFlow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/hello" doc:name="HTTP"/>
    <cxf:jaxws-service serviceClass="com.poc.example.ws.IHelloWorld" doc:name ="CXF" />
    <component class="com.poc.example.ws.HelloWorldWSImpl" doc:name="Java"/>
</flow>

在“HellowWorldWSImpl”中,我有 Webmethod。我正在使用 SOAP 并在此 Webmethod 中接收数据。我正在 returning 从 SOAP 使用此数据作为对此 Webmethod 的响应。这是正确的方法还是有什么更好的方法可以达到我的要求吗?

您可以使用WS Consumer调用WS。无需编写 java 代码。这样会更"mule"方式。

Mule 3.8企业版有一个功能,可以帮助你在一开始就指定WSDL 这将创建类似 RAMLSample WSDL

的结构