how can i pass a variable from jvm to mule then call a web service by those variable and return respond to jvm?

StackOverflow https://stackoverflow.com/questions/13227293

Frage

hi i have a flow in mule like this

<flow name="MuleService">
    <vm:inbound-endpoint path="ms" exchange-pattern="request-response" />
            <!-- I have a Payload here want to conver it to what my service want -->
            <logger message="Received message #[payload]" level="INFO" />
<!--    <cxf:jaxws-client    HERE !!! i need to call a SOAP service-->

             <!-- here i need to return service respond to jvm now i just return string      -->
    <script:transformer>
        <script:script engine="groovy">return 'this is mule'</script:script>
    </script:transformer>
</flow>

i want to send message from vm to mule then call a soap service and return response to vm so i can change my service implementation and its proxies without having to change my client! how can i do that ? i think process involves discovering service proxies and transfrom my message to proxy type and then getting response and return it to jvm.

War es hilfreich?

Lösung

The easiest way to achieve this is by using the WS Proxy Pattern

This will allow you to use the endpoint you need (i.e. vm as inbound and http as an outbound) applying the proper transformations and being relatively independent from the proxied web service

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top