Book Image

Service Oriented Java Business Integration

Book Image

Service Oriented Java Business Integration

Overview of this book

Table of Contents (23 chapters)
Service Oriented Java Business Integration
Credits
About the Author
Acknowledgement
About the Reviewers
Preface

Invoke External Web Service from the ServiceMix Sample


You have now seen how to set up a JBI proxy and how to invoke a proxy just like a POJO bound to JBI. Now you can extend the same principles if you need to call out from a JSR181 SU to a HTTP provider in order to interact with an external web service. You can use XFire to create stub classes based on your WSDL exposed by your external web service. Now you can inject the stub into your JSR181 SU. The stub will be used by the proxy to generate the exchange with the HTTP provider (which should be referenced as the "service").

You have already seen in Chapter 10, how to bind a web service external to the JBI onto the JBI bus. Then any JBI component can exchange messages with the remote web service. One aspect which you need to note is that we have been exchanging messages in a document-oriented fashion. However using JBI proxy now, it is possible to invoke web services in the RPC style from within the JBI bus. For this we leverage the stub...