• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using JAXB to convert Java Object to XML

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,

I have a requirement, where I need to convert XML to Java Object.
In other words, I have the data ready with me, I have to create the XML of that data.

I was able to create XML successfully using JAXB provided with Java 1.6. But the problem is that my client has Java 1.4 moreover the editor I am using also doesn't supports Java > 1.4

Here is the XSD I have to use........I'll describe the problem in detail beloww.



I am using Java Web Services Developer Pack (jwsdp-1_4-windows-i586.exe) to convert my data to XML.

But the problem I am facing is, I am not able to understand how do I set the list in it.

The Code which is working in java 1.6 is



The problem is I do not find proper equivalent classes when generated by JWSDP...


How do I get a TxnlistType Handle? It gives me a null.
Moreover there is no setDebit and setCredit Method in the TxndataTypeImpl class.



I am very much confused.

Please suggest me alternative tools which I can use freely to convert my Java object to XML and vice-versa.

Please do remember that it must work on Java version 1.4

Many Thanks in Advance...

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yogesh,
I´m not completely sure, but I guess XStream is what you are looking for.
Have you tried?
I hope it can help you.
 
Yogesh Gandhi
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks my dear friend Junior Fortunato


I would definitely give it a try, if it does not have any licensing issues and is usable in my company.

Will check it tomorror for sure.
 
reply
    Bookmark Topic Watch Topic
  • New Topic