title: Prevent Jackson XML mapper from adding wstxns to namespaces
body: <p>When serialising objects to XML and specifying namespaces for properties using 
  <code>@JacksonXmlRootElement(namespace = "http://...")</code>
  Jackson will append or prepend ´wstxns1´ to the namespace. For example, say we have these classes:</p>
  
  <p><strong>VtexSkuAttributeValues.java</strong></p>
  
  <pre><code>@JacksonXmlRootElement(localName = "listStockKeepingUnitName")
  public class VtexSkuAttributeValues {
  
      @JacksonXmlProperty(localName = "StockKeepingUnitFieldNameDTO", namespace = "http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts")
      @JacksonXmlElementWrapper(useWrapping = false)
      private VtexSkuAttributeValue[] stockKeepingUnitFieldNameDTO;
  
      public VtexSkuAttributeValue[] getStockKeepingUnitFieldNameDTO() {
          return stockKeepingUnitFieldNameDTO;
      }
  
      public void setValues(VtexSkuAttributeValue[] values) {
          this.stockKeepingUnitFieldNameDTO = values;
      }
  }
  </code></pre>
  
  <p><strong>VtexSkuAttributeValue.java</strong></p>
  
  <pre><code>@JacksonXmlRootElement(localName = "StockKeepingUnitFieldNameDTO", namespace = "http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts")
  public class VtexSkuAttributeValue {
  
      private String fieldName;
      private FieldValues fieldValues;
      private int idSku;
  
      public int getIdSku() {
          return idSku;
      }
  
      public String getFieldName() {
          return fieldName;
      }
  
      public FieldValues getFieldValues() {
          return fieldValues;
      }
  
      public void setIdSku(int idSku) {
          this.idSku = idSku;
      }
  
      public void setFieldName(String fieldName) {
          this.fieldName = fieldName;
      }
  
      public void setFieldValues(FieldValues fieldValues) {
          this.fieldValues = fieldValues;
      }
  
      @JacksonXmlRootElement(localName = "fieldValues", namespace = "http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts")
      public static class FieldValues {
          @JacksonXmlProperty(namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")
          @JacksonXmlElementWrapper(useWrapping = false)
          public String[] string;
  
          public String[] getString() {
              return string;
          }
  
          public void setValues(String[] values) {
              this.string = values;
          }
      }
  }
  </code></pre>
  
  <p>I then use the <code>XmlMapper</code> to serialise and get:</p>
  
  <pre><code>&lt;listStockKeepingUnitName&gt;
      &lt;wstxns1:StockKeepingUnitFieldNameDTO xmlns:wstxns1="http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts"&gt;
          &lt;fieldName&gt;talle&lt;/fieldName&gt;
          &lt;fieldValues&gt;
              &lt;wstxns2:string xmlns:wstxns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt;6184&lt;/wstxns2:string&gt;
          &lt;/fieldValues&gt;
          &lt;idSku&gt;258645&lt;/idSku&gt;
      &lt;/wstxns1:StockKeepingUnitFieldNameDTO&gt;
      &lt;wstxns3:StockKeepingUnitFieldNameDTO xmlns:wstxns3="http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts"&gt;
          &lt;fieldName&gt;color&lt;/fieldName&gt;
          &lt;fieldValues&gt;
              &lt;wstxns4:string xmlns:wstxns4="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt;6244&lt;/wstxns4:string&gt;
          &lt;/fieldValues&gt;
          &lt;idSku&gt;258645&lt;/idSku&gt;
      &lt;/wstxns3:StockKeepingUnitFieldNameDTO&gt;
  &lt;/listStockKeepingUnitName&gt;
  </code></pre>
  
  <p>Even though this is valid XML, the web service I'm working with doesn't accept it. I debugged it and it's due to the <code>wstxns</code> properties in the tags that Jackson adds for some reason.
  Is there a way to prevent Jackson from adding that to the tags. The only workaround I could come up with is performing a string.replaceAll on the resulting XML but it's obviously not ideal.</p>