The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

benny (3) [Avatar] Offline
#1
Hi!

With the CXF inbound-endpoint I can create a webservice which invokes a POJO and the response also comes from the POJO.

With the CXF outbound-endpoint I can consume a webservice and can then use the output (routing via a chaining router for example).

But what I want is:

Receive a SOAP msg via an inbound-endpoint, then call another webservice, transform this output and use the outbound-endpoint to send the output back to the webservice client (which invokes the inbound-endpoint).

I hope it is understandable what I want and I really hope someone can help me.

Regards

Message was edited by:
benny
benny (3) [Avatar] Offline
#2
Re: Problem with Mule and CXF
Hm, a nested-router seems to be a good choice, but how can I use it? Has anybody an example for me? And how can I pass the response back to the webservice client?
tijs.rademakers (494) [Avatar] Offline
#3
Re: Problem with Mule and CXF
Hi,

Good question, and yes the nested router is the component you should use if you want the functionality you describe.

Let's look at a small example configuration:

<service>
<inbound>
<cxf:inbound-endpoint address="http://localhost:8080/test"/>
</inbound>
<component class="com.test.YourWebService">
<binding interface="com.webservice.WebServiceInterface">
<outbound-endpoint address="http://test/webservice"/>
</binding>
</component>
</service>

Now what this configuration does is expose the YourWebService class as a web service on the http://localhost:8080/test address. The YourWebService class must define a class attribute with type WebServiceInterface and define a public setter for it. Then you can invoke the other web service from the YourWebService operation by calling the WebServiceInterface method.If you want to transform the response from the http://test/webservice web service you can simply define a transformer on the outbound-endpoint.
Hope this provides some help for you.

Best regards,

Tijs