I have an environment which hosts a number of "services" with inputs and outputs that are easily bound to XML. I want to be able to expose one or more services dynamically through SOAP. In other words, the user must be able to combine service A and B into a webservice (and optionally configure names etc for the operations).
This means I need to be able to dynamically generate the WSDL or at least parts of it (especially the XSD definitions which can be requested from the services) and I need to be able to dynamically create and publish new endpoints which all use a single Provider class which (based on context and what not) will determine which service you are trying to invoke. It will unmarshal the XML, call the service, marshal the response and send that back.
Is this possible with JAX-WS? I would very much like to take advantage of the existing features (notably WS-* etc) that come with JAX-WS. If it is not possible with JAX-WS, are there any other options?
Your use case is actually very hard to implement with JAX-WS (and maybe even impossible). But do not worry, you are not the first one with this requirement.
Imagine a big company with several legacy systems that need to be integrated. Then they spent a lot of money and time implementing an SOA architecture based on SOAP web services. These services are combined (orchestred) to create business process.
Example: The business process 'Create a contract' needs the execution of the web services A, B and C.
But what happen if changing the business process needs some code source changes??? The company needs to have a development team keeping those process up-to-day.
To solve this, BPEL's dynamic binding was created. This technology allows you to compose a new service at runtime based on the parameters of the requested service!
In a few words, what you need to do if define several 'base web services' and then configure a BPEL server to dynamically combined those services at runtime!
Please read this article from Oracle to get an idea ...
And check here the JBoss BPEL user guide.
What you should do to use BPEL in your case
With this, you will have a very powerful platform to do orchestration that you can extend for more complex use cases in the future.
Hope it helps ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With