Anoopp Thakur

+ Follow
since May 03, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anoopp Thakur

I'm trying to access a remote server EJB beans...

And also as it is a remote server, in place of localhost it should be

Thanks Peer for your invaluable comments. Neglected completely the "impedance mismatch". And sorry for missing out on the links that you provided in your earlier post. I would go through the links that you have provided.
Thanks for replying Peer. I have nerver used XSLT, but will go through it.
There is already an existing code that converts the source XML file to Java objects using Castor, hence I thought of using Adaptor to convert it into objects of the target type and then marshal them to target XML. Also there are two different XML source files that needs to be converted to a single target XML.
Can you give me some pointers for good XSLT tutorial or book where I can start reading from. Thanks in advance.
Forgot to mention that xml file B has a well defined xsd. It also has elements/attributes that do not have corresponding values in xml file A, so we need to have defaults for them.
I have an XML file A with some structure. I have a program that uses Castor to read file A and converts it into Java Objects.
Now I need to convert file A into another XML file say B with some different structure. What I have thought is to define an interface which will have methods that would return me objects pertaining to XML file B and then use an Adapter class that would implement this interface and invoke and fetch values from the existing class(that returns objects of file A).
The client to the adapter will then marshall these objects using Castor that would give me xml file B.
Why I plan to do this is because I have more such XML files with some different structures that needs to be converted to structure of file B. So I will write adapters(that will implement the common interface) for all such files.
Is this a correct approach? Am I correct in using Adapter pattern here? Or is there a better approach to achieve this?