Search code examples
web-servicessoapmulemule-el

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


I just have started using Mule 3.8 CE version. My use case is to like this,

Publish SOAP -- Hit any method from Published SOAP -- Receive data -- Pass this Data to consume SOAP -- Fetch Response -- Process response via Java -- Return this as response from Method of Published SOAP.

In short I want to introduce a middleware (not a proxy) from Mule which will publish endpoint (e1) -- receive data from that endpoint (e1) -- pass this data to another endpoint(e2) -- receive data from this another endpoint.(e2) -- return response to original endpoint (e1).

My Mule Flow

Currently I am using following Mule configuration to achieve this,

 <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>

In the 'HellowWorldWSImpl" I have Webmethod. I am consuming SOAP and receive data in this webmethod. I am returning this data consumed from SOAP as response to this Webmethod. Is this right approach or is there any better way to achieve my requirement?


Solution

  • With Mule 3.8 enterprise edition, you have a feature, which will help you to specify WSDL in the beginning This will create similar structure like a RAMLSample WSDL