I was wondering what is best to use in order to change the incoming request? is it better to use XSLT or use handler to change the request?
Suppose i have Web service A which serves WebService B and WebService B serves C and E. C and E have different vocubulary which is handles by WebServices B in order to process request which understandable by WebService A. So my question is which is better to use XSLT or handlers.
for more clarity, suppose there is a verb which C calls "subtract" and E calls "minusops". which basically substracts two numbers passed in request.
For Example, below is intermediatary.
I don't know if i were able to make question clear enough. Please let me know i were not clear enough
Where would you insert the XSLT to change the incoming request?
I feel a handler is the obvious place to insert additional processing of in- and out-going requests because:
- The source code of the web service may not be available.
- Separation of concerns.
Separate the additional processing, which in some deployments may not be needed, and the service providing some business logic.
This makes the service more easily changeable.
In the handler, you can of course use XSLT to process messages!
I agree with Ivan, the best way is to use handlers and in there you can perform transformations on the message.
The handlers fit the web service architecture better then filters. What if you have to implement web service as a session bean in future, then you will have to implement the filter's logic in an interceptor.
But if you use handler, it pretty much will remain same.