• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JAXB2 XML Namespaces  RSS feed

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am running into an issue where in one environment JAXB2 is not putting out any namespaces and in another environment it is adding in namespaces. I have checked that the start of the order of jars is the same in both environments.

They are both runing java 1.5

For example on my windows box XML prints out like following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2_:Sample xmlns:ns2_="http://www.mycompany.com/2008/example" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#">

Where as on the other environment it prints out how I am expecting it too.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Sample xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.mycompany.com/2008/example">

Any help on why the ns2_ could be printing out differently when the code is the same.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!