I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namesp
Another way is to tell the marshaller to always use a certain prefix
marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapper() { @Override public String getPreferredPrefix(String arg0, String arg1, boolean arg2) { return "ns1"; } });'