1 13 14 package org.ejbca.core.protocol.xkms.common; 15 16 20 import com.sun.xml.bind.marshaller.NamespacePrefixMapper; 21 22 public class XKMSNamespacePrefixMapper extends NamespacePrefixMapper { 23 24 @Override 25 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { 26 if( namespaceUri.equals("http://www.w3.org/2001/XMLSchema-instance") ){ 27 return "xsi"; 28 } 29 if(namespaceUri.equals("http://www.w3.org/2000/09/xmldsig#")){ 30 return "ds"; 31 } 32 if(namespaceUri.equals("http://www.w3.org/2001/04/xmlenc#")){ 33 return "xenc"; 34 } 35 if(namespaceUri.equals("http://www.w3.org/2002/03/xkms#")){ 36 return ""; 37 } 38 return suggestion; 39 } 40 41 } 42 | Popular Tags |