I am going to develop one middleware for backend communication. The request from client system is converted to server specific request by the middleware. This middleware would be able to support any kind of server.
For client request, i am going to use XML/JSON format. The middleware has to convert XML/JSON format to server specific format by analyzing the URL given by client in runtime(it may be SOAP, WSDL, HTTP etc).
My question is, Is there any way to analyze the URL in runtime? Means, I have to find request type(whether SOAP/HTTP,GET/POST).
Thanks in advance….
If you want to use plain java, for data conversion you can use XPath/XSLT with great success (in fact most of ESB solutions are using it). By changing your XSLT templates you can apply changes at runtime without restarting your application.
Anyway you should consider solutions like Apache Camel, Mule and Spring Integration which are specifically targeted in such problem domain. They will help you to separate business and transformation logic from transport.
As my additional advice use JMS when possible, it’s much more reliable transport than HTTP.