• Post Reply Bookmark Topic Watch Topic
  • New Topic

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!