简体   繁体   中英

Mule - use flow in CXF service

I'm trying to build a CXF service with a flow connected to it.

So far, my flow has this:

<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8082" doc:name="HTTP Listener Configuration"/>

<flow name="b2bFlow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/b2b" doc:name="HTTP"/>
    <cxf:jaxws-service  doc:name="CXF" serviceClass="com.acme.Soap">
        <cxf:jaxb-databinding/>
    </cxf:jaxws-service>
    <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    <component class="com.acme.SoapImpl" doc:name="Java"/>
</flow>

My problem is that I don't want to write all the logic inside the service implementation. If I put my logic right after the CXF component, the payload is an Object[] and if I put my logic after the call to the service implementation (the Java component), I only have access to the object the service implementation returns.

I tried to call a subflow from the component code or write the arguments in flowVars, but with no success.

How can I accomplish this?

Thank you in advance

If you don't want you implementation in the service class, maybe look at a cxf:proxy-service instead of a cxf:jaxws-service. This will allow you host and validate against a WSDL and schema but allow you access to the raw payload to handle how you want in Mule configuration.

More info here: https://developer.mulesoft.com/docs/display/current/Proxying+Web+Services+with+CXF

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM