* @param soapObject the SOAP object to add the attribute to
* @param usage the usage to add
*/
public static void addWSSEUsage(XMLObject soapObject, String usage) {
if (soapObject instanceof UsageBearing) {
UsageBearing usageBearing = (UsageBearing) soapObject;
List<String> list = usageBearing.getWSSEUsages();
if (list == null) {
list = new LazyList<String>();
usageBearing.setWSSEUsages(list);
}
list.add(usage);
} else if (soapObject instanceof AttributeExtensibleXMLObject) {
AttributeMap am = ((AttributeExtensibleXMLObject)soapObject).getUnknownAttributes();
String list = am.get(UsageBearing.WSSE_USAGE_ATTR_NAME);